From e377abc18c2cda1b967c2e663d1d9b56828ccfc0 Mon Sep 17 00:00:00 2001 From: David Boehme Date: Thu, 31 Jul 2014 17:51:23 -0700 Subject: Add Score-P packages. --- var/spack/packages/cube/package.py | 30 ++++++++++++++++++++++++ var/spack/packages/opari2/package.py | 28 ++++++++++++++++++++++ var/spack/packages/otf2/package.py | 38 ++++++++++++++++++++++++++++++ var/spack/packages/scalasca/package.py | 43 ++++++++++++++++++++++++++++++++++ var/spack/packages/scorep/package.py | 41 ++++++++++++++++++++++++++++++++ 5 files changed, 180 insertions(+) create mode 100644 var/spack/packages/cube/package.py create mode 100644 var/spack/packages/opari2/package.py create mode 100644 var/spack/packages/otf2/package.py create mode 100644 var/spack/packages/scalasca/package.py create mode 100644 var/spack/packages/scorep/package.py (limited to 'var') diff --git a/var/spack/packages/cube/package.py b/var/spack/packages/cube/package.py new file mode 100644 index 0000000000..3a4f9542c6 --- /dev/null +++ b/var/spack/packages/cube/package.py @@ -0,0 +1,30 @@ +# FIXME: Add copyright statement +# +from spack import * + +class Cube(Package): + """Cube the profile viewer for Score-P and Scalasca profiles. It + displays a multi-dimensional performance space consisting + of the dimensions (i) performance metric, (ii) call path, + and (iii) system resource.""" + + homepage = "http://www.scalasca.org/software/cube-4.x/download.html" + url = "http://apps.fz-juelich.de/scalasca/releases/cube/4.2/dist/cube-4.2.3.tar.gz" + + version('4.2.3', '8f95b9531f5a8f8134f279c2767c9b20') + + def install(self, spec, prefix): + configure_args = ["--prefix=%s" % prefix, + "--without-paraver", + "--without-gui", + "--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') + + configure(*configure_args) + + make(parallel=False) + make("install", parallel=False) diff --git a/var/spack/packages/opari2/package.py b/var/spack/packages/opari2/package.py new file mode 100644 index 0000000000..b571145195 --- /dev/null +++ b/var/spack/packages/opari2/package.py @@ -0,0 +1,28 @@ +# FIXME: Add copyright statement here + +from spack import * + +class Opari2(Package): + """OPARI2 is a source-to-source instrumentation tool for OpenMP and + hybrid codes. It surrounds OpenMP directives and runtime library + calls with calls to the POMP2 measurement interface. + OPARI2 will provide you with a new initialization method that allows + for multi-directory and parallel builds as well as the usage of + pre-instrumented libraries. Furthermore, an efficient way of + tracking parent-child relationships was added. Additionally, we + extended OPARI2 to support instrumentation of OpenMP 3.0 + tied tasks. """ + + homepage = "http://www.vi-hps.org/projects/score-p" + url = "http://www.vi-hps.org/upload/packages/opari2/opari2-1.1.2.tar.gz" + + version('1.1.2', '9a262c7ca05ff0ab5f7775ae96f3539e') + + def install(self, spec, prefix): + # FIXME: Modify the configure line to suit your build system here. + configure("--prefix=%s" % prefix, + "--enable-shared") + + # FIXME: Add logic to build and install here + make() + make("install") diff --git a/var/spack/packages/otf2/package.py b/var/spack/packages/otf2/package.py new file mode 100644 index 0000000000..6e8c398d7d --- /dev/null +++ b/var/spack/packages/otf2/package.py @@ -0,0 +1,38 @@ +# FIXME: Add copyright + +from spack import * +import os + +class Otf2(Package): + """The Open Trace Format 2 is a highly scalable, memory efficient event + trace data format plus support library.""" + + homepage = "http://www.vi-hps.org/score-p" + url = "http://www.vi-hps.org/upload/packages/otf2/otf2-1.4.tar.gz" + + version('1.4', 'a23c42e936eb9209c4e08b61c3cf5092', + url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.4.tar.gz") + version('1.3.1', 'd0ffc4e858455ace4f596f910e68c9f2', + url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.3.1.tar.gz") + version('1.2.1', '8fb3e11fb7489896596ae2c7c83d7fc8', + url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.2.1.tar.gz") + + def install(self, spec, prefix): + # FIXME: Modify the configure line to suit your build system here. + cc = os.environ["SPACK_CC"] + + configure_args=["--prefix=%s" % prefix, + "--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) + + # FIXME: Add logic to build and install here + make() + make("install") diff --git a/var/spack/packages/scalasca/package.py b/var/spack/packages/scalasca/package.py new file mode 100644 index 0000000000..b76d0a7df5 --- /dev/null +++ b/var/spack/packages/scalasca/package.py @@ -0,0 +1,43 @@ +# FIXME: Add copyright + +from spack import * + +class Scalasca(Package): + """Scalasca is a software tool that supports the performance optimization + of parallel programs by measuring and analyzing their runtime behavior. + The analysis identifies potential performance bottlenecks - in + particular those concerning communication and synchronization - and + offers guidance in exploring their causes.""" + + # FIXME: add a proper url for your package's homepage here. + homepage = "http://www.scalasca.org" + url = "http://apps.fz-juelich.de/scalasca/releases/scalasca/2.1/dist/scalasca-2.1-rc2.tar.gz" + + version('2.1-rc2', '1a95a39e5430539753e956a7524a756b') + + depends_on("mpi") + depends_on("otf2@1.4") + depends_on("cube") + + def install(self, spec, prefix): + configure_args = ["--prefix=%s" % prefix, + "--with-otf2=%s" % spec['otf2'].prefix.bin, + "--with-cube=%s" % spec['cube'].prefix.bin, + "--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') + + configure(*configure_args) + + make() + make("install") + + # FIXME: Modify the configure line to suit your build system here. + configure("--prefix=%s" % prefix) + + # FIXME: Add logic to build and install here + make() + make("install") diff --git a/var/spack/packages/scorep/package.py b/var/spack/packages/scorep/package.py new file mode 100644 index 0000000000..5c42cfdbf2 --- /dev/null +++ b/var/spack/packages/scorep/package.py @@ -0,0 +1,41 @@ +# FIXME: Add copyright statement + +from spack import * + +class Scorep(Package): + """The Score-P measurement infrastructure is a highly scalable and + easy-to-use tool suite for profiling, event tracing, and online + analysis of HPC applications.""" + + # FIXME: add a proper url for your package's homepage here. + 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.2.3', '4978084e7cbd05b94517aa8beaea0817') + + depends_on("mpi") + depends_on("papi") + depends_on("otf2@1.2:1.2.1") + depends_on("opari2") + depends_on("cube") + + def install(self, spec, prefix): + configure_args = ["--prefix=%s" % prefix, + "--with-otf2=%s" % spec['otf2'].prefix.bin, + "--with-opari2=%s" % spec['opari2'].prefix.bin, + "--with-cube=%s" % spec['cube'].prefix.bin, + "--with-papi-header=%s" % spec['papi'].prefix.include, + "--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() + make("install") -- cgit v1.2.3-70-g09d2 From 61e2cb56a440e0f1f3ddf84fdfeb048d8fb80443 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 1 Aug 2014 09:04:36 -0700 Subject: Got version 1.2.1 building, but 1.3 and onwards are different. --- var/spack/packages/otf2/package.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'var') diff --git a/var/spack/packages/otf2/package.py b/var/spack/packages/otf2/package.py index 6e8c398d7d..7e28414623 100644 --- a/var/spack/packages/otf2/package.py +++ b/var/spack/packages/otf2/package.py @@ -4,7 +4,7 @@ from spack import * import os class Otf2(Package): - """The Open Trace Format 2 is a highly scalable, memory efficient event + """The Open Trace Format 2 is a highly scalable, memory efficient event trace data format plus support library.""" homepage = "http://www.vi-hps.org/score-p" @@ -17,20 +17,26 @@ class Otf2(Package): version('1.2.1', '8fb3e11fb7489896596ae2c7c83d7fc8', url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.2.1.tar.gz") + + @when('@:1.2') + def version_specific_args(self, args): + return ["--with-platform=disabled"] + + @when('@1.3:') + def version_specific_args(self, args): + # TODO: figure out what scorep's build does as of otf2 1.3 + return [] + + def install(self, spec, prefix): # FIXME: Modify the configure line to suit your build system here. cc = os.environ["SPACK_CC"] configure_args=["--prefix=%s" % prefix, - "--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') - + "--enable-shared"]) + + configure_args.extend(self.version_specific_args()) + configure(*configure_args) # FIXME: Add logic to build and install here -- cgit v1.2.3-70-g09d2 From 513b5aecf1e34e775d98f12c41c9bd526a8504a5 Mon Sep 17 00:00:00 2001 From: David Boehme Date: Fri, 1 Aug 2014 10:16:08 -0700 Subject: Improve compiler configuration in otf2 package --- var/spack/packages/otf2/package.py | 46 +++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 8 deletions(-) (limited to 'var') diff --git a/var/spack/packages/otf2/package.py b/var/spack/packages/otf2/package.py index 7e28414623..6f4ab997af 100644 --- a/var/spack/packages/otf2/package.py +++ b/var/spack/packages/otf2/package.py @@ -1,6 +1,7 @@ # FIXME: Add copyright from spack import * +from contextlib import closing import os class Otf2(Package): @@ -17,28 +18,57 @@ class Otf2(Package): version('1.2.1', '8fb3e11fb7489896596ae2c7c83d7fc8', url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.2.1.tar.gz") + 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=cc +MPICXX=c++ +MPIF77=f77 +MPIFC=f90 +MPI_CFLAGS=-fPIC +MPI_CXXFLAGS=-fPIC +""" @when('@:1.2') - def version_specific_args(self, args): + def version_specific_args(self): return ["--with-platform=disabled"] @when('@1.3:') - def version_specific_args(self, args): + def version_specific_args(self): # TODO: figure out what scorep's build does as of otf2 1.3 - return [] - + return ["--with-custom-compilers"] def install(self, spec, prefix): - # FIXME: Modify the configure line to suit your build system here. - cc = os.environ["SPACK_CC"] + # 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, - "--enable-shared"]) + "--enable-shared"] configure_args.extend(self.version_specific_args()) configure(*configure_args) - # FIXME: Add logic to build and install here make() make("install") -- cgit v1.2.3-70-g09d2 From 557ae64d51f4b53eb7836b9b56b0a536836b3c55 Mon Sep 17 00:00:00 2001 From: David Boehme Date: Fri, 1 Aug 2014 16:39:29 -0700 Subject: Fix cube compiler configuration --- var/spack/packages/cube/package.py | 39 ++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'var') diff --git a/var/spack/packages/cube/package.py b/var/spack/packages/cube/package.py index 3a4f9542c6..16babb0b58 100644 --- a/var/spack/packages/cube/package.py +++ b/var/spack/packages/cube/package.py @@ -1,6 +1,7 @@ # FIXME: Add copyright statement # from spack import * +from contextlib import closing class Cube(Package): """Cube the profile viewer for Score-P and Scalasca profiles. It @@ -13,16 +14,38 @@ class Cube(Package): version('4.2.3', '8f95b9531f5a8f8134f279c2767c9b20') + version('4.3TP1', 'a2090fbc7b2ba394bd5c09ba971e237f', + url = 'http://apps.fz-juelich.de/scalasca/releases/cube/4.3/dist/cube-4.3-TP1.tar.gz') + + 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 +""" + def install(self, spec, prefix): - configure_args = ["--prefix=%s" % prefix, - "--without-paraver", - "--without-gui", - "--enable-shared"] + # 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 - if spec.satisfies('%gcc'): - configure_args.append('--with-nocross-compiler-suite=gcc') - if spec.satisfies('%intel'): - configure_args.append('--with-nocross-compiler-suite=intel') + with closing(open("vendor/common/build-config/platforms/platform-backend-user-provided", "w")) as backend_file: + backend_file.write(self.backend_user_provided) + with closing(open("vendor/common/build-config/platforms/platform-frontend-user-provided", "w")) as frontend_file: + frontend_file.write(self.frontend_user_provided) + + configure_args = ["--prefix=%s" % prefix, + "--with-custom-compilers", + "--without-paraver", + "--without-gui"] configure(*configure_args) -- cgit v1.2.3-70-g09d2 From 31bd1e069ce2267e4dd9859bd3cec231987cedcd Mon Sep 17 00:00:00 2001 From: David Boehme Date: Wed, 17 Sep 2014 12:28:33 -0700 Subject: Add Score-P 1.3 release. Works for gcc, still some issues with Intel builds. --- var/spack/packages/cube/package.py | 6 +++-- var/spack/packages/opari2/package.py | 37 +++++++++++++++++++++++++ var/spack/packages/otf2/package.py | 4 +-- var/spack/packages/scorep/package.py | 52 +++++++++++++++++++++++++++++------- 4 files changed, 86 insertions(+), 13 deletions(-) (limited to 'var') 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() -- cgit v1.2.3-70-g09d2