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

dstrubbe at macports.org dstrubbe at macports.org
Sat Dec 12 03:14:39 PST 2015


Revision: 141843
          https://trac.macports.org/changeset/141843
Author:   dstrubbe at macports.org
Date:     2015-10-29 11:01:49 -0700 (Thu, 29 Oct 2015)
Log Message:
-----------
berkeleygw:
* Fix cpp issues by disabling use of gcc5, gcc6, clang for C, and modifying configure for llvm-gcc42. (A new version of the code is needed to enable use of these other cpp's.)
* Add cc and cxx to compilers.choose so we use more modern GCC rather than llvm-gcc42 when a GCC variant is selected.
* Comment on why dragonegg is not selected.
* Select appropriate number of MPI tasks for test based on hardware.
* Remove unnecessary specification 'test.cmd make' which is the default.

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

Modified: trunk/dports/science/berkeleygw/Portfile
===================================================================
--- trunk/dports/science/berkeleygw/Portfile	2015-10-29 17:47:56 UTC (rev 141842)
+++ trunk/dports/science/berkeleygw/Portfile	2015-10-29 18:01:49 UTC (rev 141843)
@@ -27,9 +27,18 @@
                     port:fftw
 # fftw port always has a Fortran variant
 
+# fine for C and C++, but not for cpp on Fortran here
+compiler.blacklist  *clang*
+
 # test hangs in Epsilon with OpenMPI, for unknown reason.
-compilers.choose    fc cpp
-mpi.setup           require_fortran -dragonegg -openmpi -openmpi_devel
+# no appropriate way to set cpp for gcc5, gcc6, or clang
+# dragonegg fails to link with error
+#   Undefined symbols for architecture x86_64:
+#   "_llvm.objectsize.i64", referenced from:
+#   _spg_get_international in libsymspg.a(spglib.o)
+#   _spg_get_schoenflies in libsymspg.a(spglib.o)
+compilers.choose    fc cc cxx cpp
+mpi.setup           require_fortran -dragonegg -openmpi -openmpi_devel -gcc5 -gcc6
 
 if {[mpi_variant_isset]} {
     depends_lib-append  port:scalapack
@@ -56,12 +65,16 @@
 destroot.post_args  INSTDIR=${destroot}${prefix}
 
 test.run            yes
-test.cmd            make
 
 pre-test {
     if {[mpi_variant_isset]} {
         test.args           TESTSCRIPT="MPIEXEC=${prefix}/bin/${mpi.exec} make check-parallel"
         test.target         check-jobscript
+
+        if {![catch {sysctl hw.ncpu} ncpus]} {
+            test.env-append OCT_TEST_NJOBS=$ncpus
+        }
+        ui_msg "Running testsuite in parallel with $ncpus MPI tasks"       
     } else {
         test.target         check
     }
@@ -71,14 +84,15 @@
     For the purposes of record-keeping and support, please register an account at www.berkeleygw.org.
 }
 
-# more options that could be added: threads, openmpi, mpich
+# more options that could be added: threads, OpenBLAS, Accelerate
 
 pre-build {
     build.args      LINK="${configure.fc}" CC_COMP=${configure.cxx} C_COMP=${configure.cc} C_LINK=${configure.cxx} \
                     LAPACKLIB="-L${prefix}/lib/ -lsatlas"
 
+    # +g95 must be working in conjunction with +llvm
     if {[variant_isset g95]} {
-                    build.args-append COMPFLAG="-DG95" FCPP="${configure.cc} -P -E -ansi" \
+                    build.args-append COMPFLAG="-DG95" FCPP="${configure.cpp} -P -ansi" \
                         F90free="${prefix}/bin/g95 -ffree-form -ffree-line-length-huge -fno-second-underscore" \
                         MOD_OPT="-fmod="
         # test, destroot args needed just to avoid trying to build in the test/openmp directory unnecessarily
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/1a72d9fc/attachment.html>


More information about the macports-changes mailing list