GNU bug report logs - #52124
[PATCH 0/1] Add n2p2-lib

Previous Next

Package: guix-patches;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Fri, 26 Nov 2021 13:09:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#52124: closed ([PATCH 0/1] Add n2p2-lib)
Date: Thu, 05 May 2022 21:29:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 05 May 2022 23:28:37 +0200
with message-id <87wnez654q.fsf_-_ <at> gnu.org>
and subject line Re: bug#52124: [PATCH 0/1] Add n2p2-lib
has caused the debbugs.gnu.org bug report #52124,
regarding [PATCH 0/1] Add n2p2-lib
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
52124: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52124
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: zimoun <zimon.toutoune <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH 0/1] Add n2p2-lib
Date: Fri, 26 Nov 2021 14:08:24 +0100
Hi,

This adds n2p2-lib.  It is an example from Café Guix.

Cheers,
simon


Pierre-Antoine Bouttier (1):
  gnu: Add n2p2-lib.

 gnu/packages/maths.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

-- 
2.33.1



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: othacehe <at> gnu.org, 52124-done <at> debbugs.gnu.org,
 Pierre-Antoine Bouttier <pierre-antoine.bouttier <at> univ-grenoble-alpes.fr>
Subject: Re: bug#52124: [PATCH 0/1] Add n2p2-lib
Date: Thu, 05 May 2022 23:28:37 +0200
[Message part 4 (text/plain, inline)]
Hi,

zimoun <zimon.toutoune <at> gmail.com> skribis:

> From: Pierre-Antoine Bouttier <pierre-antoine.bouttier <at> univ-grenoble-alpes.fr>
>
> * gnu/packages/maths.scm (n2p2-lib): New variable.

The ‘install’ phase was not installing anything, so I had to adjust it.
I also fixed a couple of other issues—patch below.

Finally applied, thanks!

Ludo’.

[Message part 5 (text/x-patch, inline)]
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 613b52f5aa..efa453659c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1855,7 +1855,7 @@ (define-public netcdf-fortran
 
 (define-public n2p2-lib
   (package
-    (name "n2p2-lib")
+    (name "n2p2")
     (version "2.1.4")
     (source (origin
               (method git-fetch)
@@ -1879,8 +1879,13 @@ (define-public n2p2-lib
                                (assoc-ref inputs "eigen") "/include/eigen3")))
              (substitute* "src/makefile.gnu"
                (("-lblas")
-                (string-append "-L"
-                               (assoc-ref inputs "openblas") "/lib -lopenblas")))))
+                (string-append "-L" (assoc-ref inputs "openblas")
+                               "/lib -lopenblas"))
+               (("-march=native")
+                ""))
+             (substitute* "src/application/makefile"
+               (("LDFLAGS=")
+                "LDFLAGS=-Wl,-rpath='$$ORIGIN/../lib' "))))
          (delete 'configure)
          (delete 'check)
          (replace 'install
@@ -1889,23 +1894,23 @@ (define-public n2p2-lib
                     (bindir (string-append out "/bin"))
                     (libdir (string-append out "/lib"))
                     (incdir (string-append out "/include")))
+               (for-each (lambda (f) (install-file f bindir))
+                         (find-files "bin" "^nnp-"))
                (for-each (lambda (f) (install-file f libdir))
-                         (find-files "../lib/" "."))
+                         (find-files "lib" "\\.so$"))
                (for-each (lambda (f) (install-file f incdir))
-                         (find-files "../include/" "."))))))))
+                         (find-files "include" "\\.h$"))))))))
     (inputs
-     `(("openmpi" ,openmpi)
-       ("gsl" ,gsl)
-       ("openblas" ,openblas)
-       ("eigen" ,eigen)))
+     (list openmpi gsl openblas eigen))
     (synopsis "Neural network potentials for chemistry and physics")
     (description "This package contains software that will allow you to use
 existing neural network potential parameterizations to predict energies and
 forces (with standalone tools but also in conjunction with the MD software
-LAMMPS). In addition it is possible to train new neural network potentials
+LAMMPS).  In addition it is possible to train new neural network potentials
 with the provided training tools.")
-    (home-page "https://compphysvienna.github.io/n2p2")
-    (license license:gpl3)))
+    (home-page "https://compphysvienna.github.io/n2p2/")
+    (properties '((tunable? . #t)))        ;to benefit from SIMD code in Eigen
+    (license license:gpl3+)))
 
 (define-public nlopt
   (package

This bug report was last modified 3 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.