diff options
author | danielsjensen1 <danielsjensen1@gmail.com> | 2017-01-15 03:30:47 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-01-15 02:30:47 -0800 |
commit | 957cb968c619e32fc764babb8dc8ed977b42c789 (patch) | |
tree | b2a77bfb44f58c5727020568dba508d2a853b51f /var | |
parent | c6c6773c03098f2eb22619ddde90ce3ebfcbc99b (diff) | |
download | spack-957cb968c619e32fc764babb8dc8ed977b42c789.tar.gz spack-957cb968c619e32fc764babb8dc8ed977b42c789.tar.bz2 spack-957cb968c619e32fc764babb8dc8ed977b42c789.tar.xz spack-957cb968c619e32fc764babb8dc8ed977b42c789.zip |
Features/octopus 6.0 (#2819)
* Added support for Octopus 6.0 and the optional libraries: metis, parmetis, netcdf, arpack-ng, and scalapack.
* Fix PEP 8 line too long error.
* Changed format syntax {} to {0} to support Python 2.6.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/octopus/package.py | 61 |
1 files changed, 53 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py index a100f7896a..b74befbe35 100644 --- a/var/spack/repos/builtin/packages/octopus/package.py +++ b/var/spack/repos/builtin/packages/octopus/package.py @@ -30,22 +30,47 @@ class Octopus(Package): theory code.""" homepage = "http://www.tddft.org/programs/octopus/" - url = "http://www.tddft.org/programs/octopus/down.php?file=5.0.1/octopus-5.0.1.tar.gz" + base_url = "http://www.tddft.org/programs/octopus/down.php?file=" + version('6.0', '5d1168c2a8d7fd9cb9492eaebaa7182e') version('5.0.1', '2b6392ab67b843f9d4ca7413fc07e822') + # Sample url is: + # "http://www.tddft.org/programs/octopus/down.php?file=5.0.1/octopus-5.0.1.tar.gz" + def url_for_version(self, version): + return '{0}/{1}/octopus-{1}.tar.gz'.format(Octopus.base_url, + version.dotted) + + variant('scalapack', default=False, + description='Compile with Scalapack') + variant('metis', default=True, + description='Compile with METIS') + variant('parmetis', default=False, + description='Compile with ParMETIS') + variant('netcdf', default=False, + description='Compile with Netcdf') + variant('arpack-ng', default=False, + description='Compile with ARPACK-ng') + depends_on('blas') depends_on('gsl') depends_on('lapack') depends_on('libxc') depends_on('mpi') depends_on('fftw+mpi') + depends_on('metis@5:', when='+metis') + depends_on('parmetis', when='+parmetis') + depends_on('scalapack', when='+scalapack') + depends_on('netcdf-fortran', when='+netcdf') + depends_on('arpack-ng', when='+arpack-ng') # optional dependencies: - # TODO: scalapack, metis, parmetis, netcdf, etsf-io, sparskit, arpack, + # TODO: parmetis, etsf-io, sparskit, # feast, libfm, pfft, isf, pnfft def install(self, spec, prefix): + arpack = find_libraries(['libarpack'], root=spec[ + 'arpack-ng'].prefix.lib, shared=True) lapack = spec['lapack'].lapack_libs blas = spec['blas'].blas_libs args = [] @@ -58,17 +83,37 @@ class Octopus(Package): 'CC=%s' % spec['mpi'].mpicc, 'FC=%s' % spec['mpi'].mpifc, '--enable-mpi', - '--with-fft-lib=-L%s -lfftw3' % spec['fftw'].prefix.lib - # --with-blacs=${prefix}/lib/libscalapack.dylib - # --with-netcdf-prefix=netcdf-fortran + '--with-fft-lib=-L%s -lfftw3' % spec['fftw'].prefix.lib, + ]) + if '+metis' in spec: + args.extend([ + '--with-metis-prefix=%s' % spec['metis'].prefix, + ]) + if '+parmetis' in spec: + args.extend([ + '--with-parmetis-prefix=%s' % spec['parmetis'].prefix, + ]) + if '+netcdf' in spec: + args.extend([ + '--with-netcdf-prefix=%s' % spec['netcdf-fortran'].prefix, + '--with-netcdf-include=%s' % + spec['netcdf-fortran'].prefix.include, + ]) + if '+arpack-ng' in spec: + args.extend([ + '--with-arpack={0}'.format(arpack.joined()), + ]) + if '+scalapack' in spec: + args.extend([ + '--with-blacs=%s' % spec['scalapack'].scalapack_libs, + '--with-scalapack=%s' % spec['scalapack'].scalapack_libs, + ]) # --with-etsf-io-prefix= # --with-sparskit=${prefix}/lib/libskit.a # --with-pfft-prefix=${prefix} --with-mpifftw-prefix=${prefix} - # --with-arpack=${prefix}/lib/libarpack.dylib # --with-parpack=${prefix}/lib/libparpack.dylib - # --with-metis-prefix=${prefix} --with-parmetis-prefix=${prefix} + # --with-parmetis-prefix=${prefix} # --with-berkeleygw-prefix=${prefix} - ]) # When preprocessor expands macros (i.e. CFLAGS) defined as quoted # strings the result may be > 132 chars and is terminated. |