Update PnetCDF to AutotoolsPackage (#2637)
This commit is contained in:
parent
d8efeabf77
commit
d24186ea84
1 changed files with 10 additions and 10 deletions
|
@ -25,7 +25,7 @@
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
class ParallelNetcdf(Package):
|
class ParallelNetcdf(AutotoolsPackage):
|
||||||
"""Parallel netCDF (PnetCDF) is a library providing high-performance
|
"""Parallel netCDF (PnetCDF) is a library providing high-performance
|
||||||
parallel I/O while still maintaining file-format compatibility with
|
parallel I/O while still maintaining file-format compatibility with
|
||||||
Unidata's NetCDF."""
|
Unidata's NetCDF."""
|
||||||
|
@ -41,13 +41,17 @@ class ParallelNetcdf(Package):
|
||||||
variant('fpic', default=True,
|
variant('fpic', default=True,
|
||||||
description='Produce position-independent code (for shared libs)')
|
description='Produce position-independent code (for shared libs)')
|
||||||
|
|
||||||
depends_on("m4", type='build')
|
depends_on('mpi')
|
||||||
depends_on("mpi")
|
|
||||||
|
depends_on('m4', type='build')
|
||||||
|
|
||||||
# See:
|
# See:
|
||||||
# https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL
|
# https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL
|
||||||
def install(self, spec, prefix):
|
def configure_args(self):
|
||||||
args = list()
|
spec = self.spec
|
||||||
|
|
||||||
|
args = ['--with-mpi={0}'.format(spec['mpi'].prefix)]
|
||||||
|
|
||||||
if '+fpic' in spec:
|
if '+fpic' in spec:
|
||||||
args.extend(['CFLAGS=-fPIC', 'CXXFLAGS=-fPIC', 'FFLAGS=-fPIC'])
|
args.extend(['CFLAGS=-fPIC', 'CXXFLAGS=-fPIC', 'FFLAGS=-fPIC'])
|
||||||
if '~cxx' in spec:
|
if '~cxx' in spec:
|
||||||
|
@ -55,8 +59,4 @@ def install(self, spec, prefix):
|
||||||
if '~fortran' in spec:
|
if '~fortran' in spec:
|
||||||
args.append('--disable-fortran')
|
args.append('--disable-fortran')
|
||||||
|
|
||||||
args.extend(["--prefix=%s" % prefix,
|
return args
|
||||||
"--with-mpi=%s" % spec['mpi'].prefix])
|
|
||||||
configure(*args)
|
|
||||||
make()
|
|
||||||
make("install")
|
|
||||||
|
|
Loading…
Reference in a new issue