[128393] trunk/dports/science/berkeleygw/Portfile

dstrubbe at macports.org dstrubbe at macports.org
Thu Nov 20 10:23:26 PST 2014


Revision: 128393
          https://trac.macports.org/changeset/128393
Author:   dstrubbe at macports.org
Date:     2014-11-20 10:23:26 -0800 (Thu, 20 Nov 2014)
Log Message:
-----------
berkeleygw: Enable support for MPI variants with scalapack.

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

Modified: trunk/dports/science/berkeleygw/Portfile
===================================================================
--- trunk/dports/science/berkeleygw/Portfile	2014-11-20 17:42:57 UTC (rev 128392)
+++ trunk/dports/science/berkeleygw/Portfile	2014-11-20 18:23:26 UTC (rev 128393)
@@ -2,7 +2,7 @@
 # $Id$
 
 PortSystem          1.0
-PortGroup           compilers 1.0
+PortGroup           mpi 1.0
 
 name                berkeleygw
 version             1.0.6
@@ -25,21 +25,31 @@
 
 depends_lib         port:atlas \
                     port:fftw
-# do we need Fortran variant for fftw?
+# fftw port always has a Fortran variant
 
+# test hangs in Epsilon with OpenMPI, for unknown reason.
 compilers.choose    fc cpp
-compilers.setup     require_fortran -dragonegg
+mpi.setup           require_fortran -dragonegg -openmpi -openmpi_devel
 
 if {![fortran_variant_isset]} {
     default_variants-append +gcc48
 }
 
+if {[mpi_variant_isset]} {
+    depends_lib-append  port:scalapack
+}
+
 # fftw is not universal
 universal_variant   no
 
 patchfiles          patch-testsuite-Silane-PARATEC-Silane.test.diff \
                     patch-Common-common-rules.mk.diff
 
+# FIXME: this unnecessarily enforces scalapack also had same C compiler as we are using.
+if {[mpi_variant_isset]} {
+    mpi.enforce_variant     scalapack
+}
+
 configure {
     system -W ${worksrcpath} "sed 's|/opt/local|${prefix}|' < config/generic.serial.macos.mk > arch.mk"
 }
@@ -51,8 +61,16 @@
 
 test.run            yes
 test.cmd            make
-test.target         check
 
+pre-test {
+    if {[mpi_variant_isset]} {
+        test.args           TESTSCRIPT="MPIEXEC=${prefix}/bin/${mpi.exec} make check-parallel"
+        test.target         check-jobscript
+    } else {
+        test.target         check
+    }
+}
+
 notes {
     For the purposes of record-keeping and support, please register an account at www.berkeleygw.org.
 }
@@ -75,8 +93,14 @@
         build.args-append FCPP="${configure.cpp} -ansi" \
             F90free="${configure.fc} -ffree-form -ffree-line-length-none -fno-second-underscore"
     }
+
+    if {[mpi_variant_isset]} {
+        build.args-append PARAFLAG="-DMPI" MATHFLAG="-DUSESCALAPACK" C_PARAFLAG="-DPARA" \
+            SCALAPACKLIB="-L/opt/local/lib/ -lscalapack"
+    }
 }
 
-livecheck.type      regex
-livecheck.url       ${master_sites}
-livecheck.regex     BGW-(\[0-9.\]+).tar
+# This is broken currently due to changes in the settings to the code's webpage.
+#livecheck.type      regex
+#livecheck.url       ${homepage}/?q=node/6
+#livecheck.regex     BGW-(\[0-9.\]+).tar.gz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141120/3c8c6aee/attachment.html>


More information about the macports-changes mailing list