[148126] trunk/dports/science/quantum-espresso/Portfile
dstrubbe at macports.org
dstrubbe at macports.org
Wed Apr 27 10:28:46 PDT 2016
Revision: 148126
https://trac.macports.org/changeset/148126
Author: dstrubbe at macports.org
Date: 2016-04-27 10:28:46 -0700 (Wed, 27 Apr 2016)
Log Message:
-----------
quantum-espresso: Set mpirun flags appropriately for parallel tests with images, so they pass. Enclose variables in quotes for safety.
Modified Paths:
--------------
trunk/dports/science/quantum-espresso/Portfile
Modified: trunk/dports/science/quantum-espresso/Portfile
===================================================================
--- trunk/dports/science/quantum-espresso/Portfile 2016-04-27 14:45:55 UTC (rev 148125)
+++ trunk/dports/science/quantum-espresso/Portfile 2016-04-27 17:28:46 UTC (rev 148126)
@@ -58,11 +58,13 @@
if {[mpi_variant_isset]} {
if {![catch {sysctl hw.ncpu} result]} {
set njobs $result
+ set n2jobs [expr {$result*2}]
} else {
set njobs 1
+ set n2jobs 1
}
reinplace -W ${worksrcpath} "s|PARA_PREFIX=\" \"|PARA_PREFIX=\"${mpi.exec} -n ${njobs}\"|" environment_variables
- reinplace -W ${worksrcpath} "s|PARA_IMAGE_PREFIX=\"mpirun -np 4\"|PARA_IMAGE_PREFIX=\"${mpi.exec} -n 2\"|" environment_variables
+ reinplace -W ${worksrcpath} "s|PARA_IMAGE_PREFIX=\"mpirun -np 4\"|PARA_IMAGE_PREFIX=\"${mpi.exec} -n ${n2jobs}\"|" environment_variables
}
}
@@ -93,8 +95,8 @@
set linalg ${prefix}/lib/libsatlas.dylib
# using cpp separately does not work because it tries to output .f90 to .F90, which is the same file in OSX
configure.args-append FC=${configure.fc} F90FLAGS="${configure.fcflags} -x f95-cpp-input" \
- F77="${configure.fc}" FFLAGS="${configure.fflags}" F90=${configure.fc} \
- CC=${configure.cc} CFLAGS="${configure.cflags}" \
+ F77="${configure.fc}" FFLAGS="${configure.fflags}" F90="${configure.fc}" \
+ CC="${configure.cc}" CFLAGS="${configure.cflags}" \
BLAS_LIBS="${linalg}" LAPACK_LIBS="${linalg}" FFT_LIBS="${prefix}/lib/libfftw3.dylib" \
--prefix=${destroot}${prefix}/bin --with-scalapack=no
# install anything else? e.g. pseudos?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160427/04d2fa82/attachment.html>
More information about the macports-changes
mailing list