Chnage IOR to AutotoolsPackage; remove hard-coded mpicc path (#5318)
This commit is contained in:
parent
3bb243e8e2
commit
ba5b17d28a
1 changed files with 15 additions and 13 deletions
|
@ -23,10 +23,9 @@
|
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Ior(Package):
|
||||
class Ior(AutotoolsPackage):
|
||||
"""The IOR software is used for benchmarking parallel file systems
|
||||
using POSIX, MPI-IO, or HDF5 interfaces."""
|
||||
|
||||
|
@ -38,17 +37,23 @@ class Ior(Package):
|
|||
variant('hdf5', default=False, description='support IO with HDF5 backend')
|
||||
variant('ncmpi', default=False, description='support IO with NCMPI backend')
|
||||
|
||||
depends_on('autoconf', type='build')
|
||||
depends_on('automake', type='build')
|
||||
depends_on('libtool', type='build')
|
||||
depends_on('m4', type='build')
|
||||
depends_on('mpi')
|
||||
depends_on('hdf5+mpi', when='+hdf5')
|
||||
depends_on('hdf5+mpi', when='+hdf5')
|
||||
depends_on('parallel-netcdf', when='+ncmpi')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
os.system('./bootstrap')
|
||||
@run_before('autoreconf')
|
||||
def bootstrap(self):
|
||||
Executable('./bootstrap')()
|
||||
|
||||
config_args = [
|
||||
'MPICC=%s' % spec['mpi'].prefix.bin + '/mpicc',
|
||||
'--prefix=%s' % prefix,
|
||||
]
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
config_args = []
|
||||
|
||||
env['CC'] = spec['mpi'].mpicc
|
||||
|
||||
if '+hdf5' in spec:
|
||||
config_args.append('--with-hdf5')
|
||||
|
@ -61,7 +66,4 @@ def install(self, spec, prefix):
|
|||
else:
|
||||
config_args.append('--without-ncmpi')
|
||||
|
||||
configure(*config_args)
|
||||
|
||||
make()
|
||||
make('install')
|
||||
return config_args
|
||||
|
|
Loading…
Reference in a new issue