From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: [PATCH] gnu: Add dlib. Date: Sat, 10 Sep 2016 13:32:22 +0100 Message-ID: <87k2ekq6jt.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> References: <20160818202353.GB2393@jasmine> <8737m1yqru.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> <20160821201757.GA21038@jasmine> <6004b842-2434-9cdc-7a31-04231eac5941@uq.edu.au> <87k2f957wt.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> <8760qr5o8n.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> <87eg5e4g4r.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> <20160824172608.GA24668@jasmine> <878tvm2ddh.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> <87mvjuz5ae.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> <20160831190908.GD12396@jasmine> <874m5ps1zk.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bihSa-0007v7-2r for guix-devel@gnu.org; Sat, 10 Sep 2016 08:32:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bihSV-0005ex-QT for guix-devel@gnu.org; Sat, 10 Sep 2016 08:32:38 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:45473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bihST-0005bR-D5 for guix-devel@gnu.org; Sat, 10 Sep 2016 08:32:35 -0400 In-Reply-To: <874m5ps1zk.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Leo Famulari Cc: guix-devel , Alex Kost --=-=-= Content-Type: text/plain Marius Bakke writes: > Leo Famulari writes: > >> Changing the subject, you could disable the tests per-architecture. Look >> for uses of current-target-system and current-system for usage examples. >> But this is not absolutely required, IMO. > > This latest patch series now disables tests on a per-arch basis. > > There may be others on MIPS failing after the timeout, but extending the > list should be obvious. Here are the patches again, with the "failing-tests" variable renamed to "disabled-tests". Let me know if I can provide anything else. Thanks! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-dlib-Remove-unused-fftw-from-inputs.patch >From 331d291cabcb5d17d0284414cae1f2ac5c32736a Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 23 Aug 2016 21:17:14 +0100 Subject: [PATCH 1/3] gnu: dlib: Remove unused fftw from inputs. * gnu/packages/machine-learning.scm (dlib)[inputs]: Remove fftw. (define-module): Don't include algebra.scm. --- gnu/packages/machine-learning.scm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 4332045..7669702 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -28,7 +28,6 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system r) #:use-module (gnu packages) - #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages compression) @@ -515,8 +514,7 @@ single hidden layer, and for multinomial log-linear models.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs - `(("fftw" ,fftw) - ("giflib" ,giflib) + `(("giflib" ,giflib) ;("lapack" ,lapack) XXX lapack here causes test failures in some setups. ("libjpeg" ,libjpeg) ("libpng" ,libpng) -- 2.9.3 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-dlib-Do-not-build-dlib-twice-for-tests.patch >From 5c78ac7002cd92a2bfd8efa0f9902288dffe6a89 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 27 Aug 2016 17:23:58 +0100 Subject: [PATCH 2/3] gnu: dlib: Do not build dlib twice for tests. * gnu/packages/machine-learning.scm (dlib)[arguments]: Use makefile instead of cmake in check phase to prevent full rebuild. --- gnu/packages/machine-learning.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 7669702..e94ffdd 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -502,11 +502,10 @@ single hidden layer, and for multinomial log-linear models.") (replace 'check (lambda _ ;; No test target, so we build and run the unit tests here. - (let ((test-dir (string-append "../dlib-" ,version "/dlib/test/build"))) - (mkdir-p test-dir) + (let ((test-dir (string-append "../dlib-" ,version "/dlib/test"))) (with-directory-excursion test-dir - (and (zero? (system* "cmake" "..")) - (zero? (system* "cmake" "--build" "." "--config" "Release")) + (setenv "CXXFLAGS" "-std=gnu++11") + (and (zero? (system* "make" "-j" (number->string (parallel-job-count)))) (zero? (system* "./dtest" "--runall"))))))) (add-after 'install 'delete-static-library (lambda* (#:key outputs #:allow-other-keys) -- 2.9.3 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-dlib-Disable-failing-tests.patch >From 268d1085beb3195f38e4d96e0bfee55e456d3093 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 9 Sep 2016 01:51:23 +0100 Subject: [PATCH 3/3] gnu: dlib: Disable failing tests. * gnu/packages/machine-learning.scm (dlib)[arguments]: Add phase to disable tests that are known not to work in the current release. [inputs]: Add lapack. --- gnu/packages/machine-learning.scm | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index e94ffdd..b663b4f 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -499,6 +499,29 @@ single hidden layer, and for multinomial log-linear models.") (substitute* "dlib/config.h" (("^//#define DLIB_DISABLE_ASSERTS") "#define DLIB_DISABLE_ASSERTS")) #t)) + (add-after 'disable-asserts 'disable-failing-tests + (lambda _ + ;; One test times out on MIPS, so we need to disable it. + ;; The rest is known to fail on non-x86_64 platforms in the current release. + ;; Some have been fixed in git; this list should be readjusted next update. + (let* ((system ,(or (%current-target-system) + (%current-system))) + (disabled-tests (cond + ((string-prefix? "mips64" system) + '("object_detector" ; timeout + "data_io")) + ((string-prefix? "armhf" system) + '("learning_to_track" "max_cost_assignment")) + ((string-prefix? "i686" system) + '("optimization" "matrix2" "mpc")) + (else '())))) + ;; The following test fails due a bug in openblas < 0.2.18. + (append! disabled-tests '("empirical_map")) + (for-each + (lambda (test) + (substitute* "dlib/test/makefile" + (((string-append "SRC \\+= " test "\\.cpp")) "")) #t) + disabled-tests)))) (replace 'check (lambda _ ;; No test target, so we build and run the unit tests here. @@ -514,7 +537,7 @@ single hidden layer, and for multinomial log-linear models.") `(("pkg-config" ,pkg-config))) (inputs `(("giflib" ,giflib) - ;("lapack" ,lapack) XXX lapack here causes test failures in some setups. + ("lapack" ,lapack) ("libjpeg" ,libjpeg) ("libpng" ,libpng) ("libx11" ,libx11) -- 2.9.3 --=-=-=--