[141098] trunk/dports/science/octopus
dstrubbe at macports.org
dstrubbe at macports.org
Sat Oct 10 12:54:07 PDT 2015
Revision: 141098
https://trac.macports.org/changeset/141098
Author: dstrubbe at macports.org
Date: 2015-10-10 12:54:07 -0700 (Sat, 10 Oct 2015)
Log Message:
-----------
octopus:
* Update to 5.0.0.
* New patches.
* Run testsuite with automatically determined job parallelism.
* Better MPI/ScaLAPACK error checking.
Modified Paths:
--------------
trunk/dports/science/octopus/Portfile
Added Paths:
-----------
trunk/dports/science/octopus/files/
trunk/dports/science/octopus/files/patch-m4-metis.m4.diff
trunk/dports/science/octopus/files/patch-testsuite-linear_response-05-polarizability.test.diff
Removed Paths:
-------------
trunk/dports/science/octopus/files/
Modified: trunk/dports/science/octopus/Portfile
===================================================================
--- trunk/dports/science/octopus/Portfile 2015-10-10 19:45:40 UTC (rev 141097)
+++ trunk/dports/science/octopus/Portfile 2015-10-10 19:54:07 UTC (rev 141098)
@@ -5,8 +5,7 @@
PortGroup mpi 1.0
name octopus
-version 4.1.2
-revision 4
+version 5.0.0
categories science
platforms darwin
license GPL-2+
@@ -22,32 +21,42 @@
homepage http://www.tddft.org/programs/octopus
master_sites ${homepage}/download/${version}
-checksums rmd160 0ce62e38bed99e436b83489375fe55e53e64a538 \
- sha256 c43ac301ff035caee667292841c5d9f166da986634cf2623e3f5a8aa86fe7a69
+checksums rmd160 2015e1adeab2ee00f87c0ee9a7eac21ee81b8666 \
+ sha256 47ed2a61022d20107bd9d8b05b65483fa280519833e93f2c79bbb51b8e3bea8b
-# dragonegg freezes when building; no acceptable way to set FCCPP for gcc5 or gcc6;
-# clang versions are unnecessary and may cause FCCPP trouble too
-mpi.setup require_fortran -dragonegg -gcc5 -gcc6 -clang
+# clang38: errors on operate.o
+compiler.blacklist macports-clang-3.8
+
+# dragonegg freezes when building; no acceptable way to set FCCPP for gcc5 or gcc6 though gfortran is ok;
+# clang versions are unnecessary
+# dragonegg34-gcc46 segfaults on varia.c
+mpi.setup require_fortran -dragonegg34 -gcc5 -gcc6 -clang
+# dragonegg
compilers.enforce_fortran libxc
depends_lib port:atlas port:libxc port:fftw-3 port:gsl
+# openblas or accelerate/veclibfort instead of atlas?
configure.args --with-libxc-prefix=${prefix} --with-blas=-lsatlas \
--disable-gdlib --without-sparskit --with-netcdf-prefix=no \
--with-etsf-io-prefix=no --with-berkeleygw-prefix=no \
- --with-arpack=no --with-libfm=no --with-pfft-prefix=no \
+ --with-arpack=no --with-parpack=no --with-feast=no \
+ --with-isf-prefix=no --with-pnfft-prefix=no --with-metis-prefix=no \
+ --with-parmetis-prefix=no --with-libfm=no --with-pfft-prefix=no \
--with-pspio-prefix=no --with-nfft=no --with-blacs=no \
- --with-scalapack=no --enable-utils
+ --with-scalapack=no
# configure will find and use these other libraries unless they are explicitly disabled
configure.optflags -O3
default_variants +newuoa
# FIXME: does fortran default variant not happen in time to make fftw-3 get
# installed +gcc48?
+# gfortran -> gfortran5?
-# Update test results for libxc 2.1.0 (distribution has results for libxc 2.0.0)
-patchfiles patch-testsuite-periodic_systems-07-tb09.test.diff \
- patch-testsuite-functionals-03-xc.test.diff
+# patches: (1) needed to make "--with-metis-prefix=no" work
+# (2) widen a tolerance so all tests pass
+patchfiles patch-configure.diff \
+ patch-testsuite-linear_response-05-polarizability.test.diff
pre-fetch {
if {[fortran_active_variant_name fftw-3] eq ""} {
@@ -56,42 +65,41 @@
}
}
-pre-configure {
- # note: from version 5.0 the configure script will handle this
- if {[variant_isset llvm]} {
- configure.args-append FCCPP="${configure.cc} -x c -E -ansi"
- } elseif {[string match *cpp-mp-* ${configure.cpp}]} {
- # gcc's cpp will not accept the -E flag
- configure.args-append FCCPP="${configure.cpp} -ansi"
- } else {
- # clang
- configure.args-append FCCPP="${configure.cc} -E -ansi"
- }
-}
-
if {[mpi_variant_isset]} {
configure.args-delete --disable-mpi
- configure.args-append --enable-mpi --without-external_zoltan
+ configure.args-append --enable-mpi
}
# More options that could be added:
-# variants: berkeleygw, openmp, threads (for fftw, atlas?), arpack
-# no way to turn off PAPI.
+# variants: berkeleygw, openmp, threads (for fftw, atlas?), (p)arpack, maxdim4, metis, parmetis
+# no way to turn off PAPI, but there is no port for this anyway.
# libxc does not have universal variant, so octopus cannot either
universal_variant no
test.run yes
-test.target check-full
+test.target check
pre-test {
+ # emulate some behavior from octopus development version
+ if {![catch {sysctl hw.ncpu} result]} {
+ if {[mpi_variant_isset]} {
+ set njobs [expr {$result/4}]
+ } else {
+ set njobs $result
+ }
+ } else {
+ set njobs 1
+ }
+ test.env-append OCT_TEST_NJOBS=$njobs
+ ui_msg "Running testsuite with $njobs jobs in parallel"
+
if {[mpi_variant_isset]} {
test.env-append MPIEXEC=${prefix}/bin/${mpi.exec}
}
- if {[variant_isset openmpi] || [variant_isset openmpi-devel]} {
- ui_msg "Note: Test with OpenMPI may hang after periodic_systems/03-sodium_chain.02-ground_state_disp.inp."
- ui_msg "This does not seem necessarily to indicate a problem with the build."
- }
+
+ # test infrastructure uses /bin/ps for job parallelism which is forbidden by sandboxing
+ append portsandbox_profile " (allow process-exec (literal \"/bin/ps\") (with no-profile))"
}
variant newuoa description {Build with internal newuoa library for optimal control} {
@@ -129,13 +137,24 @@
configure.args-append --with-blacs=-lscalapack
depends_lib-append port:scalapack
+ if {![mpi_variant_isset]} {
+ ui_error "+scalapack requires an MPI variant. Choose +mpich, +mpich_devel, +openmpi, or +openmpi_devel."
+ return -code error "+scalapack requires an MPI variant."
+ }
+
mpi.setup require
# FIXME: this unnecessarily enforces scalapack had same C compiler as we are using.
# also, if +scalapack but no MPI is used, an internal error from active_variants
# is produced rather than saying you need MPI or just adding it to variants as intended.
+ # Error: active_variants: Error: invalid port depspec ''
+ # Error: expecting either: port or (bin|lib|path):foo:port
mpi.enforce_variant scalapack
}
livecheck.type regex
livecheck.url ${homepage}/wiki/index.php/Main_Page
livecheck.regex ${name} (\[0-9.\]+)
+
+
+# Match beta xxx :
+# Calculated value : 0.38356457E+00
Added: trunk/dports/science/octopus/files/patch-m4-metis.m4.diff
===================================================================
--- trunk/dports/science/octopus/files/patch-m4-metis.m4.diff (rev 0)
+++ trunk/dports/science/octopus/files/patch-m4-metis.m4.diff 2015-10-10 19:54:07 UTC (rev 141098)
@@ -0,0 +1,39 @@
+--- m4/metis.m4.orig 2015-02-26 16:20:51.000000000 -0500
++++ m4/metis.m4 2015-10-09 10:46:57.000000000 -0400
+@@ -15,7 +15,7 @@
+ ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ ## 02110-1301, USA.
+ ##
+-## $Id: metis.m4 13225 2015-02-26 21:20:25Z dstrubbe $
++## $Id: metis.m4 14659 2015-10-09 14:17:20Z dstrubbe $
+ ##
+
+ AC_DEFUN([ACX_PATH_METIS], [
+@@ -31,15 +31,15 @@
+ AC_REQUIRE([AC_PROG_CC])
+
+ AC_ARG_WITH([metis-prefix],
+- [AC_HELP_STRING([--with-metis-prefix],
++ [AS_HELP_STRING([--with-metis-prefix=DIR],
+ [Directory where external METIS library was installed (must be single-precision)])])
+
+ case $with_metis_prefix in
+- no ) acx_external_metis=disabled ;;
++ no ) acx_external_metis=no ;;
+ "") with_metis_prefix="/usr" ;;
+ esac
+
+- if test x"$acx_external_metis" != xdisabled; then
++ if test x"$acx_external_metis" != xno; then
+
+ dnl Backup CFLAGS and LIBS
+ acx_metis_save_CFLAGS="$CFLAGS"
+@@ -86,6 +86,8 @@
+
+ CFLAGS="$acx_metis_save_CFLAGS"
+ LIBS="$acx_metis_save_LIBS"
++ else
++ AC_MSG_RESULT([disabled])
+ fi
+
+ if test x"$acx_external_metis" = xno ; then
Added: trunk/dports/science/octopus/files/patch-testsuite-linear_response-05-polarizability.test.diff
===================================================================
--- trunk/dports/science/octopus/files/patch-testsuite-linear_response-05-polarizability.test.diff (rev 0)
+++ trunk/dports/science/octopus/files/patch-testsuite-linear_response-05-polarizability.test.diff 2015-10-10 19:54:07 UTC (rev 141098)
@@ -0,0 +1,11 @@
+--- testsuite/linear_response/05-polarizability.test (revision 14663)
++++ testsuite/linear_response/05-polarizability.test (working copy)
+@@ -35,7 +35,7 @@
+ match ; Born charge diff; GREPFIELD(em_resp_fd/Born_charges, "Discrepancy", 3, 4) ; 0.003975
+
+ # These values should all be zero by symmetry.
+-Precision : 0.6
++Precision : 0.75
+ match ; beta xxx ; GREPFIELD(em_resp_fd/beta, "beta xxx", 3); -0.325014735
+ Precision : 0.3
+ match ; beta zxy ; GREPFIELD(em_resp_fd/beta, "beta zxy", 3); 0.316842919
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151010/a48b1356/attachment.html>
More information about the macports-changes
mailing list