elpa: add 2017.05.002 and 2017.05.003 (#5306)
* elpa: add 2017.05.002 and 2017.05.03 * add a variant for optimization flags
This commit is contained in:
parent
34da07db9b
commit
4e878c21cd
@ -22,7 +22,6 @@
|
|||||||
# License along with this program; if not, write to the Free Software
|
# License along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
@ -32,12 +31,15 @@ class Elpa(AutotoolsPackage):
|
|||||||
homepage = 'http://elpa.mpcdf.mpg.de/'
|
homepage = 'http://elpa.mpcdf.mpg.de/'
|
||||||
url = 'http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz'
|
url = 'http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz'
|
||||||
|
|
||||||
|
version('2017.05.003', '7c8e5e58cafab212badaf4216695700f')
|
||||||
|
version('2017.05.002', 'd0abc1ac1f493f93bf5e30ec8ab155dc')
|
||||||
version('2016.11.001.pre', '5656fd066cf0dcd071dbcaf20a639b37')
|
version('2016.11.001.pre', '5656fd066cf0dcd071dbcaf20a639b37')
|
||||||
version('2016.05.004', 'c0dd3a53055536fc3a2a221e78d8b376', preferred=True)
|
version('2016.05.004', 'c0dd3a53055536fc3a2a221e78d8b376', preferred=True)
|
||||||
version('2016.05.003', '88a9f3f3bfb63e16509dd1be089dcf2c')
|
version('2016.05.003', '88a9f3f3bfb63e16509dd1be089dcf2c')
|
||||||
version('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6')
|
version('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6')
|
||||||
|
|
||||||
variant('openmp', default=False, description='Activates OpenMP support')
|
variant('openmp', default=False, description='Activates OpenMP support')
|
||||||
|
variant('optflags', default=True, description='Build with optimization flags')
|
||||||
|
|
||||||
depends_on('mpi')
|
depends_on('mpi')
|
||||||
depends_on('blas')
|
depends_on('blas')
|
||||||
@ -53,9 +55,7 @@ def url_for_version(self, version):
|
|||||||
# override default implementation which returns static lib
|
# override default implementation which returns static lib
|
||||||
@property
|
@property
|
||||||
def libs(self):
|
def libs(self):
|
||||||
|
|
||||||
libname = 'libelpa_openmp' if '+openmp' in self.spec else 'libelpa'
|
libname = 'libelpa_openmp' if '+openmp' in self.spec else 'libelpa'
|
||||||
|
|
||||||
return find_libraries(
|
return find_libraries(
|
||||||
libname, root=self.prefix, shared=True, recurse=True
|
libname, root=self.prefix, shared=True, recurse=True
|
||||||
)
|
)
|
||||||
@ -63,8 +63,6 @@ def libs(self):
|
|||||||
build_directory = 'spack-build'
|
build_directory = 'spack-build'
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
# TODO: set optimum flags for platform+compiler combo, see
|
|
||||||
# https://github.com/hfp/xconfigure/tree/master/elpa
|
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
||||||
spack_env.set('CC', spec['mpi'].mpicc)
|
spack_env.set('CC', spec['mpi'].mpicc)
|
||||||
@ -76,7 +74,20 @@ def setup_environment(self, spack_env, run_env):
|
|||||||
spack_env.set('SCALAPACK_LDFLAGS', spec['scalapack'].libs.joined())
|
spack_env.set('SCALAPACK_LDFLAGS', spec['scalapack'].libs.joined())
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
|
# TODO: set optimum flags for platform+compiler combo, see
|
||||||
|
# https://github.com/hfp/xconfigure/tree/master/elpa
|
||||||
|
# also see:
|
||||||
|
# https://src.fedoraproject.org/cgit/rpms/elpa.git/
|
||||||
|
# https://packages.qa.debian.org/e/elpa.html
|
||||||
options = []
|
options = []
|
||||||
|
# without -march=native there is configure error for 2017.05.02
|
||||||
|
# Could not compile test program, try with --disable-sse, or
|
||||||
|
# adjust the C compiler or CFLAGS
|
||||||
|
if '+optflags' in self.spec:
|
||||||
|
options.extend([
|
||||||
|
'FCFLAGS=-O2 -march=native -ffree-line-length-none',
|
||||||
|
'CFLAGS=-O2 -march=native'
|
||||||
|
])
|
||||||
if '+openmp' in self.spec:
|
if '+openmp' in self.spec:
|
||||||
options.append("--enable-openmp")
|
options.append('--enable-openmp')
|
||||||
return options
|
return options
|
||||||
|
Loading…
Reference in New Issue
Block a user