all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel <guix-devel@gnu.org>, Alex Kost <alezost@gmail.com>
Subject: Re: [PATCH] gnu: Add dlib.
Date: Fri, 09 Sep 2016 13:15:43 +0100	[thread overview]
Message-ID: <874m5ps1zk.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <20160831190908.GD12396@jasmine>

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

Leo Famulari <leo@famulari.name> 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.

Thanks for your patience!


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dlib-fixes.patch --]
[-- Type: text/x-patch, Size: 5625 bytes --]

From 331d291cabcb5d17d0284414cae1f2ac5c32736a Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
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


From 5c78ac7002cd92a2bfd8efa0f9902288dffe6a89 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
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


From dd8e87ecfb1f475bd0f88338f233883d02e649af Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
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..dd260c9 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)))
+                    (failing-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! failing-tests '("empirical_map"))
+               (for-each
+                (lambda (test)
+                  (substitute* "dlib/test/makefile"
+                    (((string-append "SRC \\+= " test "\\.cpp")) "")) #t)
+                failing-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


  reply	other threads:[~2016-09-09 12:16 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-13 17:15 [PATCH] gnu: Add dlib Marius Bakke
2016-08-14 17:25 ` Leo Famulari
2016-08-14 19:52   ` Marius Bakke
2016-08-15  7:43     ` Alex Kost
2016-08-15 11:51       ` Marius Bakke
2016-08-15 20:15         ` Leo Famulari
2016-08-15 20:29           ` Marius Bakke
2016-08-15 22:28             ` Leo Famulari
2016-08-16  0:15               ` Ben Woodcroft
2016-08-16 10:45                 ` Marius Bakke
2016-08-16 20:47                   ` Leo Famulari
2016-08-16 23:31                     ` Ben Woodcroft
2016-08-16 23:45                       ` Leo Famulari
2016-08-17  3:24                         ` Ben Woodcroft
2016-08-17  5:01                           ` Ben Woodcroft
2016-08-17 14:48                           ` Marius Bakke
2016-08-18 20:23                             ` Leo Famulari
2016-08-19 10:52                               ` Marius Bakke
2016-08-21 20:17                                 ` Leo Famulari
2016-08-22  2:30                                   ` Ben Woodcroft
2016-08-22 12:01                                     ` Marius Bakke
2016-08-23 18:33                                       ` Marius Bakke
2016-08-24 10:26                                         ` Marius Bakke
2016-08-24 17:26                                           ` Leo Famulari
2016-08-24 19:08                                             ` Marius Bakke
2016-08-24 22:51                                               ` Ben Woodcroft
2016-08-30 14:43                                               ` Marius Bakke
2016-08-31 19:09                                                 ` Leo Famulari
2016-09-09 12:15                                                   ` Marius Bakke [this message]
2016-09-10 12:32                                                     ` Marius Bakke
2016-09-10 18:16                                                       ` Leo Famulari
2016-09-13  5:14                                                         ` Leo Famulari
2016-09-13  5:14                                                       ` Leo Famulari
2016-08-18 20:18                           ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874m5ps1zk.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me \
    --to=mbakke@fastmail.com \
    --cc=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=leo@famulari.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.