[153335] trunk/dports/science/gromacs/Portfile

dstrubbe at macports.org dstrubbe at macports.org
Wed Sep 28 21:55:40 PDT 2016


Revision: 153335
          https://trac.macports.org/changeset/153335
Author:   dstrubbe at macports.org
Date:     2016-09-28 21:55:39 -0700 (Wed, 28 Sep 2016)
Log Message:
-----------
gromacs: Fix testing, via some hacks of dylibs. Enable choice of linear algebra library, rather than just using whatever the cmake configure can find (OpenBLAS in fact being its preference).

Modified Paths:
--------------
    trunk/dports/science/gromacs/Portfile

Modified: trunk/dports/science/gromacs/Portfile
===================================================================
--- trunk/dports/science/gromacs/Portfile	2016-09-29 04:52:56 UTC (rev 153334)
+++ trunk/dports/science/gromacs/Portfile	2016-09-29 04:55:39 UTC (rev 153335)
@@ -5,8 +5,10 @@
 PortGroup           muniversal 1.0
 PortGroup           cmake 1.0
 PortGroup           mpi 1.0
+PortGroup           linear_algebra 1.0
 
 name                gromacs
+revision            1
 version             5.1.4
 categories          science math
 license             GPL-2
@@ -52,26 +54,40 @@
 #:info:configure   recent version, or a different compiler.  For now, we are proceeding by
 #:info:configure   turning off OpenMP.
 
-# FIXME: give choice of BLAS/LAPACK. uses dgemm.
-
 compilers.choose    cc cxx
 mpi.setup
 
 test.run     yes
 test.target  check
-test.env-append DYLD_LIBRARY_PATH=${worksrcpath}/lib
+pre-test {
+    if {[mpi_variant_isset]} {
+        set suffix _mpi
+    } else {
+        set suffix ""
+    }
+    system -W ${worksrcpath} "install_name_tool -change ${prefix}/lib/libgromacs${suffix}.1.dylib @executable_path/../lib/libgromacs${suffix}.1.dylib bin/gmx${suffix}"
+    # reset name for new executables that will be built in this phase
+    system -W ${worksrcpath} "install_name_tool -id @executable_path/../lib/libgromacs${suffix}.1.dylib lib/libgromacs${suffix}.1.dylib"
+}
+post-test {
+    # undo changes, in case 'install' is done afterward
+    system -W ${worksrcpath} "install_name_tool -change @executable_path/../lib/libgromacs${suffix}.1.dylib ${prefix}/lib/libgromacs.1.dylib bin/gmx${suffix}"
+    system -W ${worksrcpath} "install_name_tool -id ${prefix}/lib/libgromacs${suffix}.1.dylib lib/libgromacs${suffix}.1.dylib"
+}
 
 # I encountered this problem with the last test, when using MPI:
-#Program mdrun-mpi-test, VERSION 5.1.1
+#Program mdrun-mpi-test, VERSION 5.1.4
 #Memory allocation/freeing error:
 #Character buffer too small!
 #For more information and tips for troubleshooting, please check the GROMACS
 #website at http://www.gromacs.org/Documentation/Errors
 
+linalg.setup  noveclibfort
 pre-configure {
     if {[mpi_variant_isset]} {
         configure.args-append  -DGMX_MPI:BOOL=ON -DMPIEXEC:STRING="${mpi.exec}"
     }
+    configure.args-append      -DGMX_BLAS_USER="${linalglib}"
 }
 
 variant double description "Build in double precision" {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160928/c1a09c53/attachment.html>


More information about the macports-changes mailing list