From patchwork Thu May 5 21:28:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 39122 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3DE6527BBEA; Thu, 5 May 2022 22:29:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E974927BBE9 for ; Thu, 5 May 2022 22:29:10 +0100 (BST) Received: from localhost ([::1]:33106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmj26-0000Ac-1w for patchwork@mira.cbaines.net; Thu, 05 May 2022 17:29:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmj1y-00008e-HX for guix-patches@gnu.org; Thu, 05 May 2022 17:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmj1y-0002y2-8S for guix-patches@gnu.org; Thu, 05 May 2022 17:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nmj1y-0000SW-5x for guix-patches@gnu.org; Thu, 05 May 2022 17:29:02 -0400 Subject: bug#52124: [PATCH 0/1] Add n2p2-lib Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Thu, 05 May 2022 21:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 52124 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: othacehe@gnu.org, 52124-done@debbugs.gnu.org, Pierre-Antoine Bouttier Mail-Followup-To: 52124@debbugs.gnu.org, ludo@gnu.org, zimon.toutoune@gmail.com Received: via spool by 52124-done@debbugs.gnu.org id=D52124.16517861281740 (code D ref 52124); Thu, 05 May 2022 21:29:01 +0000 Received: (at 52124-done) by debbugs.gnu.org; 5 May 2022 21:28:48 +0000 Received: from localhost ([127.0.0.1]:46639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmj1j-0000Rz-TI for submit@debbugs.gnu.org; Thu, 05 May 2022 17:28:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmj1h-0000Rj-Nk for 52124-done@debbugs.gnu.org; Thu, 05 May 2022 17:28:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmj1c-0002u9-8I; Thu, 05 May 2022 17:28:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=lwJfGS8Yox7UwCzqYPl8F+bo/P+v+QluDfHlHw2v1Ro=; b=lyjMJCnc3umofPI8A+04 VChL3Q54b9luE6i3AmzMv6bK3G2TW6b0aSYt9Ipzx/DfpLZgxcH+y17jnGmiAJiASlHJFeya+VtsA pjRNoVpPo8grtivPXtTzZkCL2mQ3Bt0JR17DmbGVkhXqASR10Fo/5rGak7+ly5HucyO0OjbwgM1da j6eqhvBBM/QIjIPRUJZlOFdSj3DGxRTL+vUbyOM3yEVvbUeo0Kc9nBUrjB2V3qmTEm5qpqhcvMWYH l3L53cUzOjpTqlJH+o/dOzsZDzQgmm11tSLOwD2Zvb631EujmXNGMuI2Y5a6LUKlIYD+wDWO77bqW e2URU9RzSxpUuA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59734 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmj1b-0001vp-Qk; Thu, 05 May 2022 17:28:40 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= References: <20211126130824.361671-1-zimon.toutoune@gmail.com> <20211206152422.121776-1-zimon.toutoune@gmail.com> Date: Thu, 05 May 2022 23:28:37 +0200 In-Reply-To: <20211206152422.121776-1-zimon.toutoune@gmail.com> (zimoun's message of "Mon, 6 Dec 2021 16:24:22 +0100") Message-ID: <87wnez654q.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi, zimoun skribis: > From: Pierre-Antoine Bouttier > > * 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’. 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