From d1f127d8eff872cab49db922056df1d21c0514c7 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 10:15:17 -0500 Subject: Add changes for krell related products to binutils. Add a patch that installs libiberty_pic.a which krell products will favor/use. --- .../packages/binutils/binutilskrell-2.24.patch | 52 ++++++++++++++++++++++ var/spack/packages/binutils/package.py | 26 ++++++++--- 2 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 var/spack/packages/binutils/binutilskrell-2.24.patch diff --git a/var/spack/packages/binutils/binutilskrell-2.24.patch b/var/spack/packages/binutils/binutilskrell-2.24.patch new file mode 100644 index 0000000000..f48291a6c9 --- /dev/null +++ b/var/spack/packages/binutils/binutilskrell-2.24.patch @@ -0,0 +1,52 @@ +--- binutils-2.24/libiberty/Makefile.in 2013-11-04 10:33:40.000000000 -0500 ++++ binutils-2.24-fixes/libiberty/Makefile.in 2014-10-17 16:22:31.413655000 -0400 +@@ -66,6 +66,7 @@ + MAKEOVERRIDES = + + TARGETLIB = ./libiberty.a ++TARGETLIBPIC = ./libiberty_pic.a + TESTLIB = ./testlib.a + + LIBOBJS = @LIBOBJS@ +@@ -355,27 +356,27 @@ + # since it will be passed the multilib flags. + MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` + install_to_libdir: all +- if test -n "${target_header_dir}"; then \ +- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ +- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ +- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \ +- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \ +- case "${target_header_dir}" in \ +- /*) thd=${target_header_dir};; \ +- *) thd=${includedir}/${target_header_dir};; \ +- esac; \ +- ${mkinstalldirs} $(DESTDIR)$${thd}; \ +- for h in ${INSTALLED_HEADERS}; do \ +- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ +- done; \ +- fi ++ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ ++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ ++ $(INSTALL_DATA) pic/$(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIBPIC)n; \ ++ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \ ++ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIBPIC)n ;$(RANLIB) $(TARGETLIBPIC)n ); \ ++ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \ ++ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIBPIC)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIBPIC); \ ++ ${mkinstalldirs} $(DESTDIR)$${includedir}; \ ++ for h in ${INSTALLED_HEADERS}; do \ ++ ${INSTALL_DATA} $$h $(DESTDIR)$${includedir}; \ ++ done; + @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install + + install_to_tooldir: all + ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) + $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n ++ $(INSTALL_DATA) pic/$(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIBPIC)n + ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n; $(RANLIB) $(TARGETLIB)n ) ++ ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; chmod 644 $(TARGETLIBPIC)n; $(RANLIB) $(TARGETLIBPIC)n ) + mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB) ++ mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIBPIC)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIBPIC) + @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install + + # required-list was used when building a shared bfd/opcodes/libiberty diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py index 5a3059bbcf..43a670585e 100644 --- a/var/spack/packages/binutils/package.py +++ b/var/spack/packages/binutils/package.py @@ -3,15 +3,29 @@ from spack import * class Binutils(Package): """GNU binutils, which contain the linker, assembler, objdump and others""" homepage = "http://www.gnu.org/software/binutils/" - url = "ftp://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2" - version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66') - version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b') - version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e') - version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764') + version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2") + version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2") + version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2") + version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.20.1.tar.bz2") + + # Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell + variant('krellpatch', default=False, description="build with openspeedshop based patch.") + patch('binutilskrell-2.24.patch', when='@2.24+krellpatch') def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + + # Add additional configuration options for use in the OpenSpeedShop project + if '+krellpatch' in spec: + configure('--prefix', self.prefix, + '--libdir', self.prefix.lib, + '--enable-shared', + '--enable-install-libiberty', + '--disable-multilib' + ) + else: + configure("--prefix=%s" % prefix) + make() make("install") -- cgit v1.2.3-70-g09d2 From 0591980cbe4c91f60b5fe2ca811bc7ee306a1171 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 10:17:37 -0500 Subject: Add configuration change for krell related products, they expect the dyninst includes in include/dyninst. --- var/spack/packages/dyninst/package.py | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/var/spack/packages/dyninst/package.py b/var/spack/packages/dyninst/package.py index 41ec57dd2f..81df9aed80 100644 --- a/var/spack/packages/dyninst/package.py +++ b/var/spack/packages/dyninst/package.py @@ -38,6 +38,8 @@ class Dyninst(Package): version('8.1.1', 'd1a04e995b7aa70960cd1d1fac8bd6ac', url="http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz") + variant('krelloptions', default=False, description="build dyninst includes into include/dyninst.") + depends_on("libelf") depends_on("libdwarf") depends_on("boost@1.42:") @@ -48,15 +50,29 @@ class Dyninst(Package): libdwarf = spec['libdwarf'].prefix with working_dir('spack-build', create=True): - cmake('..', - '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include, - '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib, - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DLIBELF_INCLUDE_DIR=%s' % join_path(libelf.include, 'libelf'), - '-DLIBELF_LIBRARIES=%s' % join_path(libelf.lib, 'libelf.so'), - '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, - '-DLIBDWARF_LIBRARIES=%s' % join_path(libdwarf.lib, 'libdwarf.so'), - *std_cmake_args) + # cbtf-krell and openspeedshop expect to reference dyninst/include, so adding include specification to that end + if '+krelloptions' in spec: + cmake('..', + '-DINSTALL_INCLUDE_DIR=%s' % join_path(self.prefix.include, 'dyninst'), + '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include, + '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib, + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DLIBELF_INCLUDE_DIR=%s' % join_path(libelf.include, 'libelf'), + '-DLIBELF_LIBRARIES=%s' % join_path(libelf.lib, 'libelf.so'), + '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, + '-DLIBDWARF_LIBRARIES=%s' % join_path(libdwarf.lib, 'libdwarf.so'), + *std_cmake_args) + else: + cmake('..', + '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include, + '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib, + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DLIBELF_INCLUDE_DIR=%s' % join_path(libelf.include, 'libelf'), + '-DLIBELF_LIBRARIES=%s' % join_path(libelf.lib, 'libelf.so'), + '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, + '-DLIBDWARF_LIBRARIES=%s' % join_path(libdwarf.lib, 'libdwarf.so'), + *std_cmake_args) + make() make("install") -- cgit v1.2.3-70-g09d2 From 13421dc4aa8dd0705728660e5bf6dab657cc170e Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 10:20:05 -0500 Subject: Add patches that enable features added for krell related products. Update the package file to add a krellpatch variant to control adding the patches. --- .../packages/libmonitor/libmonitorkrell-0000.patch | 18 + .../packages/libmonitor/libmonitorkrell-0001.patch | 395 +++++++++++++++++++++ .../packages/libmonitor/libmonitorkrell-0002.patch | 106 ++++++ var/spack/packages/libmonitor/package.py | 7 + 4 files changed, 526 insertions(+) create mode 100644 var/spack/packages/libmonitor/libmonitorkrell-0000.patch create mode 100644 var/spack/packages/libmonitor/libmonitorkrell-0001.patch create mode 100644 var/spack/packages/libmonitor/libmonitorkrell-0002.patch diff --git a/var/spack/packages/libmonitor/libmonitorkrell-0000.patch b/var/spack/packages/libmonitor/libmonitorkrell-0000.patch new file mode 100644 index 0000000000..3a90106850 --- /dev/null +++ b/var/spack/packages/libmonitor/libmonitorkrell-0000.patch @@ -0,0 +1,18 @@ +--- libmonitor-20130218/configure 2013-02-17 23:08:32.000000000 -0800 ++++ libmonitor-20130218-fixes/configure 2013-02-18 10:34:05.237918411 -0800 +@@ -3600,13 +3600,13 @@ + CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then +- CFLAGS="-g -O2" ++ CFLAGS="-g -O0" + else + CFLAGS="-g" + fi + else + if test "$GCC" = yes; then +- CFLAGS="-O2" ++ CFLAGS="-O0" + else + CFLAGS= + fi diff --git a/var/spack/packages/libmonitor/libmonitorkrell-0001.patch b/var/spack/packages/libmonitor/libmonitorkrell-0001.patch new file mode 100644 index 0000000000..85d69595c0 --- /dev/null +++ b/var/spack/packages/libmonitor/libmonitorkrell-0001.patch @@ -0,0 +1,395 @@ +--- libmonitor-20130218/src/callback.c 2013-02-17 23:08:32.000000000 -0800 ++++ libmonitor-20130218-fixes/src/callback.c 2013-02-18 10:34:17.839842826 -0800 +@@ -173,3 +173,18 @@ + MONITOR_DEBUG1("(default callback)\n"); + return 0; + } ++ ++ ++void __attribute__ ((weak)) ++monitor_mpi_post_comm_rank(void) ++{ ++ MONITOR_DEBUG1("(default callback)\n"); ++} ++ ++void __attribute__ ((weak)) ++monitor_mpi_pcontrol(int level) ++{ ++ MONITOR_DEBUG("(default callback) level = %d\n", level); ++} ++ ++ +--- libmonitor-20130218/src/main.c 2013-02-17 23:08:32.000000000 -0800 ++++ libmonitor-20130218-fixes/src/main.c 2013-02-18 10:34:17.839842826 -0800 +@@ -230,6 +230,44 @@ + monitor_fini_library_called = 1; + } + ++/* ++ * Internal monitor functions. ++ */ ++ ++struct monitor_thread_node * __attribute__ ((weak)) ++monitor_get_tn(void) ++{ ++ return &monitor_main_tn; ++} ++ ++int __attribute__ ((weak)) ++monitor_get_thread_num(void) ++{ ++ return (0); ++} ++ ++void __attribute__ ((weak)) ++monitor_reset_thread_list(struct monitor_thread_node *main_tn) ++{ ++ MONITOR_DEBUG1("(weak)\n"); ++ return; ++} ++ ++void __attribute__ ((weak)) ++monitor_thread_release(void) ++{ ++ MONITOR_DEBUG1("(weak)\n"); ++ return; ++} ++ ++void __attribute__ ((weak)) ++monitor_thread_shootdown(void) ++{ ++ MONITOR_DEBUG1("(weak)\n"); ++ return; ++} ++ ++ + void + monitor_begin_process_fcn(void *user_data, int is_fork) + { +@@ -625,12 +663,6 @@ + return (monitor_main_tn.tn_user_data); + } + +-int __attribute__ ((weak)) +-monitor_get_thread_num(void) +-{ +- return (0); +-} +- + void * __attribute__ ((weak)) + monitor_get_addr_thread_start(void) + { +@@ -691,33 +723,3 @@ + MONITOR_DEBUG1("(weak)\n"); + return (FALSE); + } +- +-/* +- * Internal monitor functions. +- */ +-struct monitor_thread_node * __attribute__ ((weak)) +-monitor_get_tn(void) +-{ +- return &monitor_main_tn; +-} +- +-void __attribute__ ((weak)) +-monitor_reset_thread_list(struct monitor_thread_node *main_tn) +-{ +- MONITOR_DEBUG1("(weak)\n"); +- return; +-} +- +-void __attribute__ ((weak)) +-monitor_thread_release(void) +-{ +- MONITOR_DEBUG1("(weak)\n"); +- return; +-} +- +-void __attribute__ ((weak)) +-monitor_thread_shootdown(void) +-{ +- MONITOR_DEBUG1("(weak)\n"); +- return; +-} +--- libmonitor-20130218/src/monitor.h 2013-02-17 23:08:32.000000000 -0800 ++++ libmonitor-20130218-fixes/src/monitor.h 2013-02-18 10:34:17.840842821 -0800 +@@ -73,6 +73,11 @@ + extern void monitor_fini_mpi(void); + extern void monitor_mpi_post_fini(void); + ++extern void monitor_mpi_post_comm_rank(void); ++extern void monitor_mpi_pcontrol(int level); ++ ++ ++ + /* + * Monitor support functions. + */ +--- libmonitor-20130218/src/mpi_comm_c.c 2013-02-17 23:08:32.000000000 -0800 ++++ libmonitor-20130218-fixes/src/mpi_comm_c.c 2013-02-18 10:34:17.878842622 -0800 +@@ -36,5 +36,8 @@ + ret = (*real_mpi_comm_rank)(comm, rank); + monitor_set_mpi_size_rank(size, *rank); + ++ monitor_mpi_post_comm_rank(); ++ ++ + return (ret); + } +--- libmonitor-20130218/src/mpi_comm_f0.c 2013-02-17 23:08:32.000000000 -0800 ++++ libmonitor-20130218-fixes/src/mpi_comm_f0.c 2013-02-18 10:34:17.879842617 -0800 +@@ -34,4 +34,5 @@ + (*real_mpi_comm_size)(comm, &size, ierror); + (*real_mpi_comm_rank)(comm, rank, ierror); + monitor_set_mpi_size_rank(size, *rank); ++ monitor_mpi_post_comm_rank(); + } +--- libmonitor-20130218/src/mpi_comm_f1.c 2013-02-17 23:08:32.000000000 -0800 ++++ libmonitor-20130218-fixes/src/mpi_comm_f1.c 2013-02-18 10:34:17.880842612 -0800 +@@ -34,4 +34,5 @@ + (*real_mpi_comm_size)(comm, &size, ierror); + (*real_mpi_comm_rank)(comm, rank, ierror); + monitor_set_mpi_size_rank(size, *rank); ++ monitor_mpi_post_comm_rank(); + } +--- libmonitor-20130218/src/mpi_comm_f2.c 2013-02-17 23:08:32.000000000 -0800 ++++ libmonitor-20130218-fixes/src/mpi_comm_f2.c 2013-02-18 10:34:17.880842612 -0800 +@@ -34,4 +34,5 @@ + (*real_mpi_comm_size)(comm, &size, ierror); + (*real_mpi_comm_rank)(comm, rank, ierror); + monitor_set_mpi_size_rank(size, *rank); ++ monitor_mpi_post_comm_rank(); + } +--- libmonitor-20130218/src/pmpi.c 2013-02-17 23:08:32.000000000 -0800 ++++ libmonitor-20130218-fixes/src/pmpi.c 2013-02-18 10:34:17.881842607 -0800 +@@ -52,11 +52,15 @@ + typedef int mpi_init_thread_fcn_t(int *, char ***, int, int *); + typedef int mpi_finalize_fcn_t(void); + typedef int mpi_comm_fcn_t(void *, int *); ++typedef int mpi_pcontrol_fcn_t(int ); ++ + + typedef void f_mpi_init_fcn_t(int *); + typedef void f_mpi_init_thread_fcn_t(int *, int *, int *); + typedef void f_mpi_finalize_fcn_t(int *); + typedef void f_mpi_comm_fcn_t(int *, int *, int *); ++typedef int f_mpi_pcontrol_fcn_t(int ); ++ + + static mpi_init_fcn_t *real_pmpi_init = NULL; + static f_mpi_init_fcn_t *real_pmpi_init_f0 = NULL; +@@ -83,6 +87,12 @@ + static f_mpi_comm_fcn_t *real_pmpi_comm_rank_f1 = NULL; + static f_mpi_comm_fcn_t *real_pmpi_comm_rank_f2 = NULL; + ++static mpi_pcontrol_fcn_t *real_pmpi_pcontrol = NULL; ++static f_mpi_pcontrol_fcn_t *real_pmpi_pcontrol_f0 = NULL; ++static f_mpi_pcontrol_fcn_t *real_pmpi_pcontrol_f1 = NULL; ++static f_mpi_pcontrol_fcn_t *real_pmpi_pcontrol_f2 = NULL; ++ ++ + /* + *---------------------------------------------------------------------- + * PMPI_INIT OVERRIDE FUNCTIONS +@@ -297,6 +307,7 @@ + ret = (*real_pmpi_comm_size)(comm, &size); + ret = (*real_pmpi_comm_rank)(comm, rank); + monitor_set_mpi_size_rank(size, *rank); ++ monitor_mpi_post_comm_rank(); + + return (ret); + } +@@ -308,7 +319,9 @@ + MONITOR_GET_REAL_NAME_WRAP(rank_var, rank_fcn); \ + (*size_var)(comm, &size, ierror); \ + (*rank_var)(comm, rank, ierror); \ +- monitor_set_mpi_size_rank(size, *rank); ++ monitor_set_mpi_size_rank(size, *rank); \ ++ monitor_mpi_post_comm_rank(); ++ + + /* + * In Fortran, MPI_Comm is always int. +@@ -333,3 +346,48 @@ + FORTRAN_COMM_RANK_BODY(real_pmpi_comm_size_f2, pmpi_comm_size__, + real_pmpi_comm_rank_f2, pmpi_comm_rank__); + } ++ ++ ++/* ++ *---------------------------------------------------------------------- ++ * PMPI_PCONTROL OVERRIDE FUNCTIONS ++ *---------------------------------------------------------------------- ++ */ ++ ++int ++MONITOR_WRAP_NAME(PMPI_Pcontrol)(int level) ++{ ++ int ret; ++ ++ MONITOR_DEBUG("level = %d\n", level); \ ++ MONITOR_GET_REAL_NAME_WRAP(real_pmpi_pcontrol, PMPI_Pcontrol); ++ ret = (*real_pmpi_pcontrol) (level) ; ++ monitor_mpi_pcontrol(level); ++ ++ return (ret); ++} ++ ++#define FORTRAN_PCONTROL_BODY(var_name, fcn_name)\ ++ int ret; \ ++ MONITOR_DEBUG("level = %d\n", level); \ ++ MONITOR_GET_REAL_NAME_WRAP(var_name, fcn_name); \ ++ ret = (*var_name) (level) ; \ ++ monitor_mpi_pcontrol(level); ++ ++int ++MONITOR_WRAP_NAME(pmpi_pcontrol)(int level) ++{ ++ FORTRAN_PCONTROL_BODY(real_pmpi_pcontrol_f0, pmpi_pcontrol); ++} ++ ++int ++MONITOR_WRAP_NAME(pmpi_pcontrol_)(int level) ++{ ++ FORTRAN_PCONTROL_BODY(real_pmpi_pcontrol_f1, pmpi_pcontrol_); ++} ++ ++int ++MONITOR_WRAP_NAME(pmpi_pcontrol__)(int level) ++{ ++ FORTRAN_PCONTROL_BODY(real_pmpi_pcontrol_f2, pmpi_pcontrol__); ++} +--- libmonitor-20130218/src/mpi_pcontrol_c.c 1969-12-31 16:00:00.000000000 -0800 ++++ libmonitor-20130218-fixes/src/mpi_pcontrol_c.c 2013-02-18 10:34:17.882842602 -0800 +@@ -0,0 +1,30 @@ ++/* ++ * Override MPI_Pcontrol in C/C++. ++ * ++ * ++ */ ++ ++#include "config.h" ++#include "common.h" ++#include "monitor.h" ++ ++typedef int mpi_pcontrol_fcn_t(int level); ++#ifdef MONITOR_STATIC ++extern mpi_pcontrol_fcn_t __real_MPI_Pcontrol; ++#endif ++static mpi_pcontrol_fcn_t *real_mpi_pcontrol = NULL; ++ ++int ++MONITOR_WRAP_NAME(MPI_Pcontrol)(int level) ++{ ++ int ret, count; ++ ++ MONITOR_DEBUG("level = %d\n", level); \ ++ ++ MONITOR_GET_REAL_NAME_WRAP(real_mpi_pcontrol, MPI_Pcontrol); ++ ret = (*real_mpi_pcontrol)(level); ++ monitor_mpi_pcontrol(level); ++ ++ ++ return (ret); ++} +--- libmonitor-20130218/src/mpi_pcontrol_f0.c 1969-12-31 16:00:00.000000000 -0800 ++++ libmonitor-20130218-fixes/src/mpi_pcontrol_f0.c 2013-02-18 10:34:17.882842602 -0800 +@@ -0,0 +1,24 @@ ++/* ++ * Override mpi_pcontrol in Fortran. ++ * ++ */ ++ ++#include "config.h" ++#include "common.h" ++#include "monitor.h" ++ ++typedef void mpi_pcontrol_fcn_t(int level); ++#ifdef MONITOR_STATIC ++extern mpi_pcontrol_fcn_t __real_mpi_pcontrol; ++#endif ++static mpi_pcontrol_fcn_t *real_mpi_pcontrol = NULL; ++ ++int ++MONITOR_WRAP_NAME(mpi_pcontrol)(int level) ++{ ++ int count; ++ ++ MONITOR_DEBUG1("\n"); ++ MONITOR_GET_REAL_NAME_WRAP(real_mpi_pcontrol, mpi_pcontrol); ++ (*real_mpi_pcontrol)(level); ++} +--- libmonitor-20130218/src/mpi_pcontrol_f1.c 1969-12-31 16:00:00.000000000 -0800 ++++ libmonitor-20130218-fixes/src/mpi_pcontrol_f1.c 2013-02-18 10:34:17.883842597 -0800 +@@ -0,0 +1,24 @@ ++/* ++ * Override mpi_pcontrol_ in Fortran. ++ * ++ */ ++ ++#include "config.h" ++#include "common.h" ++#include "monitor.h" ++ ++typedef void mpi_pcontrol_fcn_t(int level); ++#ifdef MONITOR_STATIC ++extern mpi_pcontrol_fcn_t __real_mpi_pcontrol_; ++#endif ++static mpi_pcontrol_fcn_t *real_mpi_pcontrol = NULL; ++ ++int ++MONITOR_WRAP_NAME(mpi_pcontrol_)(int level) ++{ ++ int count; ++ ++ MONITOR_DEBUG1("\n"); ++ MONITOR_GET_REAL_NAME_WRAP(real_mpi_pcontrol, mpi_pcontrol_); ++ (*real_mpi_pcontrol)(level); ++} +--- libmonitor-20130218/src/mpi_pcontrol_f2.c 1969-12-31 16:00:00.000000000 -0800 ++++ libmonitor-20130218-fixes/src/mpi_pcontrol_f2.c 2013-02-18 10:34:17.883842597 -0800 +@@ -0,0 +1,24 @@ ++/* ++ * Override mpi_pcontrol__ in Fortran. ++ * ++ */ ++ ++#include "config.h" ++#include "common.h" ++#include "monitor.h" ++ ++typedef void mpi_pcontrol_fcn_t(int level); ++#ifdef MONITOR_STATIC ++extern mpi_pcontrol_fcn_t __real_mpi_pcontrol__; ++#endif ++static mpi_pcontrol_fcn_t *real_mpi_pcontrol = NULL; ++ ++int ++MONITOR_WRAP_NAME(mpi_pcontrol__)(int level) ++{ ++ int count; ++ ++ MONITOR_DEBUG1("\n"); ++ MONITOR_GET_REAL_NAME_WRAP(real_mpi_pcontrol, mpi_pcontrol__); ++ (*real_mpi_pcontrol)(level); ++} +--- libmonitor-20130218/src/Makefile.am 2013-02-17 23:08:32.000000000 -0800 ++++ libmonitor-20130218-fixes/src/Makefile.am 2013-02-18 10:34:17.931842343 -0800 +@@ -38,10 +38,11 @@ + MONITOR_THREAD_FILES = pthread.c + MONITOR_SCRIPT_FILES = monitor-link monitor-run + MONITOR_MPI_FILES = \ +- mpi_init_c.c mpi_init_thread_c.c mpi_final_c.c mpi_comm_c.c \ +- mpi_init_f0.c mpi_init_thread_f0.c mpi_final_f0.c mpi_comm_f0.c \ +- mpi_init_f1.c mpi_init_thread_f1.c mpi_final_f1.c mpi_comm_f1.c \ +- mpi_init_f2.c mpi_init_thread_f2.c mpi_final_f2.c mpi_comm_f2.c ++ mpi_init_c.c mpi_init_thread_c.c mpi_final_c.c mpi_comm_c.c mpi_pcontrol_c.c \ ++ mpi_init_f0.c mpi_init_thread_f0.c mpi_final_f0.c mpi_comm_f0.c mpi_pcontrol_f0.c \ ++ mpi_init_f1.c mpi_init_thread_f1.c mpi_final_f1.c mpi_comm_f1.c mpi_pcontrol_f1.c \ ++ mpi_init_f2.c mpi_init_thread_f2.c mpi_final_f2.c mpi_comm_f2.c mpi_pcontrol_f2.c ++ + + include_HEADERS = monitor.h + bin_SCRIPTS = diff --git a/var/spack/packages/libmonitor/libmonitorkrell-0002.patch b/var/spack/packages/libmonitor/libmonitorkrell-0002.patch new file mode 100644 index 0000000000..514dfdf13e --- /dev/null +++ b/var/spack/packages/libmonitor/libmonitorkrell-0002.patch @@ -0,0 +1,106 @@ +--- libmonitor-20130218/src/pmpi.c 2013-02-18 11:34:17.000000000 -0700 ++++ libmonitor-20130218-fixed/src/pmpi.c 2013-04-11 10:03:59.300550393 -0600 +@@ -355,7 +355,7 @@ + */ + + int +-MONITOR_WRAP_NAME(PMPI_Pcontrol)(int level) ++MONITOR_WRAP_NAME(PMPI_Pcontrol)(int level, int *ierror ) + { + int ret; + +@@ -375,19 +375,19 @@ + monitor_mpi_pcontrol(level); + + int +-MONITOR_WRAP_NAME(pmpi_pcontrol)(int level) ++MONITOR_WRAP_NAME(pmpi_pcontrol)(int level, int *ierror ) + { + FORTRAN_PCONTROL_BODY(real_pmpi_pcontrol_f0, pmpi_pcontrol); + } + + int +-MONITOR_WRAP_NAME(pmpi_pcontrol_)(int level) ++MONITOR_WRAP_NAME(pmpi_pcontrol_)(int level, int *ierror ) + { + FORTRAN_PCONTROL_BODY(real_pmpi_pcontrol_f1, pmpi_pcontrol_); + } + + int +-MONITOR_WRAP_NAME(pmpi_pcontrol__)(int level) ++MONITOR_WRAP_NAME(pmpi_pcontrol__)(int level, int *ierror ) + { + FORTRAN_PCONTROL_BODY(real_pmpi_pcontrol_f2, pmpi_pcontrol__); + } +--- libmonitor-20130218/src/mpi_pcontrol_f0.c 2013-02-18 11:34:17.000000000 -0700 ++++ libmonitor-20130218-fixed/src/mpi_pcontrol_f0.c 2013-04-11 10:13:47.783002000 -0600 +@@ -7,18 +7,18 @@ + #include "common.h" + #include "monitor.h" + +-typedef void mpi_pcontrol_fcn_t(int level); ++typedef void mpi_pcontrol_fcn_t(int level, int *ierror); + #ifdef MONITOR_STATIC + extern mpi_pcontrol_fcn_t __real_mpi_pcontrol; + #endif + static mpi_pcontrol_fcn_t *real_mpi_pcontrol = NULL; + + int +-MONITOR_WRAP_NAME(mpi_pcontrol)(int level) ++MONITOR_WRAP_NAME(mpi_pcontrol)(int level, int *ierror) + { + int count; + + MONITOR_DEBUG1("\n"); + MONITOR_GET_REAL_NAME_WRAP(real_mpi_pcontrol, mpi_pcontrol); +- (*real_mpi_pcontrol)(level); ++ (*real_mpi_pcontrol)(level, ierror); + } +--- libmonitor-20130218/src/mpi_pcontrol_f1.c 2013-02-18 11:34:17.000000000 -0700 ++++ libmonitor-20130218-fixed/src/mpi_pcontrol_f1.c 2013-04-11 10:14:08.039214000 -0600 +@@ -7,18 +7,18 @@ + #include "common.h" + #include "monitor.h" + +-typedef void mpi_pcontrol_fcn_t(int level); ++typedef void mpi_pcontrol_fcn_t(int level, int *ierror); + #ifdef MONITOR_STATIC + extern mpi_pcontrol_fcn_t __real_mpi_pcontrol_; + #endif + static mpi_pcontrol_fcn_t *real_mpi_pcontrol = NULL; + + int +-MONITOR_WRAP_NAME(mpi_pcontrol_)(int level) ++MONITOR_WRAP_NAME(mpi_pcontrol_)(int level, int *ierror) + { + int count; + + MONITOR_DEBUG1("\n"); + MONITOR_GET_REAL_NAME_WRAP(real_mpi_pcontrol, mpi_pcontrol_); +- (*real_mpi_pcontrol)(level); ++ (*real_mpi_pcontrol)(level, ierror); + } +--- libmonitor-20130218/src/mpi_pcontrol_f2.c 2013-02-18 11:34:17.000000000 -0700 ++++ libmonitor-20130218-fixed/src/mpi_pcontrol_f2.c 2013-04-11 10:14:19.000960000 -0600 +@@ -7,18 +7,18 @@ + #include "common.h" + #include "monitor.h" + +-typedef void mpi_pcontrol_fcn_t(int level); ++typedef void mpi_pcontrol_fcn_t(int level, int *ierror); + #ifdef MONITOR_STATIC + extern mpi_pcontrol_fcn_t __real_mpi_pcontrol__; + #endif + static mpi_pcontrol_fcn_t *real_mpi_pcontrol = NULL; + + int +-MONITOR_WRAP_NAME(mpi_pcontrol__)(int level) ++MONITOR_WRAP_NAME(mpi_pcontrol__)(int level, int *ierror) + { + int count; + + MONITOR_DEBUG1("\n"); + MONITOR_GET_REAL_NAME_WRAP(real_mpi_pcontrol, mpi_pcontrol__); +- (*real_mpi_pcontrol)(level); ++ (*real_mpi_pcontrol)(level, ierror); + } diff --git a/var/spack/packages/libmonitor/package.py b/var/spack/packages/libmonitor/package.py index 3b95b86ddf..b31d7576c0 100644 --- a/var/spack/packages/libmonitor/package.py +++ b/var/spack/packages/libmonitor/package.py @@ -29,6 +29,13 @@ class Libmonitor(Package): homepage = "http://hpctoolkit.org" version('20130218', svn='http://libmonitor.googlecode.com/svn/trunk/', revision=146) + variant('krellpatch', default=False, description="build with openspeedshop based patch.") + + + patch('libmonitorkrell-0000.patch', when='@20130218+krellpatch') + patch('libmonitorkrell-0001.patch', when='@20130218+krellpatch') + patch('libmonitorkrell-0002.patch', when='@20130218+krellpatch') + def install(self, spec, prefix): configure("--prefix=" + prefix) -- cgit v1.2.3-70-g09d2 From 64c8fd3fa18dd6644a67cbd9e9aa5f20eb5e85a7 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 10:49:15 -0500 Subject: Add krelloptions variant that is used to turn on a configuration option to build the thread safe lightweight libraries. --- var/spack/packages/mrnet/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/packages/mrnet/package.py b/var/spack/packages/mrnet/package.py index 6e9766f275..08c57d7436 100644 --- a/var/spack/packages/mrnet/package.py +++ b/var/spack/packages/mrnet/package.py @@ -8,12 +8,17 @@ class Mrnet(Package): version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') version('4.1.0', '5a248298b395b329e2371bf25366115c') + variant('krelloptions', default=False, description="Also build the MRNet LW threadsafe libraries") parallel = False depends_on("boost") def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") + # Build the MRNet LW thread safe libraries when the krelloptions variant is present + if '+krelloptions' in spec: + configure("--prefix=%s" %prefix, "--enable-shared", "--enable-ltwt-threadsafe") + else: + configure("--prefix=%s" %prefix, "--enable-shared") make() make("install") -- cgit v1.2.3-70-g09d2 From b4e0804b374f1a725d42bdf3a11c3602ff009137 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 10:50:11 -0500 Subject: Add the latest version to the papi package. --- var/spack/packages/papi/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/packages/papi/package.py b/var/spack/packages/papi/package.py index 596f7114d6..947311ce3b 100644 --- a/var/spack/packages/papi/package.py +++ b/var/spack/packages/papi/package.py @@ -11,8 +11,11 @@ class Papi(Package): components that expose performance measurement opportunites across the hardware and software stack.""" homepage = "http://icl.cs.utk.edu/papi/index.html" - url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.3.0.tar.gz" + url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.4.1.tar.gz" + version('5.4.1', '9134a99219c79767a11463a76b0b01a2') + + url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.3.0.tar.gz" version('5.3.0', '367961dd0ab426e5ae367c2713924ffb') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 15ec3cb3cd713e2ae1810440d01535f6990c4909 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 10:51:53 -0500 Subject: Add qt3 version support and a variant that controls patching the qt3 version for compile issues and answering yes to the license questions during build. --- var/spack/packages/qt/package.py | 22 ++++++++++-- var/spack/packages/qt/qt3krell.patch | 68 ++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 var/spack/packages/qt/qt3krell.patch diff --git a/var/spack/packages/qt/package.py b/var/spack/packages/qt/package.py index 0e4abe3b1d..e8d843519d 100644 --- a/var/spack/packages/qt/package.py +++ b/var/spack/packages/qt/package.py @@ -10,14 +10,23 @@ class Qt(Package): version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6', url='http://download.qt-project.org/official_releases/qt/5.4/5.4.0/single/qt-everywhere-opensource-src-5.4.0.tar.gz') + version('5.3.2', 'febb001129927a70174467ecb508a682', url='http://download.qt.io/archive/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz') version('5.2.1', 'a78408c887c04c34ce615da690e0b4c8', url='http://download.qt.io/archive/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.tar.gz') + version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb', url="http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz") + version('3.3.8b', '9f05b4125cfe477cc52c9742c3c09009', + url="http://download.qt.io/archive/qt/3/qt-x11-free-3.3.8b.tar.gz") + + # Add patch for compile issues with qt3 found with use in the OpenSpeedShop project + variant('krellpatch', default=False, description="build with openspeedshop based patch.") + patch('qt3krell.patch', when='@3.3.8b+krellpatch') + # Use system openssl for security. #depends_on("openssl") @@ -25,7 +34,7 @@ class Qt(Package): depends_on("gtkplus") depends_on("libxml2") depends_on("zlib") - depends_on("dbus") + depends_on("dbus", when='@4:') depends_on("libtiff") depends_on("libpng") depends_on("libmng") @@ -39,7 +48,7 @@ class Qt(Package): # depends_on("icu4c") # OpenGL hardware acceleration - depends_on("mesa") + depends_on("mesa", when='@4:') depends_on("libxcb") @@ -85,6 +94,15 @@ class Qt(Package): # Don't disable all the database drivers, but should # really get them into spack at some point. + @when('@3') + def configure(self): + configure('-prefix', self.prefix, + '-v', + '-thread', + '-shared', + '-release', + '-fast' + ) @when('@4') def configure(self): diff --git a/var/spack/packages/qt/qt3krell.patch b/var/spack/packages/qt/qt3krell.patch new file mode 100644 index 0000000000..3333eeacd4 --- /dev/null +++ b/var/spack/packages/qt/qt3krell.patch @@ -0,0 +1,68 @@ +--- qt-x11-free-3.3.8b/src/tools/qmap.h 2008-01-15 13:09:13.000000000 -0600 ++++ qt-x11-free-3.3.8b-fixes/src/tools/qmap.h 2015-07-08 15:47:34.757565247 -0500 +@@ -52,6 +52,7 @@ + #ifndef QT_NO_STL + #include + #include ++#include + #endif + + //#define QT_CHECK_MAP_RANGE +--- qt-x11-free-3.3.8b/src/tools/qvaluelist.h 2008-01-15 13:09:13.000000000 -0600 ++++ qt-x11-free-3.3.8b-fixes/src/tools/qvaluelist.h 2015-07-08 15:47:34.758565247 -0500 +@@ -50,6 +50,7 @@ + #ifndef QT_NO_STL + #include + #include ++#include + #endif + + //#define QT_CHECK_VALUELIST_RANGE +--- qt-x11-free-3.3.8b/src/tools/qvaluevector.h 2008-01-15 13:09:13.000000000 -0600 ++++ qt-x11-free-3.3.8b-fixes/src/tools/qvaluevector.h 2015-07-08 15:47:34.758565247 -0500 +@@ -47,6 +47,7 @@ + + #ifndef QT_NO_STL + #include ++#include + #endif + + template +--- qt-x11-free-3.3.8b/configure 2008-01-15 13:09:15.000000000 -0600 ++++ qt-x11-free-3.3.8b-fixes/configure 2015-07-08 15:49:03.379560633 -0500 +@@ -2339,7 +2339,7 @@ + else + echo "Do you accept the terms of the $TheLicense? \c" + fi +- read acceptance ++ acceptance=yes + echo + if [ "$acceptance" = yes ]; then + break +@@ -2397,7 +2397,7 @@ + else + echo "Do you accept the terms of $affix license? \c" + fi +- read acceptance ++ acceptance=yes + echo + if [ "$acceptance" = "yes" ]; then + break +@@ -2443,7 +2443,7 @@ + else + echo "Do you accept the terms of the license? \c" + fi +- read acceptance ++ acceptance=yes + echo + if [ "$acceptance" = "yes" ]; then + break +@@ -2524,7 +2524,7 @@ + else + echo "Do you accept the terms of the $Platform License? \c" + fi +- read acceptance ++ acceptance=yes + echo + if [ "$acceptance" = "yes" ]; then + break -- cgit v1.2.3-70-g09d2 From f5093094eb715e8e3072ecfc3c526951e47d22fe Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 10:58:16 -0500 Subject: Add the cbtf-argonavis project package file. cbtf-argonavis is a project based on CBTF that supports performance analysis of GPU applications. --- var/spack/packages/cbtf-argonavis/package.py | 65 ++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 var/spack/packages/cbtf-argonavis/package.py diff --git a/var/spack/packages/cbtf-argonavis/package.py b/var/spack/packages/cbtf-argonavis/package.py new file mode 100644 index 0000000000..5f76a18dae --- /dev/null +++ b/var/spack/packages/cbtf-argonavis/package.py @@ -0,0 +1,65 @@ +################################################################################ +# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public 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 * + +class CbtfArgonavis(Package): + """CBTF Argo Navis project contains the CUDA collector and supporting + libraries that was done as a result of a DOE SBIR grant.""" + homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" + + url = "http://sourceforge.net/projects/cbtf/files/cbtf-1.5/cbtf-argonavis-1.5.tar.gz/download" + version('1.5', '8708197dbc08980fcd7b1a3a3a40a2c9') + + # Mirror access template example + #url = "file:/opt/spack-mirror-2015-02-27/cbtf-argonavis/cbtf-argonavis-1.5.tar.gz" + #version('1.5', '1f7f6512f55409ed2135cfceabe26b82') + + depends_on("cmake") + depends_on("papi") + depends_on("cbtf") + depends_on("cbtf-krell") + #depends_on("cuda") + + parallel = False + + def install(self, spec, prefix): + + # Look for package installation information in the cbtf and cbtf-krell prefixes + cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) + + # FIXME, hard coded for testing purposes, we will alter when the external package feature is available + cuda_prefix_path = "/usr/local/cuda-6.0" + cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI" + + with working_dir('CUDA'): + with working_dir('build', create=True): + cmake('..', + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DCUDA_INSTALL_PATH=%s' % cuda_prefix_path, + '-DCUDA_ROOT=%s' % cuda_prefix_path, + '-DCUPTI_ROOT=%s' % cupti_prefix_path, + '-DPAPI_ROOT=%s' % spec['papi'].prefix, + '-DCBTF_PREFIX=%s' % spec['cbtf'].prefix, + *std_cmake_args) + make("clean") + make() + make("install") + -- cgit v1.2.3-70-g09d2 From a9c737f9113baa4e7ae16dfe4af3d6669f521b42 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 10:59:52 -0500 Subject: Add spack build package for Xerces-C which is a supporting package for the krell related projects. --- var/spack/packages/xerces-c/package.py | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 var/spack/packages/xerces-c/package.py diff --git a/var/spack/packages/xerces-c/package.py b/var/spack/packages/xerces-c/package.py new file mode 100644 index 0000000000..b59ab178ae --- /dev/null +++ b/var/spack/packages/xerces-c/package.py @@ -0,0 +1,36 @@ +# FIXME: +# This is a template package file for Spack. We've conveniently +# put "FIXME" labels next to all the things you'll want to change. +# +# Once you've edited all the FIXME's, delete this whole message, +# save this file, and test out your package like this: +# +# spack install xerces-c +# +# You can always get back here to change things with: +# +# spack edit xerces-c +# +# See the spack documentation for more information on building +# packages. +# +from spack import * + +class XercesC(Package): + """ Xerces-C++ is a validating XML parser written in a portable subset of C++. + Xerces-C++ makes it easy to give your application the ability to read and + write XML data. A shared library is provided for parsing, generating, + manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs. + """ + + homepage = "https://xerces.apache.org/xerces-c" + url = "https://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.2.tar.gz" + version('3.1.2', '9eb1048939e88d6a7232c67569b23985') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--disable-network") + make("clean") + make() + make("install") + -- cgit v1.2.3-70-g09d2 From eff5016653980f24c5c55dfb866dbe108f50dedf Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 11:15:53 -0500 Subject: Add the cbtf spack build package. cbtf is the base package for the component based tool framework and is used for building and connecting cbtf components, including distributed components via the MRNet transfer mechanism. --- var/spack/packages/cbtf/package.py | 65 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 var/spack/packages/cbtf/package.py diff --git a/var/spack/packages/cbtf/package.py b/var/spack/packages/cbtf/package.py new file mode 100644 index 0000000000..d2023ada85 --- /dev/null +++ b/var/spack/packages/cbtf/package.py @@ -0,0 +1,65 @@ +################################################################################ +# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public 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 * + +class Cbtf(Package): + """CBTF project contains the base code for CBTF that supports creating components, + component networks and the support to connect these components and component + networks into sequential and distributed network tools.""" + homepage = "http://sourceforge.net/p/cbtf/wiki/Home" + + url = "http://sourceforge.net/projects/cbtf/files/cbtf-1.5/cbtf-1.5.tar.gz/download" + version('1.5', '75a97e0161d19b3a12305ed1ffb3d3e2') + + # Mirror access template example + #url = "file:/opt/spack-mirror-2015-02-27/cbtf/cbtf-1.5.tar.gz" + #version('1.5', '1ca88a8834759c4c74452cb97fe7b70a') + + # Use when the git repository is available + #version('1.5', branch='master', git='http://git.code.sf.net/p/cbtf/cbtf') + + depends_on("cmake") + depends_on("boost@1.41:") + depends_on("mrnet@4.1.0+krelloptions") + depends_on("xerces-c@3.1.1:") + depends_on("libxml2") + + parallel = False + + def install(self, spec, prefix): + with working_dir('build', create=True): + + + # Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching + # in system paths (or other locations outside of BOOST_ROOT + # or BOOST_INCLUDEDIR). Useful when specifying BOOST_ROOT. + # Defaults to OFF. + + cmake('..', + '--debug-output', + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake'), + *std_cmake_args) + + make("clean") + make() + make("install") -- cgit v1.2.3-70-g09d2 From 23971bae92f387cbcbed8f4ea5d99ce81bf03ff0 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 11:20:27 -0500 Subject: Add the cbtf-krell spack build package. cbtf-krell is the krell contribution to the CBTF project and includes services, messages, and core libraries and components that support performance information gathering, transfer, and reduction. --- var/spack/packages/cbtf-krell/package.py | 114 +++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 var/spack/packages/cbtf-krell/package.py diff --git a/var/spack/packages/cbtf-krell/package.py b/var/spack/packages/cbtf-krell/package.py new file mode 100644 index 0000000000..0661b101a1 --- /dev/null +++ b/var/spack/packages/cbtf-krell/package.py @@ -0,0 +1,114 @@ +################################################################################ +# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public 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 * + +class CbtfKrell(Package): + """CBTF Krell project contains the Krell Institute contributions to the CBTF project. + These contributions include many performance data collectors and support + libraries as well as some example tools that drive the data collection at + HPC levels of scale.""" + homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" + + url = "http://sourceforge.net/projects/cbtf/files/cbtf-1.5/cbtf-krell-1.5.tar.gz/download" + version('1.5', '86cca5aa48a65206d3ac5502fcbd3ef6') + + # optional mirror access template + #url = "file:/opt/spack-mirror-2015-02-27/cbtf-krell/cbtf-krell-1.5.tar.gz" + #version('1.5', 'b13f6df6a93c44149d977773dd776d2f') + + + # Dependencies for cbtf-krell + + # For binutils service + depends_on("binutils@2.24+krellpatch") + + # collectionTool + depends_on("boost@1.41:") + depends_on("dyninst@8.2.1:+krelloptions") + depends_on("mrnet@4.1.0:+krelloptions") + depends_on("xerces-c@3.1.1:") + depends_on("cbtf") + + # for services and collectors + depends_on("libmonitor+krellpatch") + depends_on("libunwind") + depends_on("papi") + + # MPI Installations + # These have not worked either for build or execution, commenting out for now + #depends_on("openmpi") + #depends_on("mvapich2@2.0") + #depends_on("mpich") + + parallel = False + + def install(self, spec, prefix): + + # Add in paths for finding package config files that tell us where to find these packages + cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['dyninst'].prefix) + + # FIXME - hard code path until external package support is available + # Need to change this path and/or add additional paths for MPI experiment support on different platforms + openmpi_prefix_path = "/opt/openmpi-1.8.2" + # Other possibilities, they will need a -DMVAPICH_DIR=, etc clause in the cmake command to be recognized + # mvapich_prefix_path = "" + # mvapich2_prefix_path = "" + # mpich2_prefix_path = "" + # mpich_prefix_path = "" + # mpt_prefix_path = "" + + # Add in paths for cuda if requested via the cuda variant + # FIXME - hard code path until external package support is available + if '+cuda' in spec: + cuda_prefix_path = "/usr/local/cuda-6.0" + cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI" + else: + cuda_prefix_path = "" + cupti_prefix_path = "" + + #'-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix, + #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, + #'-DMPICH_DIR=%s' % spec['mpich'].prefix, + #'-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + #'-DLIB_SUFFIX=64', + + # Build cbtf-krell with cmake + with working_dir('build_cbtf_krell', create=True): + cmake('..', + '-DCMAKE_BUILD_TYPE=Debug', + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, + '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + '-DPAPI_DIR=%s' % spec['papi'].prefix, + '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DCUDA_DIR=%s' % cuda_prefix_path, + '-DCUPTI_DIR=%s' % cupti_prefix_path, + '-DOPENMPI_DIR=%s' % openmpi_prefix_path, + *std_cmake_args) + + make("clean") + make() + make("install") + -- cgit v1.2.3-70-g09d2 From e8235b10c610aae51213e8f090e3bf692f99adcc Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 11:23:23 -0500 Subject: Add the cbtf-lanl spack build package. cbtf-lanl is LANLs contribution to the CBTF project. It contains psTool and memTool which are example tools, showing use case examples for CBTF. --- var/spack/packages/cbtf-lanl/package.py | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 var/spack/packages/cbtf-lanl/package.py diff --git a/var/spack/packages/cbtf-lanl/package.py b/var/spack/packages/cbtf-lanl/package.py new file mode 100644 index 0000000000..b833871df7 --- /dev/null +++ b/var/spack/packages/cbtf-lanl/package.py @@ -0,0 +1,59 @@ +################################################################################ +# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public 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 * + +class CbtfLanl(Package): + """CBTF LANL project contains a memory tool and data center type system command monitoring tool.""" + homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" + + url = "http://sourceforge.net/projects/cbtf/files/cbtf-1.5/cbtf-lanl-1.5.tar.gz/download" + version('1.5', '78d42050f9ec7127e8d0a93d87a66702') + + # Mirror access template example + #url = "file:/opt/spack-mirror-2015-02-27/cbtf-lanl/cbtf-lanl-1.5.tar.gz" + #version('1.5', 'c3f78f967b0a42c6734ce4be0e602426') + + # Dependencies for cbtf-krell + depends_on("boost@1.41:") + depends_on("mrnet@4.1.0+krelloptions") + depends_on("xerces-c@3.1.1:") + depends_on("cbtf") + depends_on("cbtf-krell") + + parallel = False + + def install(self, spec, prefix): + + # Add in paths for finding package config files that tell us where to find these packages + cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) + + with working_dir('build', create=True): + cmake('..', + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake'), + *std_cmake_args) + + make("clean") + make() + make("install") + -- cgit v1.2.3-70-g09d2 From 9fee7be695eb92391b8754593877dded097ea8c8 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 21 Jul 2015 11:26:59 -0500 Subject: Add the initial version of the OpenSpeedShop spack build file. OpenSpeedShop is an application performance analysis tool that runs on Linux and gathers a number of different types of performance data and displays that data in a command line tool (CLI) and via a graphical user interface (GUI). --- var/spack/packages/openspeedshop/package.py | 193 ++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 var/spack/packages/openspeedshop/package.py diff --git a/var/spack/packages/openspeedshop/package.py b/var/spack/packages/openspeedshop/package.py new file mode 100644 index 0000000000..94fec4a21c --- /dev/null +++ b/var/spack/packages/openspeedshop/package.py @@ -0,0 +1,193 @@ +################################################################################ +# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public 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 * + +class Openspeedshop(Package): + """OpenSpeedShop is a community effort by The Krell Institute with current direct funding from DOEs NNSA. + It builds on top of a broad list of community infrastructures, most notably Dyninst and MRNet from UW, + libmonitor from Rice, and PAPI from UTK. OpenSpeedShop is an open source multi platform Linux performance + tool which is targeted to support performance analysis of applications running on both single node and + large scale IA64, IA32, EM64T, AMD64, PPC, ARM, Blue Gene and Cray platforms. OpenSpeedShop development + is hosted by the Krell Institute. The infrastructure and base components of OpenSpeedShop are released + as open source code primarily under LGPL. + """ + + homepage = "http://www.openspeedshop.org" + url = "http://sourceforge.net/projects/openss/files/openss/openspeedshop-2.1/openspeedshop-2.1.tar.gz/download" + version('2.1', '85ab0f883f16ea23815a670b5ec8e5d6') + + # optional mirror template + #url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.1.tar.gz" + #version('2.1', '85ab0f883f16ea23815a670b5ec8e5d6') + + parallel = False + + variant('offline', default=False, description="build with offline instrumentor enabled.") + variant('cbtf', default=False, description="build with cbtf instrumentor enabled.") + variant('runtime', default=False, description="build only the runtime libraries and collectors.") + variant('frontend', default=False, description="build only the front-end tool using the runtime_dir to point to the target build.") + variant('cuda', default=False, description="build with cuda packages included.") + variant('ptgf', default=False, description="build with the PTGF based gui package enabled.") + variant('intelmic', default=False, description="build for the Intel MIC platform.") + variant('cray', default=False, description="build for Cray platforms.") + variant('bluegene', default=False, description="build for Cray platforms.") + variant('rtfe', default=False, description="build for generic cluster platforms that have different processors on the fe and be nodes.") + + # Dependencies for openspeedshop that are common to all the variants of the OpenSpeedShop build + depends_on("bison") + depends_on("flex") + depends_on("binutils@2.24+krellpatch") + depends_on("libelf") + depends_on("libdwarf") + depends_on("sqlite") + depends_on("boost@1.41:") + depends_on("dyninst@8.2.1:+krelloptions") + depends_on("python") + depends_on("qt@3.3.8b+krellpatch") + + # Dependencies only for the openspeedshop offline package. + depends_on("libunwind", when='+offline') + depends_on("papi", when='+offline') + depends_on("libmonitor+krellpatch", when='+offline') + #depends_on("openmpi+krelloptions", when='+offline') + #depends_on("openmpi", when='+offline') + #depends_on("mpich", when='+offline') + + # Dependencies only for the openspeedshop cbtf package. + depends_on("cbtf", when='+cbtf') + depends_on("cbtf-krell", when='+cbtf') + depends_on("cbtf-argonavis", when='+cbtf') + depends_on("mrnet@4.1.0:+krelloptions", when='+cbtf') + + def install(self, spec, prefix): + + openmpi_prefix_path = "/opt/openmpi-1.8.2" + #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, + #'-DMPICH_DIR=%s' % spec['mpich'].prefix, + + # FIXME: How do we make this dynamic in spack? That is, can we specify the paths to cuda dynamically? + # WAITING for external package support. + if '+cuda' in spec: + cuda_prefix_path = "/usr/local/cuda-6.0" + cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI" + + if '+offline' in spec: + instrumentor_setting = "offline" + if '+runtime' in spec: + with working_dir('build_runtime', create=True): + cmake('..', + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DINSTRUMENTOR=%s' % instrumentor_setting, + '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, + '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + '-DPAPI_DIR=%s' % spec['papi'].prefix, + '-DOPENMPI_DIR=%s' % openmpi_prefix_path, + *std_cmake_args) + make("clean") + make() + make("install") + else: + cmake_prefix_path = join_path(spec['dyninst'].prefix) + with working_dir('build', create=True): + cmake('..', + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DINSTRUMENTOR=%s' % instrumentor_setting, + '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + '-DLIBELF_DIR=%s' % spec['libelf'].prefix, + '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, + '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, + '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + '-DPAPI_DIR=%s' % spec['papi'].prefix, + '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix, + '-DQTLIB_DIR=%s' % spec['qt'].prefix, + '-DPYTHON_DIR=%s' % spec['python'].prefix, + '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + '-DOPENMPI_DIR=%s' % openmpi_prefix_path, + *std_cmake_args) + make("clean") + make() + make("install") + + elif '+cbtf' in spec: + instrumentor_setting = "cbtf" + cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) + ':' + join_path(spec['dyninst'].prefix) + if '+runtime' in spec: + with working_dir('build_cbtf_runtime', create=True): + cmake('..', + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DINSTRUMENTOR=%s' % instrumentor_setting, + '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + '-DLIBELF_DIR=%s' % spec['libelf'].prefix, + '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + '-DPYTHON_DIR=%s' % spec['python'].prefix, + '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + *std_cmake_args) + make("clean") + make() + make("install") + + else: + with working_dir('build_cbtf', create=True): + cmake('..', + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DINSTRUMENTOR=%s' % instrumentor_setting, + '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + '-DLIBELF_DIR=%s' % spec['libelf'].prefix, + '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, + '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + '-DQTLIB_DIR=%s' % spec['qt'].prefix, + '-DPYTHON_DIR=%s' % spec['python'].prefix, + '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + *std_cmake_args) + make("clean") + make() + make("install") + + #if '+frontend' in spec: + # with working_dir('build_frontend', create=True): + # tbd + + + #if '+intelmic' in spec: + # with working_dir('build_intelmic_compute', create=True): + # tbd + # with working_dir('build_intelmic_frontend', create=True): + # tbd + + #if '+cray' in spec: + # with working_dir('build_cray_compute', create=True): + # tbd + # with working_dir('build_cray_frontend', create=True): + # tbd -- cgit v1.2.3-70-g09d2 From 24c609b6df5f7e30df0aa72f4c16f7272f1086cd Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Sat, 22 Aug 2015 09:34:44 -0500 Subject: Updates to the Krell related product packages. --- var/spack/packages/cbtf-argonavis/package.py | 14 +++++----- var/spack/packages/cbtf-krell/package.py | 12 ++++---- var/spack/packages/cbtf-lanl/package.py | 9 +++--- var/spack/packages/cbtf/package.py | 11 +++----- var/spack/packages/openspeedshop/package.py | 42 ++++++++++++++++++++-------- 5 files changed, 53 insertions(+), 35 deletions(-) diff --git a/var/spack/packages/cbtf-argonavis/package.py b/var/spack/packages/cbtf-argonavis/package.py index 5f76a18dae..2dccb0e0c6 100644 --- a/var/spack/packages/cbtf-argonavis/package.py +++ b/var/spack/packages/cbtf-argonavis/package.py @@ -23,14 +23,13 @@ class CbtfArgonavis(Package): libraries that was done as a result of a DOE SBIR grant.""" homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" - url = "http://sourceforge.net/projects/cbtf/files/cbtf-1.5/cbtf-argonavis-1.5.tar.gz/download" - version('1.5', '8708197dbc08980fcd7b1a3a3a40a2c9') - # Mirror access template example - #url = "file:/opt/spack-mirror-2015-02-27/cbtf-argonavis/cbtf-argonavis-1.5.tar.gz" + #url = "file:/g/g24/jeg/cbtf-argonavis-1.5.tar.gz" #version('1.5', '1f7f6512f55409ed2135cfceabe26b82') - depends_on("cmake") + version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-argonavis/cbtf-argonavis') + + depends_on("cmake@3.0.2:") depends_on("papi") depends_on("cbtf") depends_on("cbtf-krell") @@ -44,8 +43,9 @@ class CbtfArgonavis(Package): cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) # FIXME, hard coded for testing purposes, we will alter when the external package feature is available - cuda_prefix_path = "/usr/local/cuda-6.0" - cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI" + cuda_prefix_path = "/opt/cudatoolkit-6.5" + cupti_prefix_path = "/opt/cudatoolkit-6.5/extras/CUPTI" + with working_dir('CUDA'): with working_dir('build', create=True): diff --git a/var/spack/packages/cbtf-krell/package.py b/var/spack/packages/cbtf-krell/package.py index 0661b101a1..3f486b86ce 100644 --- a/var/spack/packages/cbtf-krell/package.py +++ b/var/spack/packages/cbtf-krell/package.py @@ -25,13 +25,12 @@ class CbtfKrell(Package): HPC levels of scale.""" homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" - url = "http://sourceforge.net/projects/cbtf/files/cbtf-1.5/cbtf-krell-1.5.tar.gz/download" - version('1.5', '86cca5aa48a65206d3ac5502fcbd3ef6') - # optional mirror access template - #url = "file:/opt/spack-mirror-2015-02-27/cbtf-krell/cbtf-krell-1.5.tar.gz" + #url = "file:/g/g24/jeg/cbtf-krell-1.5.tar.gz" #version('1.5', 'b13f6df6a93c44149d977773dd776d2f') + version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-krell/cbtf-krell') + # Dependencies for cbtf-krell @@ -39,7 +38,7 @@ class CbtfKrell(Package): depends_on("binutils@2.24+krellpatch") # collectionTool - depends_on("boost@1.41:") + depends_on("boost@1.42:") depends_on("dyninst@8.2.1:+krelloptions") depends_on("mrnet@4.1.0:+krelloptions") depends_on("xerces-c@3.1.1:") @@ -66,6 +65,8 @@ class CbtfKrell(Package): # FIXME - hard code path until external package support is available # Need to change this path and/or add additional paths for MPI experiment support on different platforms openmpi_prefix_path = "/opt/openmpi-1.8.2" + mvapich_prefix_path = "/usr/local/tools/mvapich-gnu" + # Other possibilities, they will need a -DMVAPICH_DIR=, etc clause in the cmake command to be recognized # mvapich_prefix_path = "" # mvapich2_prefix_path = "" @@ -106,6 +107,7 @@ class CbtfKrell(Package): '-DCUDA_DIR=%s' % cuda_prefix_path, '-DCUPTI_DIR=%s' % cupti_prefix_path, '-DOPENMPI_DIR=%s' % openmpi_prefix_path, + '-DMVAPICH_DIR=%s' % mvapich_prefix_path, *std_cmake_args) make("clean") diff --git a/var/spack/packages/cbtf-lanl/package.py b/var/spack/packages/cbtf-lanl/package.py index b833871df7..25f91d8c2f 100644 --- a/var/spack/packages/cbtf-lanl/package.py +++ b/var/spack/packages/cbtf-lanl/package.py @@ -22,15 +22,16 @@ class CbtfLanl(Package): """CBTF LANL project contains a memory tool and data center type system command monitoring tool.""" homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" - url = "http://sourceforge.net/projects/cbtf/files/cbtf-1.5/cbtf-lanl-1.5.tar.gz/download" - version('1.5', '78d42050f9ec7127e8d0a93d87a66702') # Mirror access template example - #url = "file:/opt/spack-mirror-2015-02-27/cbtf-lanl/cbtf-lanl-1.5.tar.gz" + #url = "file:/g/g24/jeg/cbtf-lanl-1.5.tar.gz" #version('1.5', 'c3f78f967b0a42c6734ce4be0e602426') + version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl') + + # Dependencies for cbtf-krell - depends_on("boost@1.41:") + depends_on("boost@1.42:") depends_on("mrnet@4.1.0+krelloptions") depends_on("xerces-c@3.1.1:") depends_on("cbtf") diff --git a/var/spack/packages/cbtf/package.py b/var/spack/packages/cbtf/package.py index d2023ada85..46d47153e6 100644 --- a/var/spack/packages/cbtf/package.py +++ b/var/spack/packages/cbtf/package.py @@ -24,18 +24,15 @@ class Cbtf(Package): networks into sequential and distributed network tools.""" homepage = "http://sourceforge.net/p/cbtf/wiki/Home" - url = "http://sourceforge.net/projects/cbtf/files/cbtf-1.5/cbtf-1.5.tar.gz/download" - version('1.5', '75a97e0161d19b3a12305ed1ffb3d3e2') - # Mirror access template example - #url = "file:/opt/spack-mirror-2015-02-27/cbtf/cbtf-1.5.tar.gz" - #version('1.5', '1ca88a8834759c4c74452cb97fe7b70a') + #url = "file:/g/g24/jeg/cbtf-1.5.tar.gz" + #version('1.6', '1ca88a8834759c4c74452cb97fe7b70a') # Use when the git repository is available - #version('1.5', branch='master', git='http://git.code.sf.net/p/cbtf/cbtf') + version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf/cbtf') depends_on("cmake") - depends_on("boost@1.41:") + depends_on("boost@1.42:") depends_on("mrnet@4.1.0+krelloptions") depends_on("xerces-c@3.1.1:") depends_on("libxml2") diff --git a/var/spack/packages/openspeedshop/package.py b/var/spack/packages/openspeedshop/package.py index 94fec4a21c..3c24aed882 100644 --- a/var/spack/packages/openspeedshop/package.py +++ b/var/spack/packages/openspeedshop/package.py @@ -30,11 +30,13 @@ class Openspeedshop(Package): homepage = "http://www.openspeedshop.org" url = "http://sourceforge.net/projects/openss/files/openss/openspeedshop-2.1/openspeedshop-2.1.tar.gz/download" - version('2.1', '85ab0f883f16ea23815a670b5ec8e5d6') + version('2.1', '64ee17166519838c7b94a1adc138e94f') # optional mirror template - #url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.1.tar.gz" - #version('2.1', '85ab0f883f16ea23815a670b5ec8e5d6') + #url = "file:/g/g24/jeg/openspeedshop-2.1.tar.gz" + #version('2.1', '64ee17166519838c7b94a1adc138e94f') + + parallel = False @@ -56,7 +58,7 @@ class Openspeedshop(Package): depends_on("libelf") depends_on("libdwarf") depends_on("sqlite") - depends_on("boost@1.41:") + depends_on("boost@1.42:") depends_on("dyninst@8.2.1:+krelloptions") depends_on("python") depends_on("qt@3.3.8b+krellpatch") @@ -72,14 +74,14 @@ class Openspeedshop(Package): # Dependencies only for the openspeedshop cbtf package. depends_on("cbtf", when='+cbtf') depends_on("cbtf-krell", when='+cbtf') - depends_on("cbtf-argonavis", when='+cbtf') + #depends_on("cbtf-argonavis", when='+cbtf') depends_on("mrnet@4.1.0:+krelloptions", when='+cbtf') def install(self, spec, prefix): openmpi_prefix_path = "/opt/openmpi-1.8.2" + mvapich_prefix_path = "/usr/local/tools/mvapich-gnu" #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, - #'-DMPICH_DIR=%s' % spec['mpich'].prefix, # FIXME: How do we make this dynamic in spack? That is, can we specify the paths to cuda dynamically? # WAITING for external package support. @@ -99,6 +101,7 @@ class Openspeedshop(Package): '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, '-DPAPI_DIR=%s' % spec['papi'].prefix, '-DOPENMPI_DIR=%s' % openmpi_prefix_path, + '-DMVAPICH_DIR=%s' % mvapich_prefix_path, *std_cmake_args) make("clean") make() @@ -106,6 +109,8 @@ class Openspeedshop(Package): else: cmake_prefix_path = join_path(spec['dyninst'].prefix) with working_dir('build', create=True): + #python_vers=join_path(spec['python'].version[:2]) + python_vers='%d.%d' % spec['python'].version[:2] cmake('..', '-DCMAKE_INSTALL_PREFIX=%s' % prefix, '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, @@ -119,10 +124,14 @@ class Openspeedshop(Package): '-DPAPI_DIR=%s' % spec['papi'].prefix, '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix, '-DQTLIB_DIR=%s' % spec['qt'].prefix, - '-DPYTHON_DIR=%s' % spec['python'].prefix, - '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DPYTHON_EXECUTABLE=%s' % join_path(spec['python'].prefix + '/bin/python'), + '-DPYTHON_INCLUDE_DIR=%s' % join_path(spec['python'].prefix.include) + '/python' + python_vers, + '-DPYTHON_LIBRARY=%s' % join_path(spec['python'].prefix.lib) + '/libpython' + python_vers + '.so', + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DBOOST_ROOT=%s' % spec['boost'].prefix, '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, '-DOPENMPI_DIR=%s' % openmpi_prefix_path, + '-DMVAPICH_DIR=%s' % mvapich_prefix_path, *std_cmake_args) make("clean") make() @@ -133,6 +142,7 @@ class Openspeedshop(Package): cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) + ':' + join_path(spec['dyninst'].prefix) if '+runtime' in spec: with working_dir('build_cbtf_runtime', create=True): + python_vers='%d.%d' % spec['python'].version[:2] cmake('..', '-DCMAKE_INSTALL_PREFIX=%s' % prefix, '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, @@ -143,8 +153,11 @@ class Openspeedshop(Package): '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, '-DCBTF_DIR=%s' % spec['cbtf'].prefix, '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, - '-DPYTHON_DIR=%s' % spec['python'].prefix, - '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DPYTHON_EXECUTABLE=%s' % join_path(spec['python'].prefix + '/bin/python'), + '-DPYTHON_INCLUDE_DIR=%s' % join_path(spec['python'].prefix.include) + '/python' + python_vers, + '-DPYTHON_LIBRARY=%s' % join_path(spec['python'].prefix.lib) + '/libpython' + python_vers + '.so', + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DBOOST_ROOT=%s' % spec['boost'].prefix, '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, '-DMRNET_DIR=%s' % spec['mrnet'].prefix, *std_cmake_args) @@ -154,6 +167,8 @@ class Openspeedshop(Package): else: with working_dir('build_cbtf', create=True): + python_vers='%d.%d' % spec['python'].version[:2] + #python_vers=join_path(spec['python'].version[:2]) cmake('..', '-DCMAKE_INSTALL_PREFIX=%s' % prefix, '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, @@ -166,8 +181,11 @@ class Openspeedshop(Package): '-DCBTF_DIR=%s' % spec['cbtf'].prefix, '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, '-DQTLIB_DIR=%s' % spec['qt'].prefix, - '-DPYTHON_DIR=%s' % spec['python'].prefix, - '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DPYTHON_EXECUTABLE=%s' % join_path(spec['python'].prefix + '/bin/python'), + '-DPYTHON_INCLUDE_DIR=%s' % join_path(spec['python'].prefix.include) + '/python' + python_vers, + '-DPYTHON_LIBRARY=%s' % join_path(spec['python'].prefix.lib) + '/libpython' + python_vers + '.so', + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DBOOST_ROOT=%s' % spec['boost'].prefix, '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, '-DMRNET_DIR=%s' % spec['mrnet'].prefix, *std_cmake_args) -- cgit v1.2.3-70-g09d2 From 3691201b4f44da9fc373c8368cc6efaeae7b6387 Mon Sep 17 00:00:00 2001 From: Justin Too Date: Mon, 21 Sep 2015 11:03:49 -0700 Subject: (Package) Add Spot C++ library (v1.99.3) --- var/spack/packages/spot/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/packages/spot/package.py diff --git a/var/spack/packages/spot/package.py b/var/spack/packages/spot/package.py new file mode 100644 index 0000000000..9e539277ae --- /dev/null +++ b/var/spack/packages/spot/package.py @@ -0,0 +1,18 @@ +from spack import * +import os + +class Spot(Package): + """Spot is a C++11 library for omega-automata manipulation and model checking.""" + homepage = "https://spot.lrde.epita.fr/index.html" + url = "http://www.lrde.epita.fr/dload/spot/spot-1.99.3.tar.gz" + + version('1.99.3', 'd53adcb2d0fe7c69f45d4e595a58254e') + + #depends_on("gcc@4.8:") + depends_on("python@3.2:") + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") -- cgit v1.2.3-70-g09d2 From d6a2ab08acd8f4cbedca20ac182329d1090af056 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Fri, 6 Nov 2015 11:47:00 -0800 Subject: Match up with the new binutils package file. It does what OSS needs w.r.t. libiberty. --- var/spack/packages/binutils/package.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py index 43a670585e..29b8de462b 100644 --- a/var/spack/packages/binutils/package.py +++ b/var/spack/packages/binutils/package.py @@ -13,19 +13,22 @@ class Binutils(Package): variant('krellpatch', default=False, description="build with openspeedshop based patch.") patch('binutilskrell-2.24.patch', when='@2.24+krellpatch') + variant('libiberty', default=False, description='Also install libiberty.') + def install(self, spec, prefix): - # Add additional configuration options for use in the OpenSpeedShop project - if '+krellpatch' in spec: - configure('--prefix', self.prefix, - '--libdir', self.prefix.lib, - '--enable-shared', - '--enable-install-libiberty', - '--disable-multilib' - ) - else: - configure("--prefix=%s" % prefix) + configure_args = [ + '--prefix=%s' % prefix, + '--disable-dependency-tracking', + '--enable-interwork', + '--enable-multilib', + '--enable-shared', + '--enable-64-bit-bfd', + '--enable-targets=all'] + if '+libiberty' in spec: + configure_args.append('--enable-install-libiberty') + configure(*configure_args) make() make("install") -- cgit v1.2.3-70-g09d2 From 7e6b7795f1cd1e73591c3fba5602220d20d453e6 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Fri, 6 Nov 2015 11:53:53 -0800 Subject: Match up with the new binutils package file. It does what OSS needs w.r.t. libiberty. --- var/spack/packages/binutils/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py index 29b8de462b..5ef9a80cca 100644 --- a/var/spack/packages/binutils/package.py +++ b/var/spack/packages/binutils/package.py @@ -15,6 +15,8 @@ class Binutils(Package): variant('libiberty', default=False, description='Also install libiberty.') + variant('libiberty', default=False, description='Also install libiberty.') + def install(self, spec, prefix): configure_args = [ -- cgit v1.2.3-70-g09d2 From aa9b14aff47864c04f99bd4c83fb10dc6a9c49ad Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Fri, 6 Nov 2015 11:55:20 -0800 Subject: Match up with the new binutils package file. It does what OSS needs w.r.t. libiberty. --- var/spack/packages/binutils/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py index 5ef9a80cca..c939822cdb 100644 --- a/var/spack/packages/binutils/package.py +++ b/var/spack/packages/binutils/package.py @@ -17,8 +17,9 @@ class Binutils(Package): variant('libiberty', default=False, description='Also install libiberty.') - def install(self, spec, prefix): + variant('libiberty', default=False, description='Also install libiberty.') + def install(self, spec, prefix): configure_args = [ '--prefix=%s' % prefix, '--disable-dependency-tracking', -- cgit v1.2.3-70-g09d2 From 2aa501bf3db5c3962b6f2a0932e21afe03db9329 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Fri, 6 Nov 2015 14:19:00 -0800 Subject: Update the checksum value for the new tarball --- var/spack/packages/openspeedshop/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/packages/openspeedshop/package.py b/var/spack/packages/openspeedshop/package.py index 3c24aed882..93f356fb92 100644 --- a/var/spack/packages/openspeedshop/package.py +++ b/var/spack/packages/openspeedshop/package.py @@ -30,7 +30,7 @@ class Openspeedshop(Package): homepage = "http://www.openspeedshop.org" url = "http://sourceforge.net/projects/openss/files/openss/openspeedshop-2.1/openspeedshop-2.1.tar.gz/download" - version('2.1', '64ee17166519838c7b94a1adc138e94f') + version('2.1', 'bdaa57c1a0db9d0c3e0303fd8496c507') # optional mirror template #url = "file:/g/g24/jeg/openspeedshop-2.1.tar.gz" -- cgit v1.2.3-70-g09d2 From 0ced060b87b129c47666ef91f79d52d94e79e291 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Fri, 6 Nov 2015 15:15:38 -0800 Subject: cbtf did not compile with boost 1.59, so reverted to boost 1.50 temporarily until we fix the cbtf/boost compile issues. --- var/spack/packages/cbtf/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/packages/cbtf/package.py b/var/spack/packages/cbtf/package.py index 46d47153e6..6f1e49deed 100644 --- a/var/spack/packages/cbtf/package.py +++ b/var/spack/packages/cbtf/package.py @@ -32,7 +32,8 @@ class Cbtf(Package): version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf/cbtf') depends_on("cmake") - depends_on("boost@1.42:") + #depends_on("boost@1.42:") + depends_on("boost@1.50") depends_on("mrnet@4.1.0+krelloptions") depends_on("xerces-c@3.1.1:") depends_on("libxml2") -- cgit v1.2.3-70-g09d2 From 3ce99cf4e18b599a42041a486b82498a0f43a488 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 25 Nov 2015 11:02:51 -0800 Subject: fix for the shell arg handling issues The setup-env.sh script now saves off the argument array before shifting off all the arguments so that the final command invocation doesn't arbitrarily requote the arguments. All external quoting is preserved now. This has been thoroughly tested with zsh, but should probably be tested with bash etc. before acceptance. --- share/spack/setup-env.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index b90846d28f..8ee42bb10f 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -56,6 +56,12 @@ # spack dotfiles. ######################################################################## function spack { + # save raw arguments into an array before butchering them + args=() + for a in "$@"; do + # yup, this is awful, blame bash2 compat + args=("${args[@]}" "$a") + done # accumulate initial flags for main spack command _sp_flags="" while [[ "$1" =~ ^- ]]; do @@ -116,7 +122,7 @@ function spack { esac ;; *) - command spack $_sp_flags $_sp_subcommand $_sp_spec + command spack "${args[@]}" ;; esac } -- cgit v1.2.3-70-g09d2 From aa137d8be0101776f0841e3d75642245454d2b32 Mon Sep 17 00:00:00 2001 From: Simon Thompson Date: Wed, 2 Dec 2015 14:20:11 +0000 Subject: fix build to work against depends for modules created by setup.py and add python3 support --- var/spack/packages/python/package.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py index 31fb8b3d5a..12b282910b 100644 --- a/var/spack/packages/python/package.py +++ b/var/spack/packages/python/package.py @@ -2,6 +2,7 @@ import os import re from contextlib import closing from llnl.util.lang import match_predicate +from spack.util.environment import * from spack import * import spack @@ -16,22 +17,33 @@ class Python(Package): version('2.7.8', 'd235bdfa75b8396942e360a70487ee00') version('2.7.10', 'c685ef0b8e9f27b5e3db5db12b268ac6') + version('3.5.0', 'd149d2812f10cbe04c042232e7964171') depends_on("openssl") depends_on("bzip2") depends_on("readline") depends_on("ncurses") depends_on("sqlite") + depends_on("zlib") def install(self, spec, prefix): # Need this to allow python build to find the Python installation. env['PYTHONHOME'] = prefix env['MACOSX_DEPLOYMENT_TARGET'] = '10.6' - # Rest of install is pretty standard. + # Rest of install is pretty standard except setup.py needs to be able to read the CPPFLAGS + # and LDFLAGS as it scans for the library and headers to build configure("--prefix=%s" % prefix, "--with-threads", - "--enable-shared") + "--enable-shared", + "CPPFLAGS=-I%s/include -I%s/include -I%s/include -I%s/include -I%s/include -I%s/include" % ( + spec['openssl'].prefix, spec['bzip2'].prefix, + spec['readline'].prefix, spec['ncurses'].prefix, + spec['sqlite'].prefix, spec['zlib'].prefix), + "LDFLAGS=-L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib" % ( + spec['openssl'].prefix, spec['bzip2'].prefix, + spec['readline'].prefix, spec['ncurses'].prefix, + spec['sqlite'].prefix, spec['zlib'].prefix)) make() make("install") @@ -63,7 +75,10 @@ class Python(Package): python('setup.py', 'install', '--prefix=%s' % prefix) """ # Python extension builds can have a global python executable function - module.python = Executable(join_path(spec.prefix.bin, 'python')) + if self.version >= Version("3.0.0") and self.version < Version("4.0.0"): + module.python = Executable(join_path(spec.prefix.bin, 'python3')) + else: + module.python = Executable(join_path(spec.prefix.bin, 'python')) # Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs. module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir) -- cgit v1.2.3-70-g09d2 From 0daa08416a0209a71b131fb9c8b4d58fa222474f Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 9 Dec 2015 20:00:54 +0100 Subject: corrected filter_compilers + added it for mvapich2 --- var/spack/packages/mpich/package.py | 13 +++++++++---- var/spack/packages/mvapich2/package.py | 30 +++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/var/spack/packages/mpich/package.py b/var/spack/packages/mpich/package.py index e018a08201..7cfa0a3b61 100644 --- a/var/spack/packages/mpich/package.py +++ b/var/spack/packages/mpich/package.py @@ -85,8 +85,13 @@ class Mpich(Package): mpif77 = os.path.join(bin, 'mpif77') mpif90 = os.path.join(bin, 'mpif90') + spack_cc = os.environ['CC'] + spack_cxx = os.environ['CXX'] + spack_f77 = os.environ['F77'] + spack_fc = os.environ['FC'] + kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True } - filter_file('CC="cc"', 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) - filter_file('CXX="c++"', 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) - filter_file('F77="f77"', 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) - filter_file('FC="f90"', 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) + filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) + filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) + filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) + filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) diff --git a/var/spack/packages/mvapich2/package.py b/var/spack/packages/mvapich2/package.py index dc2b2cb23f..23a11b3171 100644 --- a/var/spack/packages/mvapich2/package.py +++ b/var/spack/packages/mvapich2/package.py @@ -1,5 +1,5 @@ from spack import * - +import os class Mvapich2(Package): """MVAPICH2 is an MPI implementation for Infiniband networks.""" @@ -154,3 +154,31 @@ class Mvapich2(Package): configure(*configure_args) make() make("install") + + self.filter_compilers() + + + def filter_compilers(self): + """Run after install to make the MPI compilers use the + compilers that Spack built the package with. + + If this isn't done, they'll have CC, CXX, F77, and FC set + to Spack's generic cc, c++, f77, and f90. We want them to + be bound to whatever compiler they were built with. + """ + bin = self.prefix.bin + mpicc = os.path.join(bin, 'mpicc') + mpicxx = os.path.join(bin, 'mpicxx') + mpif77 = os.path.join(bin, 'mpif77') + mpif90 = os.path.join(bin, 'mpif90') + + spack_cc = os.environ['CC'] + spack_cxx = os.environ['CXX'] + spack_f77 = os.environ['F77'] + spack_fc = os.environ['FC'] + + kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True } + filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) + filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) + filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) + filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) -- cgit v1.2.3-70-g09d2 From 25f2b01a3cbf74fa86f349287e8026ea422fbeb3 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Thu, 10 Dec 2015 07:27:06 -0800 Subject: fetch: add options to fetch missing or all deps Small additions to fetch to make it easier to fetch all files necessary for a build on a system without network connectivity. --- lib/spack/spack/cmd/fetch.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py index 6f9e7ab5e2..04cad80bd2 100644 --- a/lib/spack/spack/cmd/fetch.py +++ b/lib/spack/spack/cmd/fetch.py @@ -33,10 +33,13 @@ def setup_parser(subparser): subparser.add_argument( '-n', '--no-checksum', action='store_true', dest='no_checksum', help="Do not check packages against checksum") + subparser.add_argument( + '-m', '--missing', action='store_true', help="Also fetch all missing dependencies") + subparser.add_argument( + '-d', '--dependencies', action='store_true', help="Also fetch all dependencies") subparser.add_argument( 'packages', nargs=argparse.REMAINDER, help="specs of packages to fetch") - def fetch(parser, args): if not args.packages: tty.die("fetch requires at least one package argument") @@ -46,5 +49,13 @@ def fetch(parser, args): specs = spack.cmd.parse_specs(args.packages, concretize=True) for spec in specs: + if args.missing or args.dependencies: + to_fetch = set() + for s in spec.traverse(): + package = spack.db.get(s) + if args.missing and package.installed: + continue + package.do_fetch() + package = spack.db.get(spec) package.do_fetch() -- cgit v1.2.3-70-g09d2 From 786f4cd2c2cc492f25f8886223efaa397ac97185 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Thu, 10 Dec 2015 08:32:51 -0800 Subject: add dependency fetching to mirror creation --- lib/spack/spack/cmd/fetch.py | 2 +- lib/spack/spack/cmd/mirror.py | 11 ++++++++++- var/spack/packages/py-cffi/package.py | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py index 04cad80bd2..57d6f6b63b 100644 --- a/lib/spack/spack/cmd/fetch.py +++ b/lib/spack/spack/cmd/fetch.py @@ -36,7 +36,7 @@ def setup_parser(subparser): subparser.add_argument( '-m', '--missing', action='store_true', help="Also fetch all missing dependencies") subparser.add_argument( - '-d', '--dependencies', action='store_true', help="Also fetch all dependencies") + '-D', '--dependencies', action='store_true', help="Also fetch all dependencies") subparser.add_argument( 'packages', nargs=argparse.REMAINDER, help="specs of packages to fetch") diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index 4a1ce00b75..10348e5b99 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -54,6 +54,8 @@ def setup_parser(subparser): 'specs', nargs=argparse.REMAINDER, help="Specs of packages to put in mirror") create_parser.add_argument( '-f', '--file', help="File with specs of packages to put in mirror.") + create_parser.add_argument( + '-D', '--dependencies', action='store_true', help="Also fetch all dependencies") create_parser.add_argument( '-o', '--one-version-per-spec', action='store_const', const=1, default=0, help="Only fetch one 'preferred' version per spec, not all known versions.") @@ -118,7 +120,7 @@ def mirror_create(args): """Create a directory to be used as a spack mirror, and fill it with package archives.""" # try to parse specs from the command line first. - specs = spack.cmd.parse_specs(args.specs) + specs = spack.cmd.parse_specs(args.specs, concretize=True) # If there is a file, parse each line as a spec and add it to the list. if args.file: @@ -131,6 +133,13 @@ def mirror_create(args): specs = [Spec(n) for n in spack.db.all_package_names()] specs.sort(key=lambda s: s.format("$_$@").lower()) + if args.dependencies: + new_specs = set() + for spec in specs: + for s in spec.traverse(): + new_specs.add(s) + specs = list(new_specs) + # Default name for directory is spack-mirror- directory = args.directory if not directory: diff --git a/var/spack/packages/py-cffi/package.py b/var/spack/packages/py-cffi/package.py index a4d37483fe..909049a67c 100644 --- a/var/spack/packages/py-cffi/package.py +++ b/var/spack/packages/py-cffi/package.py @@ -4,7 +4,7 @@ class PyCffi(Package): """Foreign Function Interface for Python calling C code""" homepage = "http://cffi.readthedocs.org/en/latest/" # base https://pypi.python.org/pypi/cffi - url = "https://pypi.python.org/packages/source/c/cffi/cffi-1.1.2.tar.gz#md5=" + url = "https://pypi.python.org/packages/source/c/cffi/cffi-1.1.2.tar.gz" version('1.1.2', 'ca6e6c45b45caa87aee9adc7c796eaea') -- cgit v1.2.3-70-g09d2 From 281a869ef699c354f31bbb069ab28012b65c9b4c Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Thu, 10 Dec 2015 09:24:01 -0800 Subject: fix path resolution for mirror packages, especially with dependency fetching --- lib/spack/spack/cmd/mirror.py | 1 + lib/spack/spack/mirror.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index 10348e5b99..89d51bbe04 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -136,6 +136,7 @@ def mirror_create(args): if args.dependencies: new_specs = set() for spec in specs: + spec.concretize() for s in spec.traverse(): new_specs.add(s) specs = list(new_specs) diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py index ee0bf6de11..6fbf82de14 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -146,7 +146,7 @@ def create(path, specs, **kwargs): stage = None try: # create a subdirectory for the current package@version - archive_path = os.path.abspath(join_path(path, mirror_archive_path(spec))) + archive_path = os.path.abspath(join_path(mirror_root, mirror_archive_path(spec))) subdir = os.path.dirname(archive_path) mkdirp(subdir) -- cgit v1.2.3-70-g09d2 From 8df4fd9e942cb4e632e309ae758356c29a72ec02 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Sun, 13 Dec 2015 17:13:34 -0800 Subject: Fix build of krell tools to use spack with minimal impact on rest of spack packages. --- var/spack/packages/binutils/package.py | 6 ----- var/spack/packages/boost/package.py | 3 ++- var/spack/packages/cbtf-krell/package.py | 40 ++++++++++++++--------------- var/spack/packages/cbtf-lanl/package.py | 2 +- var/spack/packages/dyninst/package.py | 33 +++++++----------------- var/spack/packages/openspeedshop/package.py | 33 ++++++++++++++---------- var/spack/packages/papi/package.py | 1 + 7 files changed, 52 insertions(+), 66 deletions(-) diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py index 47234367d7..123f4598f6 100644 --- a/var/spack/packages/binutils/package.py +++ b/var/spack/packages/binutils/package.py @@ -15,12 +15,6 @@ class Binutils(Package): variant('libiberty', default=False, description='Also install libiberty.') - variant('libiberty', default=False, description='Also install libiberty.') - - variant('libiberty', default=False, description='Also install libiberty.') - - variant('libiberty', default=False, description='Also install libiberty.') - def install(self, spec, prefix): configure_args = [ '--prefix=%s' % prefix, diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py index 81dadbbf61..fc721753c7 100644 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -58,7 +58,8 @@ class Boost(Package): parts = [str(p) for p in Version(version)] dots = ".".join(parts) underscores = "_".join(parts) - return "http://downloads.sourceforge.net/project/boost/boost/%s/boost_%s.tar.bz2" % ( + #return "http://downloads.sourceforge.net/project/boost/boost/%s/boost_%s.tar.bz2" % ( + return "http://downloads.sourceforge.net/project/boost/boost/%s.0/boost_%s_0.tar.bz2" % ( dots, underscores) def determine_toolset(self): diff --git a/var/spack/packages/cbtf-krell/package.py b/var/spack/packages/cbtf-krell/package.py index 3f486b86ce..d9a2b7f8b5 100644 --- a/var/spack/packages/cbtf-krell/package.py +++ b/var/spack/packages/cbtf-krell/package.py @@ -38,8 +38,8 @@ class CbtfKrell(Package): depends_on("binutils@2.24+krellpatch") # collectionTool - depends_on("boost@1.42:") - depends_on("dyninst@8.2.1:+krelloptions") + depends_on("boost@1.50") + depends_on("dyninst@8.2.1") depends_on("mrnet@4.1.0:+krelloptions") depends_on("xerces-c@3.1.1:") depends_on("cbtf") @@ -64,8 +64,8 @@ class CbtfKrell(Package): # FIXME - hard code path until external package support is available # Need to change this path and/or add additional paths for MPI experiment support on different platforms - openmpi_prefix_path = "/opt/openmpi-1.8.2" - mvapich_prefix_path = "/usr/local/tools/mvapich-gnu" + #openmpi_prefix_path = "/opt/openmpi-1.8.2" + #mvapich_prefix_path = "/usr/local/tools/mvapich-gnu" # Other possibilities, they will need a -DMVAPICH_DIR=, etc clause in the cmake command to be recognized # mvapich_prefix_path = "" @@ -76,18 +76,22 @@ class CbtfKrell(Package): # Add in paths for cuda if requested via the cuda variant # FIXME - hard code path until external package support is available - if '+cuda' in spec: - cuda_prefix_path = "/usr/local/cuda-6.0" - cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI" - else: - cuda_prefix_path = "" - cupti_prefix_path = "" - - #'-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix, - #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, - #'-DMPICH_DIR=%s' % spec['mpich'].prefix, - #'-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, - #'-DLIB_SUFFIX=64', + #if '+cuda' in spec: + # cuda_prefix_path = "/usr/local/cuda-6.0" + # cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI" + #else: + # cuda_prefix_path = "" + # cupti_prefix_path = "" + + #'-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix, + #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, + #'-DMPICH_DIR=%s' % spec['mpich'].prefix, + #'-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + #'-DOPENMPI_DIR=%s' % openmpi_prefix_path, + #'-DMVAPICH_DIR=%s' % mvapich_prefix_path, + #'-DLIB_SUFFIX=64', + #'-DCUDA_DIR=%s' % cuda_prefix_path, + #'-DCUPTI_DIR=%s' % cupti_prefix_path, # Build cbtf-krell with cmake with working_dir('build_cbtf_krell', create=True): @@ -104,10 +108,6 @@ class CbtfKrell(Package): '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - '-DCUDA_DIR=%s' % cuda_prefix_path, - '-DCUPTI_DIR=%s' % cupti_prefix_path, - '-DOPENMPI_DIR=%s' % openmpi_prefix_path, - '-DMVAPICH_DIR=%s' % mvapich_prefix_path, *std_cmake_args) make("clean") diff --git a/var/spack/packages/cbtf-lanl/package.py b/var/spack/packages/cbtf-lanl/package.py index 25f91d8c2f..14651723cd 100644 --- a/var/spack/packages/cbtf-lanl/package.py +++ b/var/spack/packages/cbtf-lanl/package.py @@ -31,7 +31,7 @@ class CbtfLanl(Package): # Dependencies for cbtf-krell - depends_on("boost@1.42:") + depends_on("boost@1.50") depends_on("mrnet@4.1.0+krelloptions") depends_on("xerces-c@3.1.1:") depends_on("cbtf") diff --git a/var/spack/packages/dyninst/package.py b/var/spack/packages/dyninst/package.py index 81ea7b7e48..0111dcbe08 100644 --- a/var/spack/packages/dyninst/package.py +++ b/var/spack/packages/dyninst/package.py @@ -38,8 +38,6 @@ class Dyninst(Package): version('8.1.1', 'd1a04e995b7aa70960cd1d1fac8bd6ac', url="http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz") - variant('krelloptions', default=False, description="build dyninst includes into include/dyninst.") - depends_on("libelf") depends_on("libdwarf") depends_on("boost@1.42:") @@ -50,28 +48,15 @@ class Dyninst(Package): libdwarf = spec['libdwarf'].prefix with working_dir('spack-build', create=True): - # cbtf-krell and openspeedshop expect to reference dyninst/include, so adding include specification to that end - if '+krelloptions' in spec: - cmake('..', - '-DINSTALL_INCLUDE_DIR=%s' % join_path(self.prefix.include, 'dyninst'), - '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include, - '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib, - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DLIBELF_INCLUDE_DIR=%s' % join_path(libelf.include, 'libelf'), - '-DLIBELF_LIBRARIES=%s' % join_path(libelf.lib, 'libelf.so'), - '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, - '-DLIBDWARF_LIBRARIES=%s' % join_path(libdwarf.lib, 'libdwarf.so'), - *std_cmake_args) - else: - cmake('..', - '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include, - '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib, - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DLIBELF_INCLUDE_DIR=%s' % join_path(libelf.include, 'libelf'), - '-DLIBELF_LIBRARIES=%s' % join_path(libelf.lib, 'libelf.so'), - '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, - '-DLIBDWARF_LIBRARIES=%s' % join_path(libdwarf.lib, 'libdwarf.so'), - *std_cmake_args) + cmake('..', + '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include, + '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib, + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DLIBELF_INCLUDE_DIR=%s' % join_path(libelf.include, 'libelf'), + '-DLIBELF_LIBRARIES=%s' % join_path(libelf.lib, 'libelf.so'), + '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, + '-DLIBDWARF_LIBRARIES=%s' % join_path(libdwarf.lib, 'libdwarf.so'), + *std_cmake_args) make() make("install") diff --git a/var/spack/packages/openspeedshop/package.py b/var/spack/packages/openspeedshop/package.py index 93f356fb92..d439fba734 100644 --- a/var/spack/packages/openspeedshop/package.py +++ b/var/spack/packages/openspeedshop/package.py @@ -28,9 +28,14 @@ class Openspeedshop(Package): as open source code primarily under LGPL. """ + homepage = "http://www.openspeedshop.org" - url = "http://sourceforge.net/projects/openss/files/openss/openspeedshop-2.1/openspeedshop-2.1.tar.gz/download" - version('2.1', 'bdaa57c1a0db9d0c3e0303fd8496c507') + url = "http://sourceforge.net/projects/openss/files/openss/openspeedshop-2.2/openspeedshop-2.2.tar.gz/download" + version('2.2', '16cb051179c2038de4e8a845edf1d573') + + #homepage = "http://www.openspeedshop.org" + #url = "http://sourceforge.net/projects/openss/files/openss/openspeedshop-2.1/openspeedshop-2.1.tar.gz/download" + #version('2.1', 'bdaa57c1a0db9d0c3e0303fd8496c507') # optional mirror template #url = "file:/g/g24/jeg/openspeedshop-2.1.tar.gz" @@ -40,7 +45,7 @@ class Openspeedshop(Package): parallel = False - variant('offline', default=False, description="build with offline instrumentor enabled.") + variant('offline', default=True, description="build with offline instrumentor enabled.") variant('cbtf', default=False, description="build with cbtf instrumentor enabled.") variant('runtime', default=False, description="build only the runtime libraries and collectors.") variant('frontend', default=False, description="build only the front-end tool using the runtime_dir to point to the target build.") @@ -58,8 +63,8 @@ class Openspeedshop(Package): depends_on("libelf") depends_on("libdwarf") depends_on("sqlite") - depends_on("boost@1.42:") - depends_on("dyninst@8.2.1:+krelloptions") + depends_on("boost@1.50") + depends_on("dyninst@8.2.1") depends_on("python") depends_on("qt@3.3.8b+krellpatch") @@ -79,15 +84,17 @@ class Openspeedshop(Package): def install(self, spec, prefix): - openmpi_prefix_path = "/opt/openmpi-1.8.2" - mvapich_prefix_path = "/usr/local/tools/mvapich-gnu" + #openmpi_prefix_path = "/opt/openmpi-1.8.2" + #mvapich_prefix_path = "/usr/local/tools/mvapich-gnu" #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, + #'-DOPENMPI_DIR=%s' % openmpi_prefix_path, + #'-DMVAPICH_DIR=%s' % mvapich_prefix_path, # FIXME: How do we make this dynamic in spack? That is, can we specify the paths to cuda dynamically? # WAITING for external package support. - if '+cuda' in spec: - cuda_prefix_path = "/usr/local/cuda-6.0" - cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI" + #if '+cuda' in spec: + # cuda_prefix_path = "/usr/local/cuda-6.0" + # cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI" if '+offline' in spec: instrumentor_setting = "offline" @@ -100,8 +107,6 @@ class Openspeedshop(Package): '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, '-DPAPI_DIR=%s' % spec['papi'].prefix, - '-DOPENMPI_DIR=%s' % openmpi_prefix_path, - '-DMVAPICH_DIR=%s' % mvapich_prefix_path, *std_cmake_args) make("clean") make() @@ -110,6 +115,8 @@ class Openspeedshop(Package): cmake_prefix_path = join_path(spec['dyninst'].prefix) with working_dir('build', create=True): #python_vers=join_path(spec['python'].version[:2]) + #'-DOPENMPI_DIR=%s' % openmpi_prefix_path, + #'-DMVAPICH_DIR=%s' % mvapich_prefix_path, python_vers='%d.%d' % spec['python'].version[:2] cmake('..', '-DCMAKE_INSTALL_PREFIX=%s' % prefix, @@ -130,8 +137,6 @@ class Openspeedshop(Package): '-DBoost_NO_SYSTEM_PATHS=TRUE', '-DBOOST_ROOT=%s' % spec['boost'].prefix, '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, - '-DOPENMPI_DIR=%s' % openmpi_prefix_path, - '-DMVAPICH_DIR=%s' % mvapich_prefix_path, *std_cmake_args) make("clean") make() diff --git a/var/spack/packages/papi/package.py b/var/spack/packages/papi/package.py index f7c087c69b..910e0aa9f9 100644 --- a/var/spack/packages/papi/package.py +++ b/var/spack/packages/papi/package.py @@ -12,6 +12,7 @@ class Papi(Package): across the hardware and software stack.""" homepage = "http://icl.cs.utk.edu/papi/index.html" + url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.4.1.tar.gz" version('5.4.1', '9134a99219c79767a11463a76b0b01a2') version('5.3.0', '367961dd0ab426e5ae367c2713924ffb') -- cgit v1.2.3-70-g09d2 From ed7db8e48999de4e6bb67efce7a97718ad117a74 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Mon, 14 Dec 2015 21:59:40 +0100 Subject: adding external dependencies + variants for mpi, shared and compression --- var/spack/packages/scotch/package.py | 117 ++++++++++++++++++++++++++++++----- 1 file changed, 102 insertions(+), 15 deletions(-) diff --git a/var/spack/packages/scotch/package.py b/var/spack/packages/scotch/package.py index 79289ff2ad..7e54b4fd8d 100644 --- a/var/spack/packages/scotch/package.py +++ b/var/spack/packages/scotch/package.py @@ -1,5 +1,4 @@ from spack import * -import glob import os class Scotch(Package): @@ -11,28 +10,116 @@ class Scotch(Package): version('6.0.3', '10b0cc0f184de2de99859eafaca83cfc') - depends_on('mpi') + variant('mpi', default=False, description='Activate the compilation of PT-Scotch') + variant('compression', default=True, description='Activate the posibility to use compressed files') + variant('esmumps', default=False, description='Activate the compilation of the lib esmumps needed by mumps') + variant('shared', default=True, description='Build shared libraries') + depends_on('mpi', when='+mpi') + depends_on('zlib', when='+compression') + depends_on('flex') + depends_on('bison') - def patch(self): - with working_dir('src/Make.inc'): - makefiles = glob.glob('Makefile.inc.x86-64_pc_linux2*') - filter_file(r'^CCS\s*=.*$', 'CCS = cc', *makefiles) - filter_file(r'^CCD\s*=.*$', 'CCD = cc', *makefiles) + def compiler_specifics(self, makefile_inc, defines): + if self.compiler.name == 'gcc': + defines.append('-Drestrict=__restrict') + elif self.compiler.name == 'intel': + defines.append('-restrict') + makefile_inc.append('CCS = $(CC)') + + if '+mpi' in self.spec: + makefile_inc.extend([ + 'CCP = %s' % os.path.join(self.spec['mpi'].prefix.bin, 'mpicc'), + 'CCD = $(CCP)' + ]) + else: + makefile_inc.extend([ + 'CCP = mpicc', # It is set but not used + 'CCD = $(CCS)' + ]) + + + + def library_build_type(self, makefile_inc, defines): + makefile_inc.extend([ + 'LIB = .a', + 'CLIBFLAGS = ', + 'RANLIB = ranlib', + 'AR = ar', + 'ARFLAGS = -ruv ' + ]) + + @when('+shared') + def library_build_type(self, makefile_inc, defines): + makefile_inc.extend([ + 'LIB = .so', + 'CLIBFLAGS = -shared -fPIC', + 'RANLIB = echo', + 'AR = $(CC)', + 'ARFLAGS = -shared $(LDFLAGS) -o' + ]) + + def extra_features(self, makefile_inc, defines): + ldflags = [] + + if '+compression' in self.spec: + defines.append('-DCOMMON_FILE_COMPRESS_GZ') + ldflags.append('-L%s -lz' % (self.spec['zlib'].prefix.lib)) + + defines.append('-DCOMMON_PTHREAD') + ldflags.append('-lm -lrt -pthread') + + makefile_inc.append('LDFLAGS = %s' % ' '.join(ldflags)) + + + def write_make_inc(self): + makefile_inc = [] + defines = [ + '-DCOMMON_RANDOM_FIXED_SEED', + '-DSCOTCH_DETERMINISTIC', + '-DSCOTCH_RENAME', + '-DIDXSIZE64' ] + + self.library_build_type(makefile_inc, defines) + self.compiler_specifics(makefile_inc, defines) + self.extra_features(makefile_inc, defines) + + makefile_inc.extend([ + 'EXE =', + 'OBJ = .o', + 'MAKE = make', + 'CAT = cat', + 'LN = ln', + 'MKDIR = mkdir', + 'MV = mv', + 'CP = cp', + 'CFLAGS = -O3 %s' % (' '.join(defines)), + 'LEX = %s -Pscotchyy -olex.yy.c' % os.path.join(self.spec['flex'].prefix.bin , 'flex'), + 'YACC = %s -pscotchyy -y -b y' % os.path.join(self.spec['bison'].prefix.bin, 'bison'), + 'prefix = %s' % self.prefix, + '' + ]) + + with open('Makefile.inc', 'w') as fh: + fh.write('\n'.join(makefile_inc)) def install(self, spec, prefix): - # Currently support gcc and icc on x86_64 (maybe others with - # vanilla makefile) - makefile = 'Make.inc/Makefile.inc.x86-64_pc_linux2' - if spec.satisfies('%icc'): - makefile += '.icc' + targets = ['scotch'] + if '+mpi' in self.spec: + targets.append('ptscotch') + + if '+esmumps' in self.spec: + targets.append('esmumps') + if '+mpi' in self.spec: + targets.append('ptesmumps') with working_dir('src'): - force_symlink(makefile, 'Makefile.inc') - for app in ('scotch', 'ptscotch'): - make(app) + self.write_make_inc() + for app in targets: + make(app, parallel=(not app=='ptesmumps')) + install_tree('bin', prefix.bin) install_tree('lib', prefix.lib) install_tree('include', prefix.include) -- cgit v1.2.3-70-g09d2 From 917fb328bb5d992b71b28c7fb86e2a0a82e06d02 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Tue, 15 Dec 2015 12:25:31 -0500 Subject: cmake: enable ssl, for https downloads By default cmake builds its own curl, without SSL support. This patch enables SSL when building cmake, fixing the following error: error: downloading 'https://...' failed status_code: 1 status_string: "Unsupported protocol" log: Protocol "https" not supported or disabled in libcurl --- var/spack/packages/cmake/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/packages/cmake/package.py b/var/spack/packages/cmake/package.py index c24a80748c..cb54c92d69 100644 --- a/var/spack/packages/cmake/package.py +++ b/var/spack/packages/cmake/package.py @@ -43,6 +43,7 @@ class Cmake(Package): def install(self, spec, prefix): configure('--prefix=' + prefix, - '--parallel=' + str(make_jobs)) + '--parallel=' + str(make_jobs), + '--', '-DCMAKE_USE_OPENSSL=ON') make() make('install') -- cgit v1.2.3-70-g09d2 From c02cbaecd8cad7154b5507c0122a5163544fd349 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Thu, 17 Dec 2015 07:41:49 -0800 Subject: Change back the previous boost change and change the mrnet variant name to lwthreads. --- var/spack/packages/boost/package.py | 3 +-- var/spack/packages/cbtf-argonavis/package.py | 7 ++++--- var/spack/packages/cbtf-krell/package.py | 4 ++-- var/spack/packages/cbtf-lanl/package.py | 2 +- var/spack/packages/cbtf/package.py | 7 +++---- var/spack/packages/mrnet/package.py | 4 ++-- var/spack/packages/openspeedshop/package.py | 6 +++--- 7 files changed, 16 insertions(+), 17 deletions(-) diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py index fc721753c7..81dadbbf61 100644 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -58,8 +58,7 @@ class Boost(Package): parts = [str(p) for p in Version(version)] dots = ".".join(parts) underscores = "_".join(parts) - #return "http://downloads.sourceforge.net/project/boost/boost/%s/boost_%s.tar.bz2" % ( - return "http://downloads.sourceforge.net/project/boost/boost/%s.0/boost_%s_0.tar.bz2" % ( + return "http://downloads.sourceforge.net/project/boost/boost/%s/boost_%s.tar.bz2" % ( dots, underscores) def determine_toolset(self): diff --git a/var/spack/packages/cbtf-argonavis/package.py b/var/spack/packages/cbtf-argonavis/package.py index 2dccb0e0c6..7b07933911 100644 --- a/var/spack/packages/cbtf-argonavis/package.py +++ b/var/spack/packages/cbtf-argonavis/package.py @@ -33,7 +33,7 @@ class CbtfArgonavis(Package): depends_on("papi") depends_on("cbtf") depends_on("cbtf-krell") - #depends_on("cuda") + depends_on("cuda") parallel = False @@ -43,8 +43,8 @@ class CbtfArgonavis(Package): cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) # FIXME, hard coded for testing purposes, we will alter when the external package feature is available - cuda_prefix_path = "/opt/cudatoolkit-6.5" - cupti_prefix_path = "/opt/cudatoolkit-6.5/extras/CUPTI" + cuda_prefix_path = "/usr/local/cudatoolkit-6.0" + cupti_prefix_path = "/usr/local/cudatoolkit-6.0/extras/CUPTI" with working_dir('CUDA'): @@ -56,6 +56,7 @@ class CbtfArgonavis(Package): '-DCUDA_INSTALL_PATH=%s' % cuda_prefix_path, '-DCUDA_ROOT=%s' % cuda_prefix_path, '-DCUPTI_ROOT=%s' % cupti_prefix_path, + '-DCUDA_DIR=%s' % cuda_prefix_path, '-DPAPI_ROOT=%s' % spec['papi'].prefix, '-DCBTF_PREFIX=%s' % spec['cbtf'].prefix, *std_cmake_args) diff --git a/var/spack/packages/cbtf-krell/package.py b/var/spack/packages/cbtf-krell/package.py index d9a2b7f8b5..9458ac113c 100644 --- a/var/spack/packages/cbtf-krell/package.py +++ b/var/spack/packages/cbtf-krell/package.py @@ -38,9 +38,9 @@ class CbtfKrell(Package): depends_on("binutils@2.24+krellpatch") # collectionTool - depends_on("boost@1.50") + depends_on("boost@1.50.0") depends_on("dyninst@8.2.1") - depends_on("mrnet@4.1.0:+krelloptions") + depends_on("mrnet@4.1.0:+lwthreads") depends_on("xerces-c@3.1.1:") depends_on("cbtf") diff --git a/var/spack/packages/cbtf-lanl/package.py b/var/spack/packages/cbtf-lanl/package.py index 14651723cd..2da9e8a1f7 100644 --- a/var/spack/packages/cbtf-lanl/package.py +++ b/var/spack/packages/cbtf-lanl/package.py @@ -32,7 +32,7 @@ class CbtfLanl(Package): # Dependencies for cbtf-krell depends_on("boost@1.50") - depends_on("mrnet@4.1.0+krelloptions") + depends_on("mrnet@4.1.0:+lwthreads") depends_on("xerces-c@3.1.1:") depends_on("cbtf") depends_on("cbtf-krell") diff --git a/var/spack/packages/cbtf/package.py b/var/spack/packages/cbtf/package.py index 6f1e49deed..52e6a07020 100644 --- a/var/spack/packages/cbtf/package.py +++ b/var/spack/packages/cbtf/package.py @@ -32,9 +32,9 @@ class Cbtf(Package): version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf/cbtf') depends_on("cmake") - #depends_on("boost@1.42:") - depends_on("boost@1.50") - depends_on("mrnet@4.1.0+krelloptions") + #depends_on("boost@1.42.0:") + depends_on("boost@1.50.0") + depends_on("mrnet@4.1.0+lwthreads") depends_on("xerces-c@3.1.1:") depends_on("libxml2") @@ -43,7 +43,6 @@ class Cbtf(Package): def install(self, spec, prefix): with working_dir('build', create=True): - # Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching # in system paths (or other locations outside of BOOST_ROOT # or BOOST_INCLUDEDIR). Useful when specifying BOOST_ROOT. diff --git a/var/spack/packages/mrnet/package.py b/var/spack/packages/mrnet/package.py index 08c57d7436..3eb33d0714 100644 --- a/var/spack/packages/mrnet/package.py +++ b/var/spack/packages/mrnet/package.py @@ -8,14 +8,14 @@ class Mrnet(Package): version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') version('4.1.0', '5a248298b395b329e2371bf25366115c') - variant('krelloptions', default=False, description="Also build the MRNet LW threadsafe libraries") + variant('lwthreads', default=False, description="Also build the MRNet LW threadsafe libraries") parallel = False depends_on("boost") def install(self, spec, prefix): # Build the MRNet LW thread safe libraries when the krelloptions variant is present - if '+krelloptions' in spec: + if '+lwthreads' in spec: configure("--prefix=%s" %prefix, "--enable-shared", "--enable-ltwt-threadsafe") else: configure("--prefix=%s" %prefix, "--enable-shared") diff --git a/var/spack/packages/openspeedshop/package.py b/var/spack/packages/openspeedshop/package.py index d439fba734..8c71bcb7c3 100644 --- a/var/spack/packages/openspeedshop/package.py +++ b/var/spack/packages/openspeedshop/package.py @@ -63,7 +63,7 @@ class Openspeedshop(Package): depends_on("libelf") depends_on("libdwarf") depends_on("sqlite") - depends_on("boost@1.50") + depends_on("boost@1.50.0") depends_on("dyninst@8.2.1") depends_on("python") depends_on("qt@3.3.8b+krellpatch") @@ -79,8 +79,8 @@ class Openspeedshop(Package): # Dependencies only for the openspeedshop cbtf package. depends_on("cbtf", when='+cbtf') depends_on("cbtf-krell", when='+cbtf') - #depends_on("cbtf-argonavis", when='+cbtf') - depends_on("mrnet@4.1.0:+krelloptions", when='+cbtf') + depends_on("cbtf-argonavis", when='+cbtf') + depends_on("mrnet@4.1.0:+lwthreads", when='+cbtf') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From f91e1ae83fd60f575eb9e316125ca9a2a63be52e Mon Sep 17 00:00:00 2001 From: David Beckingsale Date: Thu, 17 Dec 2015 15:21:26 -0800 Subject: Added Lmod package --- var/spack/packages/lmod/package.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 var/spack/packages/lmod/package.py diff --git a/var/spack/packages/lmod/package.py b/var/spack/packages/lmod/package.py new file mode 100644 index 0000000000..d642594f92 --- /dev/null +++ b/var/spack/packages/lmod/package.py @@ -0,0 +1,26 @@ +from spack import * +import os + +class Lmod(Package): + """ + Lmod is a Lua based module system that easily handles the MODULEPATH + Hierarchical problem. Environment Modules provide a convenient way to + dynamically change the users' environment through modulefiles. This + includes easily adding or removing directories to the PATH environment + variable. Modulefiles for Library packages provide environment variables + that specify where the library and header files can be found. + """ + homepage = "https://www.tacc.utexas.edu/research-development/tacc-projects/lmod" + url = "http://sourceforge.net/projects/lmod/files/Lmod-6.0.1.tar.bz2/download" + + version('6.0.1', '91abf52fe5033bd419ffe2842ebe7af9') + + depends_on("lua@5.2:") + + def install(self, spec, prefix): + # Add our lua to PATH + os.environ['PATH'] = spec['lua'].prefix.bin + ';' + os.environ['PATH'] + + configure('--prefix=%s' % prefix) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 8dc32aeedb569400dffdd352ae7dcbeaa6c43635 Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 18 Dec 2015 12:58:29 +0100 Subject: Improved tau build and added optional dependencies --- var/spack/packages/cube/package.py | 3 + var/spack/packages/opari2/package.py | 2 + var/spack/packages/otf2/package.py | 4 ++ var/spack/packages/pdt/package.py | 45 +++++++++++++ var/spack/packages/scorep/package.py | 124 +++++++++++++++++++---------------- var/spack/packages/tau/package.py | 122 ++++++++++++++++++++++++++++++++-- 6 files changed, 236 insertions(+), 64 deletions(-) create mode 100644 var/spack/packages/pdt/package.py diff --git a/var/spack/packages/cube/package.py b/var/spack/packages/cube/package.py index d97cd25636..cc1c684594 100644 --- a/var/spack/packages/cube/package.py +++ b/var/spack/packages/cube/package.py @@ -12,6 +12,9 @@ class Cube(Package): 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.3.3', '07e109248ed8ffc7bdcce614264a2909', + url='http://apps.fz-juelich.de/scalasca/releases/cube/4.3/dist/cube-4.3.3.tar.gz') + version('4.2.3', '8f95b9531f5a8f8134f279c2767c9b20') version('4.3TP1', 'a2090fbc7b2ba394bd5c09ba971e237f', diff --git a/var/spack/packages/opari2/package.py b/var/spack/packages/opari2/package.py index daaee61e3a..3f8c65377d 100644 --- a/var/spack/packages/opari2/package.py +++ b/var/spack/packages/opari2/package.py @@ -17,6 +17,8 @@ class Opari2(Package): 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.4', '245d3d11147a06de77909b0805f530c0', + url='http://www.vi-hps.org/upload/packages/opari2/opari2-1.1.4.tar.gz') version('1.1.2', '9a262c7ca05ff0ab5f7775ae96f3539e') backend_user_provided = """\ diff --git a/var/spack/packages/otf2/package.py b/var/spack/packages/otf2/package.py index fa0a5898b6..b3d3a5b663 100644 --- a/var/spack/packages/otf2/package.py +++ b/var/spack/packages/otf2/package.py @@ -11,6 +11,10 @@ class Otf2(Package): homepage = "http://www.vi-hps.org/score-p" url = "http://www.vi-hps.org/upload/packages/otf2/otf2-1.4.tar.gz" + version('2.0', '5b546188b25bc1c4e285e06dddf75dfc', + url="http://www.vi-hps.org/upload/packages/otf2/otf2-2.0.tar.gz") + version('1.5.1', '16a9df46e0da78e374f5d12c8cdc1109', + url='http://www.vi-hps.org/upload/packages/otf2/otf2-1.5.1.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', diff --git a/var/spack/packages/pdt/package.py b/var/spack/packages/pdt/package.py new file mode 100644 index 0000000000..ce3b793e30 --- /dev/null +++ b/var/spack/packages/pdt/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public 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 * + + +class Pdt(Package): + """ + Program Database Toolkit (PDT) is a framework for analyzing source code written in several programming languages + and for making rich program knowledge accessible to developers of static and dynamic analysis tools. PDT implements + a standard program representation, the program database (PDB), that can be accessed in a uniform way through a + class library supporting common PDB operations. + """ + homepage = "https://www.cs.uoregon.edu/research/pdt/home.php" + url = "https://www.cs.uoregon.edu/research/tau/pdt_releases/pdt-3.21.tar.gz" + + version('3.21', '8df94298b71703decf680709a4ddf68f') + version('3.19', 'ba5591994998771fdab216699e362228') + + def install(self, spec, prefix): + configure('-prefix=%s' % prefix) + make() + make("install") diff --git a/var/spack/packages/scorep/package.py b/var/spack/packages/scorep/package.py index f013bd1cbb..fa9e339a49 100644 --- a/var/spack/packages/scorep/package.py +++ b/var/spack/packages/scorep/package.py @@ -1,74 +1,84 @@ -# FIXME: Add copyright statement +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public 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 * + class Scorep(Package): - """The Score-P measurement infrastructure is a highly scalable and + """ + 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.3', '9db6f957b7f51fa01377a9537867a55c', - url = 'http://www.vi-hps.org/upload/packages/scorep/scorep-1.3.tar.gz') + version('1.4.2', '3b9a042b13bdd5836452354e6567f71e', + url='http://www.vi-hps.org/upload/packages/scorep/scorep-1.4.2.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') + + ########## + # Dependencies for SCORE-P are quite tight. See the homepage for more information. + # SCOREP 1.4.2 + depends_on('otf2@1.5:1.6', when='@1.4.2') + depends_on('opari2@1.1.4', when='@1.4.2') + depends_on('cube@4.3:4.4', when='@1.4.2') + # SCOREP 1.3 + + ########## - version('1.2.3', '4978084e7cbd05b94517aa8beaea0817') + # FIXME : check version for 1.3 + #depends_on("otf2") + #depends_on("opari2") + #depends_on("cube") depends_on("mpi") depends_on("papi") - # depends_on("otf2@1.2:1.2.1") # only Score-P 1.2.x - depends_on("otf2") - depends_on("opari2") - 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 get_compiler_config_line(self): + backend_user_provided = ['CC=%s' % self.compiler.cc_names[0], + 'CXX=%s' % self.compiler.cxx_names[0], + 'F77=%s' % self.compiler.f77_names[0] if len(self.compiler.f77_names) else "", + 'FC=%s' % self.compiler.fc_names[0] if len(self.compiler.fc_names) else "", + 'CFLAGS=-fPIC %s' % self.rpath_args, + 'CXXFLAGS=-fPIC %s'% self.rpath_args] + return backend_user_provided 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 open("platform-backend-user-provided", "w") as backend_file: - backend_file.write(self.backend_user_provided) - with open("platform-frontend-user-provided", "w") as frontend_file: - frontend_file.write(self.frontend_user_provided) - with 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, - "--with-papi-header=%s" % spec['papi'].prefix.include, - "--with-papi-lib=%s" % spec['papi'].prefix.lib, - "--enable-shared"] - - configure(*configure_args) - - make() - make("install") + configure = Executable( join_path(self.stage.source_path, 'configure') ) + with working_dir('spack-build', create=True): + 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"] + configure_args.extend(self.get_compiler_config_line()) + configure(*configure_args) + make() + make("install") diff --git a/var/spack/packages/tau/package.py b/var/spack/packages/tau/package.py index 048fac80aa..69f00ae4ea 100644 --- a/var/spack/packages/tau/package.py +++ b/var/spack/packages/tau/package.py @@ -1,32 +1,140 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public 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 * import os +import os.path + from llnl.util.filesystem import join_path class Tau(Package): - """A portable profiling and tracing toolkit for performance - analysis of parallel programs written in Fortran, C, C++, UPC, - Java, Python.""" + """ + A portable profiling and tracing toolkit for performance + analysis of parallel programs written in Fortran, C, C++, UPC, + Java, Python. + """ homepage = "http://www.cs.uoregon.edu/research/tau" - url = "http://www.cs.uoregon.edu/research/paracomp/tau/tauprofile/dist/tau-2.23.1.tar.gz" + url = "https://www.cs.uoregon.edu/research/tau/tau_releases/tau-2.25.tar.gz" + version('2.25', '46cd48fa3f3c4ce0197017b3158a2b43') + version('2.24.1', '6635ece6d1f08215b02f5d0b3c1e971b') + version('2.24', '57ce33539c187f2e5ec68f0367c76db4') version('2.23.1', '6593b47ae1e7a838e632652f0426fe72') + # FIXME : shmem variant missing + variant('download', default=True, description='Downloads and builds various dependencies') + variant('openmp', default=True, description='Use OpenMP threads') + variant('mpi', default=True, description='Specify use of TAU MPI wrapper library') + variant('phase', default=True, description='Generate phase based profiles') + variant('comm', default=True, description=' Generate profiles with MPI communicator info') + + depends_on('pdt') # Required for TAU instrumentation + depends_on('scorep') + #depends_on('otf2', when='%gcc') # FIXME : still missing logic for intel and other compilers + depends_on('binutils', when='~download') + depends_on('mpi', when='+mpi') + + def set_compiler_options(self): + + name = self.compiler.name # Name of the current toolchain + useropt = ["-O2", self.rpath_args] + + ########## + # Selecting a compiler with TAU configure is quite tricky: + # 1 - compilers are mapped to a given set of strings (and spack cc, cxx, etc. wrappers are not among them) + # 2 - absolute paths are not allowed + # 3 - the usual environment variables seems not to be checked ('CC', 'CXX' and 'FC') + # 4 - if no -cc= -cxx= is passed tau is built with system compiler silently + # (regardless of what % is used in the spec) + # + # In the following we give TAU what he expects and put compilers into PATH + compiler_path = os.path.dirname(self.compiler.cc) + os.environ['PATH'] = ':'.join([compiler_path, os.environ['PATH']]) + compiler_options = ['-c++=%s' % self.compiler.cxx_names[0], + '-cc=%s' % self.compiler.cc_names[0]] + if self.compiler.fc: + compiler_options.append('-fortran=%s' % self.compiler.fc_names[0]) + # It turns out that some parts of the OTF support library in TAU are non-conformant, so if we want + # to compile them we must suppress some warnings. With Clang it seems impossible to do so, so OTF + # support is not built + #if name == 'gcc': + # useropt.append("-fpermissive") + ########## + + # Construct the string of custom compiler flags and append it to compiler related options + useropt = ' '.join(useropt) + useropt = "-useropt=%s" % useropt + compiler_options.append(useropt) + return compiler_options + def install(self, spec, prefix): # TAU isn't happy with directories that have '@' in the path. Sigh. change_sed_delimiter('@', ';', 'configure') change_sed_delimiter('@', ';', 'utils/FixMakefile') change_sed_delimiter('@', ';', 'utils/FixMakefile.sed.default') - # After that, it's relatively standard. - configure("-prefix=%s" % prefix) + # TAU configure, despite the name , seems to be a manually written script (nothing related to autotools). + # As such it has a few #peculiarities# that make this build quite hackish. + options = ["-prefix=%s" % prefix, + "-iowrapper", + "-pdt=%s" % spec['pdt'].prefix, + "-scorep=%s" % spec['scorep'].prefix] + # FIXME : I give up trying to compile OTF support with clang, as it seems there is no easy way to ignore errors + #if 'otf2' in spec: + # options.append("-otf=%s" % spec['otf2'].prefix) + # If download is active, download and build suggested dependencies + if '+download' in spec: + options.extend(['-bfd=download', + '-unwind=download', + '-asmdex=download']) + else: + options.extend(["-bfd=%s" % spec['binutils'].prefix]) + # TODO : unwind and asmdex are still missing + + if '+openmp' in spec: + options.append('-openmp') + + if '+mpi' in spec: + options.append('-mpi') + + if '+phase' in spec: + options.append('-PROFILEPHASE') + + if '+comm' in spec: + options.append('-PROFILECOMMUNICATORS') + + compiler_specific_options = self.set_compiler_options() + options.extend(compiler_specific_options) + configure(*options) make("install") # Link arch-specific directories into prefix since there is # only one arch per prefix the way spack installs. self.link_tau_arch_dirs() - def link_tau_arch_dirs(self): for subdir in os.listdir(self.prefix): for d in ('bin', 'lib'): -- cgit v1.2.3-70-g09d2 From f3837dd6867da8483c8981c3134dcc24dca9580b Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 18 Dec 2015 16:15:30 +0100 Subject: tau : removed direct otf2 support --- var/spack/packages/scorep/package.py | 14 +++++--------- var/spack/packages/tau/package.py | 16 ++++------------ 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/var/spack/packages/scorep/package.py b/var/spack/packages/scorep/package.py index fa9e339a49..0820f2d8ac 100644 --- a/var/spack/packages/scorep/package.py +++ b/var/spack/packages/scorep/package.py @@ -37,9 +37,8 @@ class Scorep(Package): version('1.4.2', '3b9a042b13bdd5836452354e6567f71e', url='http://www.vi-hps.org/upload/packages/scorep/scorep-1.4.2.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') + version('1.3', '9db6f957b7f51fa01377a9537867a55c', + url='http://www.vi-hps.org/upload/packages/scorep/scorep-1.3.tar.gz') ########## # Dependencies for SCORE-P are quite tight. See the homepage for more information. @@ -48,14 +47,11 @@ class Scorep(Package): depends_on('opari2@1.1.4', when='@1.4.2') depends_on('cube@4.3:4.4', when='@1.4.2') # SCOREP 1.3 - + depends_on("otf2@1.4", when='@1.3') + depends_on("opari2@1.1.4", when='@1.3') + depends_on("cube@4.2.3", when='@1.3') ########## - # FIXME : check version for 1.3 - #depends_on("otf2") - #depends_on("opari2") - #depends_on("cube") - depends_on("mpi") depends_on("papi") diff --git a/var/spack/packages/tau/package.py b/var/spack/packages/tau/package.py index 69f00ae4ea..9febb647b3 100644 --- a/var/spack/packages/tau/package.py +++ b/var/spack/packages/tau/package.py @@ -44,22 +44,22 @@ class Tau(Package): version('2.24', '57ce33539c187f2e5ec68f0367c76db4') version('2.23.1', '6593b47ae1e7a838e632652f0426fe72') - # FIXME : shmem variant missing - variant('download', default=True, description='Downloads and builds various dependencies') + # TODO : shmem variant missing + variant('download', default=False, description='Downloads and builds various dependencies') variant('openmp', default=True, description='Use OpenMP threads') variant('mpi', default=True, description='Specify use of TAU MPI wrapper library') variant('phase', default=True, description='Generate phase based profiles') variant('comm', default=True, description=' Generate profiles with MPI communicator info') + # TODO : Try to build direct OTF2 support? Some parts of the OTF support library in TAU are non-conformant, + # TODO : and fail at compile-time. Further, SCOREP is compiled with OTF2 support. depends_on('pdt') # Required for TAU instrumentation depends_on('scorep') - #depends_on('otf2', when='%gcc') # FIXME : still missing logic for intel and other compilers depends_on('binutils', when='~download') depends_on('mpi', when='+mpi') def set_compiler_options(self): - name = self.compiler.name # Name of the current toolchain useropt = ["-O2", self.rpath_args] ########## @@ -77,11 +77,6 @@ class Tau(Package): '-cc=%s' % self.compiler.cc_names[0]] if self.compiler.fc: compiler_options.append('-fortran=%s' % self.compiler.fc_names[0]) - # It turns out that some parts of the OTF support library in TAU are non-conformant, so if we want - # to compile them we must suppress some warnings. With Clang it seems impossible to do so, so OTF - # support is not built - #if name == 'gcc': - # useropt.append("-fpermissive") ########## # Construct the string of custom compiler flags and append it to compiler related options @@ -102,9 +97,6 @@ class Tau(Package): "-iowrapper", "-pdt=%s" % spec['pdt'].prefix, "-scorep=%s" % spec['scorep'].prefix] - # FIXME : I give up trying to compile OTF support with clang, as it seems there is no easy way to ignore errors - #if 'otf2' in spec: - # options.append("-otf=%s" % spec['otf2'].prefix) # If download is active, download and build suggested dependencies if '+download' in spec: options.extend(['-bfd=download', -- cgit v1.2.3-70-g09d2 From abd3d3946d8a4d5b73f26a682c1728cf9d4d05df Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 18 Dec 2015 19:23:45 -0800 Subject: Format to 80 char width. --- lib/spack/spack/cmd/uninstall.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 191d9d88e8..03873bb5f8 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -42,9 +42,9 @@ def setup_parser(subparser): help="Remove regardless of whether other packages depend on this one.") subparser.add_argument( '-a', '--all', action='store_true', dest='all', - help="USE CAREFULLY. Remove ALL installed packages that match each supplied spec. " + - "i.e., if you say uninstall libelf, ALL versions of libelf are uninstalled. " + - "This is both useful and dangerous, like rm -r.") + help="USE CAREFULLY. Remove ALL installed packages that match each " + + "supplied spec. i.e., if you say uninstall libelf, ALL versions of " + + "libelf are uninstalled. This is both useful and dangerous, like rm -r.") subparser.add_argument( 'packages', nargs=argparse.REMAINDER, help="specs of packages to uninstall") @@ -81,7 +81,8 @@ def uninstall(parser, args): pkgs.append(s.package) except spack.packages.UnknownPackageError, e: - # The package.py file has gone away -- but still want to uninstall. + # The package.py file has gone away -- but still want to + # uninstall. spack.Package(s).do_uninstall(force=True) # Sort packages to be uninstalled by the number of installed dependents -- cgit v1.2.3-70-g09d2 From 3e1ba6cc246d126bb3f900ed27192902bb1f57fc Mon Sep 17 00:00:00 2001 From: John Westlund Date: Fri, 18 Dec 2015 21:28:44 -0800 Subject: remove possible trailing slash in _sp_prefix or _sp_share_dir --- share/spack/setup-env.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 9f4ddd3faf..5b03aa8955 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -175,6 +175,6 @@ _sp_share_dir=$(cd "$(dirname $_sp_source_file)" && pwd) _sp_prefix=$(cd "$(dirname $(dirname $_sp_share_dir))" && pwd) # TODO: fix SYS_TYPE to something non-LLNL-specific -_spack_pathadd DK_NODE "$_sp_share_dir/dotkit/$SYS_TYPE" -_spack_pathadd MODULEPATH "$_sp_share_dir/modules/$SYS_TYPE" -_spack_pathadd PATH "$_sp_prefix/bin" +_spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$SYS_TYPE" +_spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$SYS_TYPE" +_spack_pathadd PATH "${_sp_prefix%/}/bin" -- cgit v1.2.3-70-g09d2 From ce8bd2094403ca5844f164e65b22ad4cfdab4a9a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 18 Dec 2015 22:23:51 -0800 Subject: Fix import error. --- lib/spack/spack/database.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index bf54055a24..a6f1cc5077 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -54,6 +54,7 @@ import spack.spec from spack.version import Version from spack.spec import Spec from spack.error import SpackError +from spack.packages import UnknownPackageError # DB goes in this directory underneath the root _db_dirname = '.spack-db' -- cgit v1.2.3-70-g09d2 From b7e926eef6a248ec6f67cf30bdb2ce7dea09b8a2 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 18 Dec 2015 22:24:22 -0800 Subject: minor formatting. --- lib/spack/spack/cmd/extensions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/spack/spack/cmd/extensions.py b/lib/spack/spack/cmd/extensions.py index c2cf288877..2ce6f406ca 100644 --- a/lib/spack/spack/cmd/extensions.py +++ b/lib/spack/spack/cmd/extensions.py @@ -54,7 +54,9 @@ def extensions(parser, args): if not args.spec: tty.die("extensions requires a package spec.") + # # Checks + # spec = spack.cmd.parse_specs(args.spec) if len(spec) > 1: tty.die("Can only list extensions for one package.") @@ -70,7 +72,9 @@ def extensions(parser, args): if not args.mode: args.mode = 'short' + # # List package names of extensions + # extensions = spack.db.extensions_for(spec) if not extensions: tty.msg("%s has no extensions." % spec.cshort_spec) @@ -79,7 +83,9 @@ def extensions(parser, args): tty.msg("%d extensions:" % len(extensions)) colify(ext.name for ext in extensions) + # # List specs of installed extensions. + # installed = [s.spec for s in spack.installed_db.installed_extensions_for(spec)] print if not installed: @@ -88,7 +94,9 @@ def extensions(parser, args): tty.msg("%d installed:" % len(installed)) spack.cmd.find.display_specs(installed, mode=args.mode) + # # List specs of activated extensions. + # activated = spack.install_layout.extension_map(spec) print if not activated: -- cgit v1.2.3-70-g09d2 From 52e3364efa4fa18d392316371e7164bf3899a638 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 18 Dec 2015 22:24:35 -0800 Subject: Fix #244: errors on uninstall - Extension logic didn't take conditional deps into account. - Extension methods now check for whether the extnesion is in the extendee map AND whether the dependency is actually present in the spec yet. --- lib/spack/spack/hooks/extensions.py | 4 +--- lib/spack/spack/package.py | 28 ++++++++++++++++++++++------ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/hooks/extensions.py b/lib/spack/spack/hooks/extensions.py index b4847d697f..627184cabd 100644 --- a/lib/spack/spack/hooks/extensions.py +++ b/lib/spack/spack/hooks/extensions.py @@ -27,9 +27,7 @@ import spack def pre_uninstall(pkg): - # Need to do this b/c uninstall does not automatically do it. - # TODO: store full graph info in stored .spec file. - pkg.spec.normalize() + assert(pkg.spec.concrete) if pkg.is_extension: if pkg.activated: diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index daba5cd352..4d75726e06 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -487,9 +487,15 @@ class Package(object): if name == dep.name: return dep - # Otherwise return the spec from the extends() directive - spec, kwargs = self.extendees[name] - return spec + # if the spec is concrete already, then it extends something + # that is an *optional* dependency, and the dep isn't there. + if self.spec._concrete: + return None + else: + # If it's not concrete, then return the spec from the + # extends() directive since that is all we know so far. + spec, kwargs = self.extendees[name] + return spec @property @@ -497,18 +503,28 @@ class Package(object): """Spec of the extendee of this package, or None if it is not an extension.""" if not self.extendees: return None + + # TODO: allow multiple extendees. name = next(iter(self.extendees)) return self.extendees[name][1] @property def is_extension(self): - return len(self.extendees) > 0 + # if it is concrete, it's only an extension if it actually + # dependes on the extendee. + if self.spec._concrete: + return self.extendee_spec is not None + else: + # If not, then it's an extension if it *could* be an extension + return bool(self.extendees) def extends(self, spec): - return (spec.name in self.extendees and - spec.satisfies(self.extendees[spec.name][0])) + if not spec.name in self.extendees: + return False + s = self.extendee_spec + return s and s.satisfies(spec) @property -- cgit v1.2.3-70-g09d2 From 7cc4d88726501d6d93adf86f8080e65523e2400f Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 19 Dec 2015 02:06:47 -0800 Subject: Fix #254: libtool & distutils want certain compiler names. This changes the compiler wrappers so that they are called by the same name as the wrapped compiler. Many builds make assumptions about compiler names, and we need the spack compilers to be recognizable so that build systems will get their flags right. This adds per-compiler subdirectories to lib/spack/spack/env directory that contain symlinks to cc for the C, C++, F77, and F90 compilers. The build now sets CC, CXX, F77, and F90 to point to these links instead of to the generically named cc, c++, f77, and f90 wrappers. --- lib/spack/env/cc | 14 +++++++------- lib/spack/env/clang/clang | 1 + lib/spack/env/clang/clang++ | 1 + lib/spack/env/gcc/g++ | 1 + lib/spack/env/gcc/gcc | 1 + lib/spack/env/gcc/gfortran | 1 + lib/spack/env/intel/icc | 1 + lib/spack/env/intel/icpc | 1 + lib/spack/env/intel/ifort | 1 + lib/spack/env/pgi/case-insensitive/pgCC | 1 + lib/spack/env/pgi/pgcc | 1 + lib/spack/env/pgi/pgf77 | 1 + lib/spack/env/pgi/pgf90 | 1 + lib/spack/env/xl/xlc | 1 + lib/spack/env/xl/xlc++ | 1 + lib/spack/env/xl/xlf | 1 + lib/spack/env/xl/xlf90 | 1 + lib/spack/spack/build_environment.py | 32 ++++++++++++++++++++++++-------- lib/spack/spack/compilers/clang.py | 6 ++++++ lib/spack/spack/compilers/gcc.py | 6 ++++++ lib/spack/spack/compilers/intel.py | 6 ++++++ lib/spack/spack/compilers/pgi.py | 6 ++++++ lib/spack/spack/compilers/xl.py | 6 ++++++ 23 files changed, 77 insertions(+), 15 deletions(-) create mode 120000 lib/spack/env/clang/clang create mode 120000 lib/spack/env/clang/clang++ create mode 120000 lib/spack/env/gcc/g++ create mode 120000 lib/spack/env/gcc/gcc create mode 120000 lib/spack/env/gcc/gfortran create mode 120000 lib/spack/env/intel/icc create mode 120000 lib/spack/env/intel/icpc create mode 120000 lib/spack/env/intel/ifort create mode 120000 lib/spack/env/pgi/case-insensitive/pgCC create mode 120000 lib/spack/env/pgi/pgcc create mode 120000 lib/spack/env/pgi/pgf77 create mode 120000 lib/spack/env/pgi/pgf90 create mode 120000 lib/spack/env/xl/xlc create mode 120000 lib/spack/env/xl/xlc++ create mode 120000 lib/spack/env/xl/xlf create mode 120000 lib/spack/env/xl/xlf90 diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 75a63f6fac..0966277a91 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -86,22 +86,22 @@ done # command=$(basename "$0") case "$command" in - cc|gcc|c89|c99|clang|xlc) + cc|c89|c99|gcc|clang|icc|pgcc|xlc) command="$SPACK_CC" language="C" ;; - c++|CC|g++|clang++|xlC) + c++|CC|g++|clang++|icpc|pgCC|xlc++) command="$SPACK_CXX" language="C++" ;; - f77|xlf) - command="$SPACK_F77" - language="Fortran 77" - ;; - fc|f90|f95|xlf90) + f90|fc|f95|gfortran|ifort|pgf90|xlf90) command="$SPACK_FC" language="Fortran 90" ;; + f77|gfortran|ifort|pgf77|xlf) + command="$SPACK_F77" + language="Fortran 77" + ;; cpp) mode=cpp ;; diff --git a/lib/spack/env/clang/clang b/lib/spack/env/clang/clang new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/clang/clang @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/clang/clang++ b/lib/spack/env/clang/clang++ new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/clang/clang++ @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/gcc/g++ b/lib/spack/env/gcc/g++ new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/gcc/g++ @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/gcc/gcc b/lib/spack/env/gcc/gcc new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/gcc/gcc @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/gcc/gfortran b/lib/spack/env/gcc/gfortran new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/gcc/gfortran @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/intel/icc b/lib/spack/env/intel/icc new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/intel/icc @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/intel/icpc b/lib/spack/env/intel/icpc new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/intel/icpc @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/intel/ifort b/lib/spack/env/intel/ifort new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/intel/ifort @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/pgi/case-insensitive/pgCC b/lib/spack/env/pgi/case-insensitive/pgCC new file mode 120000 index 0000000000..e2deb67f3b --- /dev/null +++ b/lib/spack/env/pgi/case-insensitive/pgCC @@ -0,0 +1 @@ +../../cc \ No newline at end of file diff --git a/lib/spack/env/pgi/pgcc b/lib/spack/env/pgi/pgcc new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/pgi/pgcc @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/pgi/pgf77 b/lib/spack/env/pgi/pgf77 new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/pgi/pgf77 @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/pgi/pgf90 b/lib/spack/env/pgi/pgf90 new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/pgi/pgf90 @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/xl/xlc b/lib/spack/env/xl/xlc new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/xl/xlc @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/xl/xlc++ b/lib/spack/env/xl/xlc++ new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/xl/xlc++ @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/xl/xlf b/lib/spack/env/xl/xlf new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/xl/xlf @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/xl/xlf90 b/lib/spack/env/xl/xlf90 new file mode 120000 index 0000000000..82c2b8e90a --- /dev/null +++ b/lib/spack/env/xl/xlf90 @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index dac25d9940..20154a55b3 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -88,10 +88,14 @@ def set_compiler_environment_variables(pkg): compiler = pkg.compiler # Set compiler variables used by CMake and autotools - os.environ['CC'] = join_path(spack.build_env_path, 'cc') - os.environ['CXX'] = join_path(spack.build_env_path, 'c++') - os.environ['F77'] = join_path(spack.build_env_path, 'f77') - os.environ['FC'] = join_path(spack.build_env_path, 'f90') + assert all(key in pkg.compiler.link_paths + for key in ('cc', 'cxx', 'f77', 'fc')) + + link_dir = spack.build_env_path + os.environ['CC'] = join_path(link_dir, pkg.compiler.link_paths['cc']) + os.environ['CXX'] = join_path(link_dir, pkg.compiler.link_paths['cxx']) + os.environ['F77'] = join_path(link_dir, pkg.compiler.link_paths['f77']) + os.environ['FC'] = join_path(link_dir, pkg.compiler.link_paths['fc']) # Set SPACK compiler variables so that our wrapper knows what to call if compiler.cc: @@ -110,11 +114,23 @@ def set_build_environment_variables(pkg): """This ensures a clean install environment when we build packages. """ # Add spack build environment path with compiler wrappers first in - # the path. We handle case sensitivity conflicts like "CC" and - # "cc" by putting one in the /case-insensitive + # the path. We add both spack.env_path, which includes default + # wrappers (cc, c++, f77, f90), AND a subdirectory containing + # compiler-specific symlinks. The latter ensures that builds that + # are sensitive to the *name* of the compiler see the right name + # when we're building wtih the wrappers. + # + # Conflicts on case-insensitive systems (like "CC" and "cc") are + # handled by putting one in the /case-insensitive # directory. Add that to the path too. - env_paths = [spack.build_env_path, - join_path(spack.build_env_path, 'case-insensitive')] + env_paths = [] + def add_env_path(path): + env_paths.append(path) + ci = join_path(path, 'case-insensitive') + if os.path.isdir(ci): env_paths.append(ci) + add_env_path(spack.build_env_path) + add_env_path(join_path(spack.build_env_path, pkg.compiler.name)) + path_put_first("PATH", env_paths) path_set(SPACK_ENV_PATH, env_paths) diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index b34d1f2f9c..340051019c 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -37,6 +37,12 @@ class Clang(Compiler): # Subclasses use possible names of Fortran 90 compiler fc_names = [] + # Named wrapper links within spack.build_env_path + link_paths = { 'cc' : 'clang/clang', + 'cxx' : 'clang/clang++', + # Use default wrappers for fortran, in case provided in compilers.yaml + 'f77' : 'f77', + 'fc' : 'f90' } @classmethod def default_version(self, comp): diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py index 2886888d57..495b638a3a 100644 --- a/lib/spack/spack/compilers/gcc.py +++ b/lib/spack/spack/compilers/gcc.py @@ -42,6 +42,12 @@ class Gcc(Compiler): # MacPorts builds gcc versions with prefixes and -mp-X.Y suffixes. suffixes = [r'-mp-\d\.\d'] + # Named wrapper links within spack.build_env_path + link_paths = {'cc' : 'gcc/gcc', + 'cxx' : 'gcc/g++', + 'f77' : 'gcc/gfortran', + 'fc' : 'gcc/gfortran' } + @property def cxx11_flag(self): if self.version < ver('4.3'): diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index 1298429974..69e9764790 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -37,6 +37,12 @@ class Intel(Compiler): # Subclasses use possible names of Fortran 90 compiler fc_names = ['ifort'] + # Named wrapper links within spack.build_env_path + link_paths = { 'cc' : 'intel/icc', + 'cxx' : 'intel/icpc', + 'f77' : 'intel/ifort', + 'fc' : 'intel/ifort' } + @property def cxx11_flag(self): if self.version < ver('11.1'): diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index 6999eb50de..9ac74cfbdb 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -37,6 +37,12 @@ class Pgi(Compiler): # Subclasses use possible names of Fortran 90 compiler fc_names = ['pgf95', 'pgf90'] + # Named wrapper links within spack.build_env_path + link_paths = { 'cc' : 'pgi/pgcc', + 'cxx' : 'pgi/case-insensitive/pgCC', + 'f77' : 'pgi/pgf77', + 'fc' : 'pgi/pgf90' } + @classmethod def default_version(cls, comp): """The '-V' option works for all the PGI compilers. diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py index 308f811eb4..c1d55109a3 100644 --- a/lib/spack/spack/compilers/xl.py +++ b/lib/spack/spack/compilers/xl.py @@ -38,6 +38,12 @@ class Xl(Compiler): # Subclasses use possible names of Fortran 90 compiler fc_names = ['xlf90','xlf90_r','xlf95','xlf95_r','xlf2003','xlf2003_r','xlf2008','xlf2008_r'] + # Named wrapper links within spack.build_env_path + link_paths = { 'cc' : 'xl/xlc', + 'cxx' : 'xl/xlc++', + 'f77' : 'xl/xlf', + 'fc' : 'xl/xlf90' } + @property def cxx11_flag(self): if self.version < ver('13.1'): -- cgit v1.2.3-70-g09d2 From 8dd1f3ffa59dfc9a36572e3f3c4b80a3cdad4f97 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Sat, 19 Dec 2015 07:43:34 -0800 Subject: added mrnet 5.0.1 --- var/spack/packages/mrnet/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/packages/mrnet/package.py b/var/spack/packages/mrnet/package.py index 3eb33d0714..fed944e45f 100644 --- a/var/spack/packages/mrnet/package.py +++ b/var/spack/packages/mrnet/package.py @@ -7,6 +7,7 @@ class Mrnet(Package): version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') version('4.1.0', '5a248298b395b329e2371bf25366115c') + version('5.0.1', '17f65738cf1b9f9b95647ff85f69ecdd') variant('lwthreads', default=False, description="Also build the MRNet LW threadsafe libraries") parallel = False -- cgit v1.2.3-70-g09d2 From 429e15c4a64d29926f1b7a7168c23592e7dec0b7 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Mon, 14 Dec 2015 15:22:51 -0500 Subject: spack python: add -c option Allows passing program in as a string. Example: $ spack python -c 'print 2+3' 5 Also imports spack module by default into the environment. --- lib/spack/spack/cmd/python.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/cmd/python.py b/lib/spack/spack/cmd/python.py index e26b8d3e79..5325e8fd9a 100644 --- a/lib/spack/spack/cmd/python.py +++ b/lib/spack/spack/cmd/python.py @@ -31,6 +31,8 @@ import platform import spack def setup_parser(subparser): + subparser.add_argument( + '-c', dest='python_command', help='Command to execute.') subparser.add_argument( 'python_args', nargs=argparse.REMAINDER, help="File to run plus arguments.") @@ -38,7 +40,8 @@ description = "Launch an interpreter as spack would launch a command" def python(parser, args): # Fake a main python shell by setting __name__ to __main__. - console = code.InteractiveConsole({'__name__' : '__main__'}) + console = code.InteractiveConsole({'__name__' : '__main__', + 'spack' : spack}) if "PYTHONSTARTUP" in os.environ: startup_file = os.environ["PYTHONSTARTUP"] @@ -47,7 +50,10 @@ def python(parser, args): console.runsource(startup.read(), startup_file, 'exec') python_args = args.python_args - if python_args: + python_command = args.python_command + if python_command: + console.runsource(python_command) + elif python_args: sys.argv = python_args with open(python_args[0]) as file: console.runsource(file.read(), python_args[0], 'exec') -- cgit v1.2.3-70-g09d2 From 527154e6dfa0c9e5f35aed56adad3279bac4eac3 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Mon, 14 Dec 2015 15:36:53 -0500 Subject: fix env module sys_type on non-LLNL systems --- share/spack/setup-env.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 5b03aa8955..47202f6087 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -173,8 +173,8 @@ fi # _sp_share_dir=$(cd "$(dirname $_sp_source_file)" && pwd) _sp_prefix=$(cd "$(dirname $(dirname $_sp_share_dir))" && pwd) - -# TODO: fix SYS_TYPE to something non-LLNL-specific -_spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$SYS_TYPE" -_spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$SYS_TYPE" _spack_pathadd PATH "${_sp_prefix%/}/bin" + +_sp_sys_type=$(spack-python -c 'print(spack.architecture.sys_type())') +_spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$_sp_sys_type" +_spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$_sp_sys_type" -- cgit v1.2.3-70-g09d2 From e403576cf9862d409de3be57dc2cabb1caad47c5 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Sat, 19 Dec 2015 18:38:23 -0500 Subject: new package: cfitsio --- var/spack/packages/cfitsio/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/packages/cfitsio/package.py diff --git a/var/spack/packages/cfitsio/package.py b/var/spack/packages/cfitsio/package.py new file mode 100644 index 0000000000..8ba3a469e8 --- /dev/null +++ b/var/spack/packages/cfitsio/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Cfitsio(Package): + """ + CFITSIO is a library of C and Fortran subroutines for reading and writing + data files in FITS (Flexible Image Transport System) data format. + """ + homepage = 'http://heasarc.gsfc.nasa.gov/fitsio/' + version('3.370', 'abebd2d02ba5b0503c633581e3bfa116') + + def url_for_version(self, v): + url = 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio{}.tar.gz' + return url.format(str(v).replace('.', '')) + + def install(self, spec, prefix): + configure('--prefix=' + prefix) + make() + make('install') + -- cgit v1.2.3-70-g09d2 From 32f96b5c73ff25d2a206423b514c831c2ab074fa Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 19 Dec 2015 20:04:00 -0800 Subject: Fix stale code in python version test so that it actually works. --- lib/spack/external/pyqver2.py | 3 ++- lib/spack/spack/test/python_version.py | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/spack/external/pyqver2.py b/lib/spack/external/pyqver2.py index 4a16e2811e..4690239748 100755 --- a/lib/spack/external/pyqver2.py +++ b/lib/spack/external/pyqver2.py @@ -30,7 +30,8 @@ import sys StandardModules = { "__future__": (2, 1), "abc": (2, 6), - "argparse": (2, 7), +# skip argparse now that it's in lib/spack/external +# "argparse": (2, 7), "ast": (2, 6), "atexit": (2, 0), "bz2": (2, 3), diff --git a/lib/spack/spack/test/python_version.py b/lib/spack/spack/test/python_version.py index ba570b416f..2ea5febb11 100644 --- a/lib/spack/spack/test/python_version.py +++ b/lib/spack/spack/test/python_version.py @@ -63,10 +63,6 @@ class PythonVersionTest(unittest.TestCase): all_issues = {} for fn in files: - if fn != '/Users/gamblin2/src/spack/var/spack/packages/vim/package.py': - continue - print fn - with open(fn) as pyfile: versions = pyqver2.get_versions(pyfile.read()) for ver, reasons in versions.items(): -- cgit v1.2.3-70-g09d2 From 3d3bea618e1e72c713794e82b9bb190d0ebf8624 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 19 Dec 2015 20:08:14 -0800 Subject: Fix empty format strings in some packages. --- var/spack/packages/cfitsio/package.py | 3 +-- var/spack/packages/global/package.py | 6 +++--- var/spack/packages/tmuxinator/package.py | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/var/spack/packages/cfitsio/package.py b/var/spack/packages/cfitsio/package.py index 8ba3a469e8..ff450cb5f3 100644 --- a/var/spack/packages/cfitsio/package.py +++ b/var/spack/packages/cfitsio/package.py @@ -9,11 +9,10 @@ class Cfitsio(Package): version('3.370', 'abebd2d02ba5b0503c633581e3bfa116') def url_for_version(self, v): - url = 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio{}.tar.gz' + url = 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio{0}.tar.gz' return url.format(str(v).replace('.', '')) def install(self, spec, prefix): configure('--prefix=' + prefix) make() make('install') - diff --git a/var/spack/packages/global/package.py b/var/spack/packages/global/package.py index a77b1bdc09..e8f06516d9 100644 --- a/var/spack/packages/global/package.py +++ b/var/spack/packages/global/package.py @@ -4,7 +4,7 @@ import os class Global(Package): """ The Gnu Global tagging system """ - # FIXME: add a proper url for your package's homepage here. + homepage = "http://www.gnu.org/software/global" url = "http://tamacom.com/global/global-6.5.tar.gz" @@ -13,9 +13,9 @@ class Global(Package): depends_on('exuberant-ctags') def install(self, spec, prefix): - config_args = ['--prefix={}'.format(prefix)] + config_args = ['--prefix={0}'.format(prefix)] - config_args.append('--with-exuberant-ctags={}'.format( + config_args.append('--with-exuberant-ctags={0}'.format( os.path.join(spec['exuberant-ctags'].prefix.bin, 'ctags'))) configure(*config_args) diff --git a/var/spack/packages/tmuxinator/package.py b/var/spack/packages/tmuxinator/package.py index 26c061cbd6..77ae063e5d 100644 --- a/var/spack/packages/tmuxinator/package.py +++ b/var/spack/packages/tmuxinator/package.py @@ -5,7 +5,7 @@ class Tmuxinator(Package): homepage = "https://github.com/tmuxinator/tmuxinator" url = "https://github.com/tmuxinator/tmuxinator" - version('0.6.11', + version('0.6.11', git='https://github.com/tmuxinator/tmuxinator', tag='v0.6.11') @@ -13,5 +13,4 @@ class Tmuxinator(Package): def install(self, spec, prefix): gem('build', 'tmuxinator.gemspec') - gem('install', 'tmuxinator-{}.gem'.format(self.version)) - + gem('install', 'tmuxinator-{0}.gem'.format(self.version)) -- cgit v1.2.3-70-g09d2 From 614c4d1876f488c699b8982b084699877dc87066 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Sun, 20 Dec 2015 13:27:43 +0100 Subject: moving write_make_inc into a patch function --- var/spack/packages/scotch/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/packages/scotch/package.py b/var/spack/packages/scotch/package.py index 7e54b4fd8d..f92fa915f9 100644 --- a/var/spack/packages/scotch/package.py +++ b/var/spack/packages/scotch/package.py @@ -104,6 +104,10 @@ class Scotch(Package): with open('Makefile.inc', 'w') as fh: fh.write('\n'.join(makefile_inc)) + def patch(self): + with working_dir('src'): + self.write_make_inc() + def install(self, spec, prefix): targets = ['scotch'] if '+mpi' in self.spec: @@ -115,7 +119,6 @@ class Scotch(Package): targets.append('ptesmumps') with working_dir('src'): - self.write_make_inc() for app in targets: make(app, parallel=(not app=='ptesmumps')) -- cgit v1.2.3-70-g09d2 From 27d52badb18ed4281c69730de432c7d6dd5d3f67 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Sun, 20 Dec 2015 13:38:22 +0100 Subject: removing completely the write_make_inc function --- var/spack/packages/scotch/package.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/var/spack/packages/scotch/package.py b/var/spack/packages/scotch/package.py index f92fa915f9..8229ed8686 100644 --- a/var/spack/packages/scotch/package.py +++ b/var/spack/packages/scotch/package.py @@ -72,8 +72,7 @@ class Scotch(Package): makefile_inc.append('LDFLAGS = %s' % ' '.join(ldflags)) - - def write_make_inc(self): + def patch(self): makefile_inc = [] defines = [ '-DCOMMON_RANDOM_FIXED_SEED', @@ -101,12 +100,9 @@ class Scotch(Package): '' ]) - with open('Makefile.inc', 'w') as fh: - fh.write('\n'.join(makefile_inc)) - - def patch(self): with working_dir('src'): - self.write_make_inc() + with open('Makefile.inc', 'w') as fh: + fh.write('\n'.join(makefile_inc)) def install(self, spec, prefix): targets = ['scotch'] -- cgit v1.2.3-70-g09d2 From 14c9c612752da6c46fb02cca7757176f0338d627 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sun, 20 Dec 2015 17:38:35 +0100 Subject: tau : scorep is now a variant --- var/spack/packages/tau/package.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/var/spack/packages/tau/package.py b/var/spack/packages/tau/package.py index 9febb647b3..31492397d8 100644 --- a/var/spack/packages/tau/package.py +++ b/var/spack/packages/tau/package.py @@ -46,6 +46,7 @@ class Tau(Package): # TODO : shmem variant missing variant('download', default=False, description='Downloads and builds various dependencies') + variant('scorep', default=False, description='Activates SCOREP support') variant('openmp', default=True, description='Use OpenMP threads') variant('mpi', default=True, description='Specify use of TAU MPI wrapper library') variant('phase', default=True, description='Generate phase based profiles') @@ -54,7 +55,7 @@ class Tau(Package): # TODO : Try to build direct OTF2 support? Some parts of the OTF support library in TAU are non-conformant, # TODO : and fail at compile-time. Further, SCOREP is compiled with OTF2 support. depends_on('pdt') # Required for TAU instrumentation - depends_on('scorep') + depends_on('scorep', when='+scorep') depends_on('binutils', when='~download') depends_on('mpi', when='+mpi') @@ -95,8 +96,7 @@ class Tau(Package): # As such it has a few #peculiarities# that make this build quite hackish. options = ["-prefix=%s" % prefix, "-iowrapper", - "-pdt=%s" % spec['pdt'].prefix, - "-scorep=%s" % spec['scorep'].prefix] + "-pdt=%s" % spec['pdt'].prefix] # If download is active, download and build suggested dependencies if '+download' in spec: options.extend(['-bfd=download', @@ -106,6 +106,9 @@ class Tau(Package): options.extend(["-bfd=%s" % spec['binutils'].prefix]) # TODO : unwind and asmdex are still missing + if '+scorep' in spec: + options.append("-scorep=%s" % spec['scorep'].prefix) + if '+openmp' in spec: options.append('-openmp') -- cgit v1.2.3-70-g09d2