diff options
author | David Boehme <boehme3@llnl.gov> | 2014-09-17 12:28:33 -0700 |
---|---|---|
committer | David Boehme <boehme3@llnl.gov> | 2014-09-17 12:28:33 -0700 |
commit | 31bd1e069ce2267e4dd9859bd3cec231987cedcd (patch) | |
tree | 3cc863f3d3af21b917767ab22dc41e449713ea49 | |
parent | 557ae64d51f4b53eb7836b9b56b0a536836b3c55 (diff) | |
download | spack-31bd1e069ce2267e4dd9859bd3cec231987cedcd.tar.gz spack-31bd1e069ce2267e4dd9859bd3cec231987cedcd.tar.bz2 spack-31bd1e069ce2267e4dd9859bd3cec231987cedcd.tar.xz spack-31bd1e069ce2267e4dd9859bd3cec231987cedcd.zip |
Add Score-P 1.3 release. Works for gcc, still some issues with Intel builds.
-rw-r--r-- | var/spack/packages/cube/package.py | 6 | ||||
-rw-r--r-- | var/spack/packages/opari2/package.py | 37 | ||||
-rw-r--r-- | var/spack/packages/otf2/package.py | 4 | ||||
-rw-r--r-- | var/spack/packages/scorep/package.py | 52 |
4 files changed, 86 insertions, 13 deletions
diff --git a/var/spack/packages/cube/package.py b/var/spack/packages/cube/package.py index 16babb0b58..d97cd25636 100644 --- a/var/spack/packages/cube/package.py +++ b/var/spack/packages/cube/package.py @@ -17,9 +17,11 @@ class Cube(Package): version('4.3TP1', 'a2090fbc7b2ba394bd5c09ba971e237f', url = 'http://apps.fz-juelich.de/scalasca/releases/cube/4.3/dist/cube-4.3-TP1.tar.gz') + # Using CC as C++ compiler provides quirky workaround for a Score-P build system attempt + # to guess a matching C compiler when configuring scorep-score backend_user_provided = """\ CC=cc -CXX=c++ +CXX=CC F77=f77 FC=f90 #CFLAGS=-fPIC @@ -27,7 +29,7 @@ FC=f90 """ frontend_user_provided = """\ CC_FOR_BUILD=cc -CXX_FOR_BUILD=c++ +CXX_FOR_BUILD=CC F77_FOR_BUILD=f70 FC_FOR_BUILD=f90 """ diff --git a/var/spack/packages/opari2/package.py b/var/spack/packages/opari2/package.py index b571145195..daaee61e3a 100644 --- a/var/spack/packages/opari2/package.py +++ b/var/spack/packages/opari2/package.py @@ -1,6 +1,7 @@ # FIXME: Add copyright statement here from spack import * +from contextlib import closing class Opari2(Package): """OPARI2 is a source-to-source instrumentation tool for OpenMP and @@ -18,9 +19,45 @@ class Opari2(Package): version('1.1.2', '9a262c7ca05ff0ab5f7775ae96f3539e') + backend_user_provided = """\ +CC=cc +CXX=c++ +F77=f77 +FC=f90 +CFLAGS=-fPIC +CXXFLAGS=-fPIC +""" + frontend_user_provided = """\ +CC_FOR_BUILD=cc +CXX_FOR_BUILD=c++ +F77_FOR_BUILD=f70 +FC_FOR_BUILD=f90 +CFLAGS_FOR_BUILD=-fPIC +CXXFLAGS_FOR_BUILD=-fPIC +""" + mpi_user_provided = """\ +MPICC=mpicc +MPICXX=mpicxx +MPIF77=mpif77 +MPIFC=mpif90 +MPI_CFLAGS=-fPIC +MPI_CXXFLAGS=-fPIC +""" + def install(self, spec, prefix): + # Use a custom compiler configuration, otherwise the score-p + # build system messes with spack's compiler settings. + # Create these three files in the build directory + with closing(open("platform-backend-user-provided", "w")) as backend_file: + backend_file.write(self.backend_user_provided) + with closing(open("platform-frontend-user-provided", "w")) as frontend_file: + frontend_file.write(self.frontend_user_provided) + with closing(open("platform-mpi-user-provided", "w")) as mpi_file: + mpi_file.write(self.mpi_user_provided) + # FIXME: Modify the configure line to suit your build system here. configure("--prefix=%s" % prefix, + "--with-custom-compilers", "--enable-shared") # FIXME: Add logic to build and install here diff --git a/var/spack/packages/otf2/package.py b/var/spack/packages/otf2/package.py index 6f4ab997af..fa0a5898b6 100644 --- a/var/spack/packages/otf2/package.py +++ b/var/spack/packages/otf2/package.py @@ -43,9 +43,9 @@ MPI_CFLAGS=-fPIC MPI_CXXFLAGS=-fPIC """ - @when('@:1.2') + @when('@:1.2.1') def version_specific_args(self): - return ["--with-platform=disabled"] + return ["--with-platform=disabled", "CC=cc", "CXX=c++", "F77=f77", "F90=f90", "CFLAGS=-fPIC", "CXXFLAGS=-fPIC"] @when('@1.3:') def version_specific_args(self): diff --git a/var/spack/packages/scorep/package.py b/var/spack/packages/scorep/package.py index 5c42cfdbf2..32a772e3db 100644 --- a/var/spack/packages/scorep/package.py +++ b/var/spack/packages/scorep/package.py @@ -1,6 +1,7 @@ # FIXME: Add copyright statement from spack import * +from contextlib import closing class Scorep(Package): """The Score-P measurement infrastructure is a highly scalable and @@ -11,16 +12,56 @@ class Scorep(Package): homepage = "http://www.vi-hps.org/projects/score-p" url = "http://www.vi-hps.org/upload/packages/scorep/scorep-1.2.3.tar.gz" + version('1.3', '9db6f957b7f51fa01377a9537867a55c', + url = 'http://www.vi-hps.org/upload/packages/scorep/scorep-1.3.tar.gz') + version('1.2.3', '4978084e7cbd05b94517aa8beaea0817') depends_on("mpi") depends_on("papi") - depends_on("otf2@1.2:1.2.1") + # depends_on("otf2@1.2:1.2.1") # only Score-P 1.2.x + depends_on("otf2") depends_on("opari2") - depends_on("cube") + depends_on("cube@4.2:4.2.3") + + backend_user_provided = """\ +CC=cc +CXX=c++ +F77=f77 +FC=f90 +CFLAGS=-fPIC +CXXFLAGS=-fPIC +""" + frontend_user_provided = """\ +CC_FOR_BUILD=cc +CXX_FOR_BUILD=c++ +F77_FOR_BUILD=f70 +FC_FOR_BUILD=f90 +CFLAGS_FOR_BUILD=-fPIC +CXXFLAGS_FOR_BUILD=-fPIC +""" + mpi_user_provided = """\ +MPICC=mpicc +MPICXX=mpicxx +MPIF77=mpif77 +MPIFC=mpif90 +MPI_CFLAGS=-fPIC +MPI_CXXFLAGS=-fPIC +""" def install(self, spec, prefix): + # Use a custom compiler configuration, otherwise the score-p + # build system messes with spack's compiler settings. + # Create these three files in the build directory + with closing(open("platform-backend-user-provided", "w")) as backend_file: + backend_file.write(self.backend_user_provided) + with closing(open("platform-frontend-user-provided", "w")) as frontend_file: + frontend_file.write(self.frontend_user_provided) + with closing(open("platform-mpi-user-provided", "w")) as mpi_file: + mpi_file.write(self.mpi_user_provided) + configure_args = ["--prefix=%s" % prefix, + "--with-custom-compilers", "--with-otf2=%s" % spec['otf2'].prefix.bin, "--with-opari2=%s" % spec['opari2'].prefix.bin, "--with-cube=%s" % spec['cube'].prefix.bin, @@ -28,13 +69,6 @@ class Scorep(Package): "--with-papi-lib=%s" % spec['papi'].prefix.lib, "--enable-shared"] - if spec.satisfies('%gcc'): - configure_args.append('--with-nocross-compiler-suite=gcc') - if spec.satisfies('%intel'): - configure_args.append('--with-nocross-compiler-suite=intel') - if spec.satisfies('%pgi'): - configure_args.append('--with-nocross-compiler-suite=pgi') - configure(*configure_args) make() |