abinit: fix compilation on macOS, disable internal netcdf (#3157)
* abinit: fix compilation on macOS * disable internal netcdf
This commit is contained in:
parent
0f51daff24
commit
3c5024232c
@ -25,7 +25,6 @@
|
|||||||
#
|
#
|
||||||
# Author: Matteo Giantomassi <matteo.giantomassiNOSPAM AT uclouvain.be>
|
# Author: Matteo Giantomassi <matteo.giantomassiNOSPAM AT uclouvain.be>
|
||||||
# Date: October 11, 2016
|
# Date: October 11, 2016
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
@ -63,6 +62,10 @@ class Abinit(Package):
|
|||||||
# TODO: To be tested.
|
# TODO: To be tested.
|
||||||
# It was working before the last `git pull` but now all tests crash.
|
# It was working before the last `git pull` but now all tests crash.
|
||||||
# For the time being, the default is netcdf3 and the internal fallbacks
|
# For the time being, the default is netcdf3 and the internal fallbacks
|
||||||
|
# FIXME: rename (trio?) and use multivalued variants to cover
|
||||||
|
# --with-trio-flavor={netcdf, none}
|
||||||
|
# Note that Abinit@8: does not support etsf_io anymore because it is not
|
||||||
|
# compatible with HDF5 and MPI-IO
|
||||||
variant('hdf5', default=False,
|
variant('hdf5', default=False,
|
||||||
description='Enables HDF5+Netcdf4 with MPI. WARNING: experimental')
|
description='Enables HDF5+Netcdf4 with MPI. WARNING: experimental')
|
||||||
|
|
||||||
@ -156,6 +159,8 @@ def install(self, spec, prefix):
|
|||||||
# Netcdf4/HDF5
|
# Netcdf4/HDF5
|
||||||
if "+hdf5" in spec:
|
if "+hdf5" in spec:
|
||||||
oapp("--with-trio-flavor=netcdf")
|
oapp("--with-trio-flavor=netcdf")
|
||||||
|
# Since version 8, Abinit started to use netcdf4 + hdf5 and we have
|
||||||
|
# to link with -lhdf5_hl -lhdf5
|
||||||
hdf_libs = "-L%s -lhdf5_hl -lhdf5" % spec["hdf5"].prefix.lib
|
hdf_libs = "-L%s -lhdf5_hl -lhdf5" % spec["hdf5"].prefix.lib
|
||||||
options.extend([
|
options.extend([
|
||||||
"--with-netcdf-incs=-I%s" % (
|
"--with-netcdf-incs=-I%s" % (
|
||||||
@ -164,8 +169,9 @@ def install(self, spec, prefix):
|
|||||||
spec["netcdf-fortran"].prefix.lib, hdf_libs),
|
spec["netcdf-fortran"].prefix.lib, hdf_libs),
|
||||||
])
|
])
|
||||||
else:
|
else:
|
||||||
# Use internal fallbacks (netcdf3)
|
# In Spack we do our best to avoid building any internally provided
|
||||||
oapp("--with-trio-flavor=netcdf-fallback")
|
# dependencies, such as netcdf3 in this case.
|
||||||
|
oapp("--with-trio-flavor=none")
|
||||||
|
|
||||||
configure(*options)
|
configure(*options)
|
||||||
make()
|
make()
|
||||||
|
Loading…
Reference in New Issue
Block a user