summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/elpa/package.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py
index 3761f26cc0..d0ef891ad1 100644
--- a/var/spack/repos/builtin/packages/elpa/package.py
+++ b/var/spack/repos/builtin/packages/elpa/package.py
@@ -22,7 +22,6 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-
from spack import *
@@ -32,12 +31,15 @@ class Elpa(AutotoolsPackage):
homepage = 'http://elpa.mpcdf.mpg.de/'
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.05.004', 'c0dd3a53055536fc3a2a221e78d8b376', preferred=True)
version('2016.05.003', '88a9f3f3bfb63e16509dd1be089dcf2c')
version('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6')
variant('openmp', default=False, description='Activates OpenMP support')
+ variant('optflags', default=True, description='Build with optimization flags')
depends_on('mpi')
depends_on('blas')
@@ -53,9 +55,7 @@ class Elpa(AutotoolsPackage):
# override default implementation which returns static lib
@property
def libs(self):
-
libname = 'libelpa_openmp' if '+openmp' in self.spec else 'libelpa'
-
return find_libraries(
libname, root=self.prefix, shared=True, recurse=True
)
@@ -63,8 +63,6 @@ class Elpa(AutotoolsPackage):
build_directory = 'spack-build'
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
spack_env.set('CC', spec['mpi'].mpicc)
@@ -76,7 +74,20 @@ class Elpa(AutotoolsPackage):
spack_env.set('SCALAPACK_LDFLAGS', spec['scalapack'].libs.joined())
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 = []
+ # 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:
- options.append("--enable-openmp")
+ options.append('--enable-openmp')
return options