From 837eff1704d26fb654a964ecea91e268d728fff6 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 31 Mar 2016 18:07:44 +0200 Subject: openssl : special treatment for @external (fixes #647) --- .../repos/builtin/packages/openssl/package.py | 45 ++++++++++++++-------- 1 file changed, 28 insertions(+), 17 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 70afaf4038..db66d1f56e 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -30,26 +30,14 @@ class Openssl(Package): # Same idea, but just to avoid issuing the same message multiple times warnings_given_to_user = getattr(Openssl, '_warnings_given', {}) if openssl_url is None: - latest = 'http://www.openssl.org/source/openssl-{version}.tar.gz' - older = 'http://www.openssl.org/source/old/{version_number}/openssl-{version_full}.tar.gz' - # Try to use the url where the latest tarballs are stored. If the url does not exist (404), then - # return the url for older format - version_number = '.'.join([str(x) for x in version[:-1]]) - older_url = older.format(version_number=version_number, version_full=version) - latest_url = latest.format(version=version) - response = urllib.urlopen(latest.format(version=version)) - if response.getcode() == 404: - openssl_url = older_url - # Checks if we already warned the user for this particular version of OpenSSL. - # If not we display a warning message and mark this version + if self.spec.satisfies('@external'): + # The version @external is reserved to system openssl. In that case return a fake url and exit + openssl_url = '@external (reserved version for system openssl)' if not warnings_given_to_user.get(version, False): - tty.warn('This installation depends on an old version of OpenSSL, which may have known security issues. ') - tty.warn('Consider updating to the latest version of this package.') - tty.warn('More details at {homepage}'.format(homepage=Openssl.homepage)) + tty.msg('Using openssl@external : the version @external is reserved for system openssl') warnings_given_to_user[version] = True else: - openssl_url = latest_url - # Store the computed URL + openssl_url = self.check_for_outdated_release(version, warnings_given_to_user) # Store the computed URL openssl_urls[version] = openssl_url # Store the updated dictionary of URLS Openssl._openssl_url = openssl_urls @@ -58,6 +46,29 @@ class Openssl(Package): return openssl_url + def check_for_outdated_release(self, version, warnings_given_to_user): + latest = 'http://www.openssl.org/source/openssl-{version}.tar.gz' + older = 'http://www.openssl.org/source/old/{version_number}/openssl-{version_full}.tar.gz' + # Try to use the url where the latest tarballs are stored. If the url does not exist (404), then + # return the url for older format + version_number = '.'.join([str(x) for x in version[:-1]]) + older_url = older.format(version_number=version_number, version_full=version) + latest_url = latest.format(version=version) + response = urllib.urlopen(latest.format(version=version)) + if response.getcode() == 404: + openssl_url = older_url + # Checks if we already warned the user for this particular version of OpenSSL. + # If not we display a warning message and mark this version + if not warnings_given_to_user.get(version, False): + tty.warn( + 'This installation depends on an old version of OpenSSL, which may have known security issues. ') + tty.warn('Consider updating to the latest version of this package.') + tty.warn('More details at {homepage}'.format(homepage=Openssl.homepage)) + warnings_given_to_user[version] = True + else: + openssl_url = latest_url + return openssl_url + def install(self, spec, prefix): # OpenSSL uses a variable APPS in its Makefile. If it happens to be set # in the environment, then this will override what is set in the -- cgit v1.2.3-70-g09d2 From d375ddadc4d6f253b21e9c982040757bd5a187d3 Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 4 Apr 2016 12:25:13 +0200 Subject: openssl : reads newer version from ftp (recommended on openssl web-site) --- var/spack/repos/builtin/packages/openssl/package.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index db66d1f56e..9e3109bfed 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -3,6 +3,7 @@ import llnl.util.tty as tty from spack import * + class Openssl(Package): """The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source @@ -47,16 +48,16 @@ class Openssl(Package): return openssl_url def check_for_outdated_release(self, version, warnings_given_to_user): - latest = 'http://www.openssl.org/source/openssl-{version}.tar.gz' + latest = 'ftp://ftp.openssl.org/source/openssl-{version}.tar.gz' older = 'http://www.openssl.org/source/old/{version_number}/openssl-{version_full}.tar.gz' # Try to use the url where the latest tarballs are stored. If the url does not exist (404), then # return the url for older format version_number = '.'.join([str(x) for x in version[:-1]]) - older_url = older.format(version_number=version_number, version_full=version) - latest_url = latest.format(version=version) - response = urllib.urlopen(latest.format(version=version)) - if response.getcode() == 404: - openssl_url = older_url + try: + openssl_url = latest.format(version=version) + urllib.urlopen(openssl_url) + except IOError: + openssl_url = older.format(version_number=version_number, version_full=version) # Checks if we already warned the user for this particular version of OpenSSL. # If not we display a warning message and mark this version if not warnings_given_to_user.get(version, False): @@ -65,8 +66,7 @@ class Openssl(Package): tty.warn('Consider updating to the latest version of this package.') tty.warn('More details at {homepage}'.format(homepage=Openssl.homepage)) warnings_given_to_user[version] = True - else: - openssl_url = latest_url + return openssl_url def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From a87ae5173f5e30aa9d8b3360e67dbc17568342f5 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 18:16:25 -0400 Subject: Update Julia - allow checking out the master branche - add dependencies requires by important Julia package - add OpenBLAS patch --- .../repos/builtin/packages/julia/openblas.patch | 68 ++++++++++++++++++++++ var/spack/repos/builtin/packages/julia/package.py | 68 ++++++++++++++-------- 2 files changed, 113 insertions(+), 23 deletions(-) create mode 100644 var/spack/repos/builtin/packages/julia/openblas.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/julia/openblas.patch b/var/spack/repos/builtin/packages/julia/openblas.patch new file mode 100644 index 0000000000..f75d7dd04f --- /dev/null +++ b/var/spack/repos/builtin/packages/julia/openblas.patch @@ -0,0 +1,68 @@ +diff --git a/deps/Makefile b/deps/Makefile +index 6cb73be..bcd8520 100644 +--- a/deps/Makefile ++++ b/deps/Makefile +@@ -1049,7 +1049,7 @@ OPENBLAS_BUILD_OPTS += NO_AFFINITY=1 + + # Build for all architectures - required for distribution + ifeq ($(OPENBLAS_DYNAMIC_ARCH), 1) +-OPENBLAS_BUILD_OPTS += DYNAMIC_ARCH=1 ++OPENBLAS_BUILD_OPTS += DYNAMIC_ARCH=1 MAKE_NO_J=1 + endif + + # 64-bit BLAS interface +@@ -1085,6 +1085,7 @@ OPENBLAS_BUILD_OPTS += NO_AVX2=1 + endif + + $(OPENBLAS_SRC_DIR)/config.status: $(OPENBLAS_SRC_DIR)/Makefile ++ cd $(dir $@) && patch -p1 < ../openblas-make.patch + ifeq ($(OS),WINNT) + cd $(dir $@) && patch -p1 < ../openblas-win64.patch + endif +diff --git a/deps/openblas.version b/deps/openblas.version +index 7c97e1b..58b9467 100644 +--- a/deps/openblas.version ++++ b/deps/openblas.version +@@ -1,2 +1,2 @@ +-OPENBLAS_BRANCH=v0.2.15 +-OPENBLAS_SHA1=53e849f4fcae4363a64576de00e982722c7304f9 ++OPENBLAS_BRANCH=v0.2.17 ++OPENBLAS_SHA1=a71e8c82f6a9f73093b631e5deab1e8da716b61f +--- a/deps/openblas-make.patch ++++ b/deps/openblas-make.patch +@@ -0,0 +1,35 @@ ++diff --git a/Makefile.system b/Makefile.system ++index b89f60e..2dbdad0 100644 ++--- a/Makefile.system +++++ b/Makefile.system ++@@ -139,6 +139,10 @@ NO_PARALLEL_MAKE=0 ++ endif ++ GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE) ++ +++ifdef MAKE_NO_J +++GETARCH_FLAGS += -DMAKE_NO_J=$(MAKE_NO_J) +++endif +++ ++ ifdef MAKE_NB_JOBS ++ GETARCH_FLAGS += -DMAKE_NB_JOBS=$(MAKE_NB_JOBS) ++ endif ++diff --git a/getarch.c b/getarch.c ++index f9c49e6..dffad70 100644 ++--- a/getarch.c +++++ b/getarch.c ++@@ -1012,6 +1012,7 @@ int main(int argc, char *argv[]){ ++ #endif ++ #endif ++ +++#ifndef MAKE_NO_J ++ #ifdef MAKE_NB_JOBS ++ printf("MAKE += -j %d\n", MAKE_NB_JOBS); ++ #elif NO_PARALLEL_MAKE==1 ++@@ -1021,6 +1022,7 @@ int main(int argc, char *argv[]){ ++ printf("MAKE += -j %d\n", get_num_cores()); ++ #endif ++ #endif +++#endif ++ ++ break; ++ diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 6900af38e4..b3a523bc45 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -4,43 +4,55 @@ import os class Julia(Package): """The Julia Language: A fresh approach to technical computing""" homepage = "http://julialang.org" - url = "http://github.com/JuliaLang/julia/releases/download/v0.4.2/julia-0.4.2.tar.gz" + url = "https://github.com/JuliaLang/julia/releases/download/v0.4.3/julia-0.4.3-full.tar.gz" - version('0.4.3', '7b9f096798fca4bef262a64674bc2b52') - version('0.4.2', 'ccfeb4f4090c8b31083f5e1ccb03eb06') + version('master', + git='https://github.com/JuliaLang/julia.git', branch='master') + version('0.4.5', '69141ff5aa6cee7c0ec8c85a34aa49a6') + version('0.4.3', '8a4a59fd335b05090dd1ebefbbe5aaac') - patch('gc.patch') + patch('gc.patch', when='@:0.5') + patch('openblas.patch') - # Build-time dependencies - depends_on("cmake @2.8:") + # Build-time dependencies: # depends_on("awk") # depends_on("m4") # depends_on("pkg-config") - depends_on("python @2.6:2.9") - # I think that Julia requires the dependencies above, but it builds find (on - # my system) without these. We should enable them as necessary. + # Combined build-time and run-time dependencies: + depends_on("cmake @2.8:") + depends_on("git") + depends_on("openssl") + depends_on("python @2.7:2.999") + + # I think that Julia requires the dependencies above, but it + # builds fine (on my system) without these. We should enable them + # as necessary. - # Run-time dependencies + # Run-time dependencies: # depends_on("arpack") # depends_on("fftw +float") # depends_on("gmp") + # depends_on("libgit") # depends_on("mpfr") + # depends_on("openblas") # depends_on("pcre2") - # ARPACK: Requires BLAS and LAPACK; needs to use the same version as Julia. + # ARPACK: Requires BLAS and LAPACK; needs to use the same version + # as Julia. - # BLAS and LAPACK: Julia prefers 64-bit versions on 64-bit systems. OpenBLAS - # has an option for this; make it available as variant. + # BLAS and LAPACK: Julia prefers 64-bit versions on 64-bit + # systems. OpenBLAS has an option for this; make it available as + # variant. - # FFTW: Something doesn't work when using a pre-installed FFTW library; need - # to investigate. + # FFTW: Something doesn't work when using a pre-installed FFTW + # library; need to investigate. - # GMP, MPFR: Something doesn't work when using a pre-installed FFTW library; - # need to investigate. + # GMP, MPFR: Something doesn't work when using a pre-installed + # FFTW library; need to investigate. - # LLVM: Julia works only with specific versions, and might require patches. - # Thus we let Julia install its own LLVM. + # LLVM: Julia works only with specific versions, and might require + # patches. Thus we let Julia install its own LLVM. # Other possible dependencies: # USE_SYSTEM_OPENLIBM=0 @@ -50,11 +62,21 @@ class Julia(Package): # USE_SYSTEM_UTF8PROC=0 # USE_SYSTEM_LIBGIT2=0 + # Run-time dependencies for Julia packages: + depends_on("hdf5") + depends_on("mpi") + def install(self, spec, prefix): - # Explicitly setting CC, CXX, or FC breaks building libuv, one of - # Julia's dependencies. This might be a Darwin-specific problem. Given - # how Spack sets up compilers, Julia should still use Spack's compilers, - # even if we don't specify them explicitly. + if '@master' in spec: + # Julia needs to know the offset from a specific commit + git = which('git') + git('fetch', '--unshallow') + + # Explicitly setting CC, CXX, or FC breaks building libuv, one + # of Julia's dependencies. This might be a Darwin-specific + # problem. Given how Spack sets up compilers, Julia should + # still use Spack's compilers, even if we don't specify them + # explicitly. options = [#"CC=cc", #"CXX=c++", #"FC=fc", -- cgit v1.2.3-70-g09d2 From 0ebb192b2f26cfd2bbadc9be72c36469c7493d89 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 5 Apr 2016 10:36:20 -0700 Subject: Update the MRNet package with the latest source and patch related to the krell tools needs. Also, reorder the list of version to match with the spack standard: newest to oldest. --- .../repos/builtin/packages/mrnet/krell-5.0.1.patch | 154 +++++++++++++++++++++ var/spack/repos/builtin/packages/mrnet/package.py | 17 ++- 2 files changed, 167 insertions(+), 4 deletions(-) create mode 100644 var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch b/var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch new file mode 100644 index 0000000000..53294fbbc6 --- /dev/null +++ b/var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch @@ -0,0 +1,154 @@ +--- mrnet-3093918/include/mrnet/Types.h 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/include/mrnet/Types.h 2016-03-16 12:29:33.986132302 -0700 +@@ -23,7 +23,7 @@ + #ifndef MRNET_VERSION_MAJOR + # define MRNET_VERSION_MAJOR 5 + # define MRNET_VERSION_MINOR 0 +-# define MRNET_VERSION_REV 0 ++# define MRNET_VERSION_REV 1 + #endif + + namespace MRN +--- mrnet-3093918/include/mrnet_lightweight/Types.h 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/include/mrnet_lightweight/Types.h 2016-03-16 12:29:33.987132302 -0700 +@@ -30,7 +30,7 @@ + #ifndef MRNET_VERSION_MAJOR + #define MRNET_VERSION_MAJOR 5 + #define MRNET_VERSION_MINOR 0 +-#define MRNET_VERSION_REV 0 ++#define MRNET_VERSION_REV 1 + #endif + void get_Version(int* major, + int* minor, +--- mrnet-3093918/src/lightweight/SerialGraph.c 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/src/lightweight/SerialGraph.c 2016-03-16 12:29:33.995132302 -0700 +@@ -59,7 +59,7 @@ + + mrn_dbg_func_begin(); + +- sprintf(hoststr, "[%s:%hu:%u:", ihostname, iport, irank); ++ sprintf(hoststr, "[%s:%05hu:%u:", ihostname, iport, irank); + mrn_dbg(5, mrn_printf(FLF, stderr, "looking for SubTreeRoot: '%s'\n", hoststr)); + + byte_array = sg->byte_array; +@@ -110,7 +110,7 @@ + + mrn_dbg_func_begin(); + +- len = (size_t) sprintf(hoststr, "[%s:%hu:%u:0]", ihostname, iport, irank); ++ len = (size_t) sprintf(hoststr, "[%s:%05hu:%u:0]", ihostname, iport, irank); + mrn_dbg(5, mrn_printf(FLF, stderr, "adding sub tree leaf: %s\n", hoststr)); + + len += strlen(sg->byte_array) + 1; +@@ -139,7 +139,7 @@ + + mrn_dbg_func_begin(); + +- len = (size_t) sprintf(hoststr, "[%s:%hu:%u:1", ihostname, iport, irank); ++ len = (size_t) sprintf(hoststr, "[%s:%05hu:%u:1", ihostname, iport, irank); + mrn_dbg(5, mrn_printf(FLF, stderr, "adding sub tree root: %s\n", hoststr)); + + len += strlen(sg->byte_array) + 1; +@@ -360,8 +360,8 @@ + char old_hoststr[256]; + char new_hoststr[256]; + +- sprintf(old_hoststr, "[%s:%hu:%u:", hostname, UnknownPort, irank); +- sprintf(new_hoststr, "[%s:%hu:%u:", hostname, port, irank); ++ sprintf(old_hoststr, "[%s:%05hu:%u:", hostname, UnknownPort, irank); ++ sprintf(new_hoststr, "[%s:%05hu:%u:", hostname, port, irank); + + old_byte_array = sg->byte_array; + new_byte_array = (char*) malloc( strlen(old_byte_array) + 10 ); +--- mrnet-3093918/xplat/src/lightweight/SocketUtils.c 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/xplat/src/lightweight/SocketUtils.c 2016-03-16 12:29:34.006132303 -0700 +@@ -15,7 +15,7 @@ + #else + const XPlat_Socket InvalidSocket = INVALID_SOCKET; + #endif +-const XPlat_Port InvalidPort = (XPlat_Port)-1; ++const XPlat_Port InvalidPort = (XPlat_Port)0; + + static bool_t SetTcpNoDelay( XPlat_Socket sock ) + { +--- mrnet-3093918/conf/configure.in 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/conf/configure.in 2016-03-16 12:45:54.573196781 -0700 +@@ -107,6 +107,18 @@ + AC_SUBST(PURIFY) + + ++AC_ARG_WITH(expat, ++ [AS_HELP_STRING([--with-expat=PATH], ++ [Absolute path to installation of EXPAT libraries (note: specify the path to the directory containing "include" and "lib" sub-directories)])], ++ [EXPAT_DIR="${withval}"], ++ [EXPAT_DIR=""]) ++ ++if test "x$EXPAT_DIR" = "x" ; then ++ EXPAT_LIB="" ++else ++ EXPAT_LIB="-L$EXPAT_DIR/lib" ++fi ++ + dnl === Checks for header files. + AC_CHECK_HEADERS([assert.h errno.h fcntl.h limits.h netdb.h signal.h stddef.h stdlib.h stdio.h string.h unistd.h arpa/inet.h netinet/in.h sys/ioctl.h sys/socket.h sys/sockio.h sys/time.h]) + AC_HEADER_STDBOOL +@@ -432,7 +444,7 @@ + CRAYXT_ATH_LIBS_SO="$CRAYXT_ATH_LIBS -lalps" + CRAYXT_ATH_LIBS="$CRAYXT_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc -Wl,-Bdynamic" + CRAYXE_ATH_LIBS_SO="$CRAYXE_ATH_LIBS -lalps" +- CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi -lexpat -Wl,-Bdynamic" ++ CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi $EXPAT_LIB -lexpat -Wl,-Bdynamic" + + AC_CHECK_LIB( [alps], [alps_launch_tool_helper], + [HAVE_ATH_LIBS="yes"; EXTRA_LIBS="$CRAYXT_ATH_LIBS $EXTRA_LIBS"; EXTRA_LIBS_SO="$CRAYXT_ATH_LIBS_SO $EXTRA_LIBS_SO"], +--- mrnet-3093918/configure 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/configure 2016-03-16 13:47:20.386439143 -0700 +@@ -742,6 +742,7 @@ + enable_debug + enable_ltwt_threadsafe + with_purify ++with_expat + ' + ac_precious_vars='build_alias + host_alias +@@ -1399,6 +1400,9 @@ + containing "include" and "lib" sub-directories) + --with-launchmon=PATH Absolute path to installation of LaunchMON + --with-purify Use purify for memory debugging ++ --with-expat=PATH Absolute path to installation of EXPAT libraries ++ (note: specify the path to the directory containing ++ "include" and "lib" sub-directories) + + Some influential environment variables: + CC C compiler command +@@ -3541,6 +3545,21 @@ + + + ++# Check whether --with-expat was given. ++if test "${with_expat+set}" = set; then : ++ withval=$with_expat; EXPAT_DIR="${withval}" ++else ++ EXPAT_DIR="" ++fi ++ ++ ++if test "x$EXPAT_DIR" = "x" ; then ++ EXPAT_LIB="" ++else ++ EXPAT_LIB="-L$EXPAT_DIR/lib" ++fi ++ ++ + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -5473,7 +5492,7 @@ + CRAYXT_ATH_LIBS_SO="$CRAYXT_ATH_LIBS -lalps" + CRAYXT_ATH_LIBS="$CRAYXT_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc -Wl,-Bdynamic" + CRAYXE_ATH_LIBS_SO="$CRAYXE_ATH_LIBS -lalps" +- CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi -lexpat -Wl,-Bdynamic" ++ CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi $EXPAT_LIB -lexpat -Wl,-Bdynamic" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alps_launch_tool_helper in -lalps" >&5 + $as_echo_n "checking for alps_launch_tool_helper in -lalps... " >&6; } diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index fed944e45f..b8cbb7e8f9 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -3,16 +3,25 @@ from spack import * class Mrnet(Package): """The MRNet Multi-Cast Reduction Network.""" homepage = "http://paradyn.org/mrnet" - url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_4.0.0.tar.gz" + url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_5.0.1.tar.gz" + list_url = "http://ftp.cs.wisc.edu/paradyn/mrnet" - version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') - version('4.1.0', '5a248298b395b329e2371bf25366115c') version('5.0.1', '17f65738cf1b9f9b95647ff85f69ecdd') + version('4.1.0', '5a248298b395b329e2371bf25366115c') + version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') + + # Add a patch that brings mrnet-5.0.1 up to date with the current development tree + # The development tree contains fixes needed for the krell based tools + variant('krellpatch', default=False, description="Build MRNet with krell openspeedshop based patch.") + patch('krell-5.0.1.patch', when='@5.0.1+krellpatch') + + variant('lwthreads', default=False, description="Also build the MRNet LW threadsafe libraries") parallel = False - depends_on("boost") + #depends_on("boost") + depends_on("boost@1.53.0") def install(self, spec, prefix): # Build the MRNet LW thread safe libraries when the krelloptions variant is present -- cgit v1.2.3-70-g09d2 From 872f049b30cef3395900f57cd98575b8cacfbb36 Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Tue, 29 Mar 2016 22:27:16 -0400 Subject: create visit package --- var/spack/repos/builtin/packages/visit/package.py | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 var/spack/repos/builtin/packages/visit/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py new file mode 100644 index 0000000000..ff80815ae6 --- /dev/null +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -0,0 +1,40 @@ +# 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 visit +# +# You can always get back here to change things with: +# +# spack edit visit +# +# See the spack documentation for more information on building +# packages. +# +from spack import * + + +class Visit(Package): + """VisIt is an Open Source, interactive, scalable, visualization, animation and analysis tool.""" + homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/" + url = "http://portal.nersc.gov/project/visit/releases/2.10.1/visit2.10.1.tar.gz" + + version('2.10.1', '3cbca162fdb0249f17c4456605c4211e') + + depends_on("vtk@7.0") + depends_on("qt@4.8.6") + # FIXME: Add dependencies if this package requires them. + + def install(self, spec, prefix): + # FIXME: Modify the configure line to suit your build system here. + # FIXME: Spack couldn't guess one, so here are some options: + # configure('--prefix=%s' % prefix) + std_cmake_args = [] + cmake('.', *std_cmake_args) + + # FIXME: Add logic to build and install here + make() + make("install") -- cgit v1.2.3-70-g09d2 From 2e05830eb1078778eddcd702a9a50fd3d2b775d5 Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Thu, 31 Mar 2016 14:55:35 -0400 Subject: Constrain to vtk6.1 qt4.8.6 and opengl1 rendering backend --- var/spack/repos/builtin/packages/visit/package.py | 36 ++++++++--------------- 1 file changed, 12 insertions(+), 24 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index ff80815ae6..ade86631cf 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -1,19 +1,3 @@ -# 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 visit -# -# You can always get back here to change things with: -# -# spack edit visit -# -# See the spack documentation for more information on building -# packages. -# from spack import * @@ -24,17 +8,21 @@ class Visit(Package): version('2.10.1', '3cbca162fdb0249f17c4456605c4211e') - depends_on("vtk@7.0") + depends_on("vtk@6.1.0~opengl2") depends_on("qt@4.8.6") - # FIXME: Add dependencies if this package requires them. + depends_on("python") + # TODO: Other package dependencies from spack def install(self, spec, prefix): - # FIXME: Modify the configure line to suit your build system here. - # FIXME: Spack couldn't guess one, so here are some options: - # configure('--prefix=%s' % prefix) - std_cmake_args = [] - cmake('.', *std_cmake_args) - # FIXME: Add logic to build and install here + feature_args = std_cmake_args[:] + feature_args = ["-DVTK_MAJOR_VERSION=6", + "-DVTK_MINOR_VERSION=1", + "-DCMAKE_INSTALL_PREFIX:PATH=%s" % spec.prefix, + "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, + "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin] + + cmake('./src', *feature_args) + make() make("install") -- cgit v1.2.3-70-g09d2 From c3c70cf704be1e174391e2d64d5491db72289a57 Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Tue, 5 Apr 2016 14:35:33 -0400 Subject: Install lite pdb headers --- var/spack/repos/builtin/packages/silo/package.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index b7894e4d2b..245acc0973 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -1,5 +1,6 @@ from spack import * + class Silo(Package): """Silo is a library for reading and writing a wide variety of scientific data to binary, disk files.""" @@ -30,6 +31,7 @@ class Silo(Package): '--prefix=%s' % prefix, '--with-hdf5=%s,%s' % (spec['hdf5'].prefix.include, spec['hdf5'].prefix.lib), '--with-zlib=%s,%s' % (spec['zlib'].prefix.include, spec['zlib'].prefix.lib), + '--enable-install-lite-headers', *config_args) make() -- cgit v1.2.3-70-g09d2 From f221f645091bb0175185e8c20fe19be2cc42639a Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Tue, 5 Apr 2016 22:31:08 -0400 Subject: Add variant for shared library --- var/spack/repos/builtin/packages/silo/package.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 245acc0973..638a894b7b 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -13,6 +13,7 @@ class Silo(Package): version('4.8', 'b1cbc0e7ec435eb656dc4b53a23663c9') variant('fortran', default=True, description='Enable Fortran support') + variant('shared', default=True, description='Build shared libraries') variant('silex', default=False, description='Builds Silex, a GUI for viewing Silo files') depends_on('hdf5') @@ -22,6 +23,8 @@ class Silo(Package): config_args = [ '--enable-fortran' if '+fortran' in spec else '--disable-fortran', '--enable-silex' if '+silex' in spec else '--disable-silex', + '--enable-shared' if '+shared' in spec else '--disable-shared', + '--disable-static' if '+shared' in spec else '--enable-static', ] if '+silex' in spec: -- cgit v1.2.3-70-g09d2 From 071548a62f8dd13d09915c1ed985063e6e372d74 Mon Sep 17 00:00:00 2001 From: Dhanannjay 'Djay' Deo Date: Tue, 5 Apr 2016 23:16:57 -0400 Subject: Building VisIt with silo --- var/spack/repos/builtin/packages/visit/package.py | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index ade86631cf..9b21370fa3 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -11,18 +11,22 @@ class Visit(Package): depends_on("vtk@6.1.0~opengl2") depends_on("qt@4.8.6") depends_on("python") - # TODO: Other package dependencies from spack + depends_on("hdf5") # silo seems to need it + depends_on("silo+shared") def install(self, spec, prefix): + with working_dir('spack-build', create=True): - feature_args = std_cmake_args[:] - feature_args = ["-DVTK_MAJOR_VERSION=6", - "-DVTK_MINOR_VERSION=1", - "-DCMAKE_INSTALL_PREFIX:PATH=%s" % spec.prefix, - "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, - "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin] + feature_args = std_cmake_args[:] + feature_args = ["-DVTK_MAJOR_VERSION=6", + "-DVTK_MINOR_VERSION=1", + "-DCMAKE_INSTALL_PREFIX:PATH=%s" % spec.prefix, + "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, + "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin, + "-DVISIT_SILO_DIR:PATH=%s" % spec['silo'].prefix, + "-DVISIT_HDF5_DIR:PATH=%s" % spec['hdf5'].prefix] - cmake('./src', *feature_args) + cmake('../src', *feature_args) - make() - make("install") + make() + make("install") -- cgit v1.2.3-70-g09d2 From fbabfc593d10a7fc35944e72e2eb8b1ebf4818eb Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 6 Apr 2016 16:44:22 -0500 Subject: Make R extensable and add a couple of packages for verification. Added R as a build system so that the create template will have the correct configure line. Added a regex for version parsing as the R URLs are a little odd. --- lib/spack/spack/cmd/create.py | 8 +++- lib/spack/spack/url.py | 3 ++ var/spack/repos/builtin/packages/R/package.py | 54 ++++++++++++++++++++++ .../repos/builtin/packages/r-abind/package.py | 15 ++++++ .../repos/builtin/packages/r-magic/package.py | 15 ++++++ 5 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/r-abind/package.py create mode 100644 var/spack/repos/builtin/packages/r-magic/package.py (limited to 'var') diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index f0cd50b8df..e3a31806ab 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -124,10 +124,12 @@ class ConfigureGuesser(object): autotools = "configure('--prefix=%s' % prefix)" cmake = "cmake('.', *std_cmake_args)" python = "python('setup.py', 'install', '--prefix=%s' % prefix)" + r = "R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)" config_lines = ((r'/configure$', 'autotools', autotools), (r'/CMakeLists.txt$', 'cmake', cmake), - (r'/setup.py$', 'python', python)) + (r'/setup.py$', 'python', python), + (r'/NAMESPACE$', 'r', r)) # Peek inside the tarball. tar = which('tar') @@ -272,6 +274,10 @@ def create(parser, args): if guesser.build_system == 'python': name = 'py-%s' % name + # Prepend 'r-' to R package names, by convention. + if guesser.build_system == 'r': + name = 'r-%s' % name + # Create a directory for the new package. pkg_path = repo.filename_for_package_name(name) if os.path.exists(pkg_path) and not args.force: diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index f51f05cad7..b4fb70d6fb 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -206,6 +206,9 @@ def parse_version_offset(path): # e.g. lame-398-1 (r'-((\d)+-\d)', stem), + # e.g. foobar_1.2-3 + (r'_((\d+\.)+\d+(-\d+)?)', stem), + # e.g. foobar-4.5.1 (r'-((\d+\.)*\d+)$', stem), diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 2471dff09b..3a76416f27 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -1,4 +1,14 @@ +import functools +import glob +import inspect +import os +import re +from contextlib import closing + +import spack +from llnl.util.lang import match_predicate from spack import * +from spack.util.environment import * class R(Package): @@ -9,6 +19,8 @@ class R(Package): """ homepage = "https://www.r-project.org" url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz" + + extendable = True version('3.2.3', '1ba3dac113efab69e706902810cc2970') version('3.2.2', '57cef5c2e210a5454da1979562a10e5b') @@ -47,3 +59,45 @@ class R(Package): configure(*options) make() make('install') + + # ======================================================================== + # Set up environment to make install easy for R extensions. + # ======================================================================== + + @property + def r_lib_dir(self): + return os.path.join('lib64', 'R', 'library') + + def setup_dependent_environment(self, spack_env, run_env, extension_spec): + # Set R_LIBS to include the library dir for the + # extension and any other R extensions it depends on. + r_libs_path = [] + for d in extension_spec.traverse(): + if d.package.extends(self.spec): + r_libs_path.append(os.path.join(d.prefix, self.r_lib_dir)) + + r_libs_path = ':'.join(r_libs_path) + spack_env.set('R_LIBS', r_libs_path) + + # For run time environment set only the path for extension_spec and prepend it to R_LIBS + if extension_spec.package.extends(self.spec): + run_env.prepend_path('R_LIBS', os.path.join(extension_spec.prefix, self.r_lib_dir)) + + + def setup_dependent_package(self, module, ext_spec): + """ + Called before R modules' install() methods. + + In most cases, extensions will only need to have one line:: + + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) + """ + # R extension builds can have a global R executable function + module.R = Executable(join_path(self.spec.prefix.bin, 'R')) + + # Add variable for library directry + module.r_lib_dir = os.path.join(ext_spec.prefix, self.r_lib_dir) + + # Make the site packages directory for extensions, if it does not exist already. + if ext_spec.package.is_extension: + mkdirp(module.r_lib_dir) diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py new file mode 100644 index 0000000000..54d399c432 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -0,0 +1,15 @@ +from spack import * + +class RAbind(Package): + """Combine multidimensional arrays into a single array. This is a generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and higher-dimensional arrays. Also provides functions 'adrop', 'asub', and 'afill' for manipulating, extracting and replacing data in arrays.""" + + homepage = "https://cran.r-project.org/" + url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" + + version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5', expand=False) + + extends('R') + + def install(self, spec, prefix): + + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py new file mode 100644 index 0000000000..5f25b2a162 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -0,0 +1,15 @@ +from spack import * + +class RMagic(Package): + """A collection of efficient, vectorized algorithms for the creation and investigation of magic squares and hypercubes, including a variety of functions for the manipulation and analysis of arbitrarily dimensioned arrays.""" + homepage = "https://cran.r-project.org/" + url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" + + version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029', expand=False) + + extends('R') + + depends_on('r-abind') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) -- cgit v1.2.3-70-g09d2 From 32779ab1f6c2658771e69e58f8d8a451b23043b0 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 6 Apr 2016 17:02:34 -0500 Subject: Add r-filehash to test version naming. --- var/spack/repos/builtin/packages/r-filehash/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-filehash/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py new file mode 100644 index 0000000000..a3b688da10 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -0,0 +1,14 @@ +from spack import * + +class RFilehash(Package): + """Implements a simple key-value style database where character string keys are associated with data values that are stored on the disk. A simple interface is provided for inserting, retrieving, and deleting data from the database. Utilities are provided that allow 'filehash' databases to be treated much like environments and lists are already used in R. These utilities are provided to encourage interactive and exploratory analysis on large datasets. Three different file formats for representing the database are currently available and new formats can easily be incorporated by third parties for use in the 'filehash' framework.""" + + homepage = 'https://cran.r-project.org/' + url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" + + version('2.3', '01fffafe09b148ccadc9814c103bdc2f', expand=False) + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) -- cgit v1.2.3-70-g09d2 From 8a7f34665b0b8b95f273401082d862989bb4443c Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 6 Apr 2016 23:05:49 -0500 Subject: Make sure base bioconductor package can be installed. --- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-BiocGenerics/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py new file mode 100644 index 0000000000..e2d9bb9594 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -0,0 +1,13 @@ +from spack import * + +class RBiocgenerics(Package): + """S4 generic functions needed by many Bioconductor packages.""" + homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html' + url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" + + version('0.16.1', 'c2148ffd86fc6f1f819c7f68eb2c744f', expand=False) + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) -- cgit v1.2.3-70-g09d2 From 7d19154e1852ad43af889505e19a36873d0e9c18 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:01:28 -0400 Subject: pkg-config: use the internal glib glib requires pkg-config itself, so on machines without pkg-config, there's a bootstrapping problem. --- var/spack/repos/builtin/packages/pkg-config/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py index 9964c6ce34..a803bc3f9b 100644 --- a/var/spack/repos/builtin/packages/pkg-config/package.py +++ b/var/spack/repos/builtin/packages/pkg-config/package.py @@ -10,7 +10,12 @@ class PkgConfig(Package): parallel = False def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") + configure("--prefix=%s" %prefix, + "--enable-shared", + "--with-internal-glib") # There's a bootstrapping problem here; + # glib uses pkg-config as well, so + # break the cycle by using the internal + # glib. make() make("install") -- cgit v1.2.3-70-g09d2 From 6c409d6b9238199370512ff8a8d30c6b2ff67769 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:03:05 -0400 Subject: py-matplotlib: depend on pkg-config On OS X, freetype isn't found by default, but pkg-config can. --- var/spack/repos/builtin/packages/py-matplotlib/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 45e77dd631..19194c942e 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -26,6 +26,7 @@ class PyMatplotlib(Package): depends_on('py-pbr') depends_on('py-funcsigs') + depends_on('pkg-config') depends_on('freetype') depends_on('qt', when='+gui') depends_on('bzip2') -- cgit v1.2.3-70-g09d2 From dcd6b1934808e3700a3d1fc71e261087d9e71ae7 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:03:36 -0400 Subject: py-setuptools: sort versions --- var/spack/repos/builtin/packages/py-setuptools/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index c6d9be1add..38158f4d27 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -5,11 +5,11 @@ class PySetuptools(Package): homepage = "https://pypi.python.org/pypi/setuptools" url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" - version('11.3.1', '01f69212e019a2420c1693fb43593930') - version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') - version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') - version('19.2', '78353b1f80375ca5e088f4b4627ffe03') version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') + version('19.2', '78353b1f80375ca5e088f4b4627ffe03') + version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') + version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') + version('11.3.1', '01f69212e019a2420c1693fb43593930') extends('python') -- cgit v1.2.3-70-g09d2 From 9eaf735bcdba9f3fd8a51219d0eebb61f8b2f166 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:03:45 -0400 Subject: py-setuptools: add 20.6.7 --- var/spack/repos/builtin/packages/py-setuptools/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 38158f4d27..bc3420a25e 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -5,6 +5,7 @@ class PySetuptools(Package): homepage = "https://pypi.python.org/pypi/setuptools" url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" + version('20.6.7', '45d6110f3ec14924e44c33411db64fe6') version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') version('19.2', '78353b1f80375ca5e088f4b4627ffe03') version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') -- cgit v1.2.3-70-g09d2 From f461b9972265df09e8ff9ac5c99a3f3d96783883 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Apr 2016 14:31:40 -0400 Subject: Building OpenBLAS requires recent binutils --- var/spack/repos/builtin/packages/julia/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index b3a523bc45..75d13fda8f 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -20,6 +20,7 @@ class Julia(Package): # depends_on("pkg-config") # Combined build-time and run-time dependencies: + depends_on("binutils") depends_on("cmake @2.8:") depends_on("git") depends_on("openssl") -- cgit v1.2.3-70-g09d2 From 3a4aac0213f46ff233b6252be5db7c645501ab34 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 15:08:09 -0400 Subject: paraview: use the right cmake variables --- var/spack/repos/builtin/packages/paraview/package.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index c16054816c..888add3033 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -75,13 +75,13 @@ class Paraview(Package): cmake('..', '-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix, '-DBUILD_TESTING:BOOL=OFF', - '-DVTK_USER_SYSTEM_FREETYPE:BOOL=ON', - '-DVTK_USER_SYSTEM_HDF5:BOOL=ON', - '-DVTK_USER_SYSTEM_JPEG:BOOL=ON', - '-DVTK_USER_SYSTEM_LIBXML2:BOOL=ON', - '-DVTK_USER_SYSTEM_NETCDF:BOOL=ON', - '-DVTK_USER_SYSTEM_TIFF:BOOL=ON', - '-DVTK_USER_SYSTEM_ZLIB:BOOL=ON', + '-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON', + '-DVTK_USE_SYSTEM_HDF5:BOOL=ON', + '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', + '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', + '-DVTK_USE_SYSTEM_NETCDF:BOOL=ON', + '-DVTK_USE_SYSTEM_TIFF:BOOL=ON', + '-DVTK_USE_SYSTEM_ZLIB:BOOL=ON', *feature_args) make() make('install') -- cgit v1.2.3-70-g09d2 From 6e56ba9f24df62ad205006a6b7bc13ae067a6623 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 15:08:29 -0400 Subject: paraview: use internal netcdf VTK needs to learn to cope with netcdf being split like this. --- var/spack/repos/builtin/packages/paraview/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 888add3033..13cd076286 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -33,7 +33,8 @@ class Paraview(Package): depends_on('libpng') depends_on('libtiff') depends_on('libxml2') - depends_on('netcdf') + #depends_on('netcdf') + #depends_on('netcdf-cxx') #depends_on('protobuf') # version mismatches? #depends_on('sqlite') # external version not supported depends_on('zlib') @@ -79,7 +80,7 @@ class Paraview(Package): '-DVTK_USE_SYSTEM_HDF5:BOOL=ON', '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', - '-DVTK_USE_SYSTEM_NETCDF:BOOL=ON', + '-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF', '-DVTK_USE_SYSTEM_TIFF:BOOL=ON', '-DVTK_USE_SYSTEM_ZLIB:BOOL=ON', *feature_args) -- cgit v1.2.3-70-g09d2 From 20b9f34b5c650eefb23f4118bb52985c468a9098 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 15:09:02 -0400 Subject: paraview: use internal hdf5 Spack's HDF5 is too new. Rather than forcing everything in a ParaView chain to use older HDF5, use the internal one until ParaView is patched properly. --- var/spack/repos/builtin/packages/paraview/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 13cd076286..60f8d3c243 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -27,8 +27,8 @@ class Paraview(Package): depends_on('bzip2') depends_on('freetype') - depends_on('hdf5+mpi', when='+mpi') - depends_on('hdf5~mpi', when='~mpi') + #depends_on('hdf5+mpi', when='+mpi') + #depends_on('hdf5~mpi', when='~mpi') depends_on('jpeg') depends_on('libpng') depends_on('libtiff') @@ -77,7 +77,7 @@ class Paraview(Package): '-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix, '-DBUILD_TESTING:BOOL=OFF', '-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON', - '-DVTK_USE_SYSTEM_HDF5:BOOL=ON', + '-DVTK_USE_SYSTEM_HDF5:BOOL=OFF', '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', '-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF', -- cgit v1.2.3-70-g09d2 From df7e3f8635530574c5190d9501f2fdf1b0aa0aff Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 9 Apr 2016 09:58:48 -0400 Subject: Correct version dependency for OpenBLAS patch --- var/spack/repos/builtin/packages/julia/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 75d13fda8f..25d782266b 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -11,8 +11,8 @@ class Julia(Package): version('0.4.5', '69141ff5aa6cee7c0ec8c85a34aa49a6') version('0.4.3', '8a4a59fd335b05090dd1ebefbbe5aaac') - patch('gc.patch', when='@:0.5') - patch('openblas.patch') + patch('gc.patch') + patch('openblas.patch', when='@0.4:0.4.5') # Build-time dependencies: # depends_on("awk") -- cgit v1.2.3-70-g09d2 From cb6c6fb3747aafbfb0fe81803eacf2807dde301f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 11 Apr 2016 16:28:30 -0500 Subject: Add elk package --- var/spack/repos/builtin/packages/elk/package.py | 116 +++++++++++++++++++++ var/spack/repos/builtin/packages/libxc/package.py | 18 ++++ .../repos/builtin/packages/openblas/package.py | 6 ++ 3 files changed, 140 insertions(+) create mode 100644 var/spack/repos/builtin/packages/elk/package.py create mode 100644 var/spack/repos/builtin/packages/libxc/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py new file mode 100644 index 0000000000..28ebb89db3 --- /dev/null +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -0,0 +1,116 @@ +from spack import * +import spack + +class Elk(Package): + '''An all-electron full-potential linearised augmented-plane wave + (FP-LAPW) code with many advanced features.''' + + homepage = 'http://elk.sourceforge.net/' + url = 'https://sourceforge.net/projects/elk/files/elk-3.3.17.tgz' + + version('3.3.17', 'f57f6230d14f3b3b558e5c71f62f0592') + + # Elk provides these libraries, but allows you to specify your own + variant('blas', default=True, description='Build with custom BLAS library') + variant('lapack', default=True, description='Build with custom LAPACK library') + variant('fft', default=True, description='Build with custom FFT library') + + # Elk does not provide these libraries, but allows you to use them + variant('mpi', default=True, description='Enable MPI parallelism') + variant('openmp', default=True, description='Enable OpenMP support') + variant('libxc', default=True, description='Link to Libxc functional library') + + depends_on('blas', when='+blas') + depends_on('lapack', when='+lapack') + depends_on('fftw', when='+fft') + depends_on('mpi', when='+mpi') + depends_on('libxc', when='+libxc') + + # Cannot be built in parallel + parallel = False + + + def configure(self, spec): + # Dictionary of configuration options + config = { + 'MAKE': 'make', + 'F90': join_path(spack.build_env_path, 'f90'), + 'F77': join_path(spack.build_env_path, 'f77'), + 'AR': 'ar', + 'LIB_FFT': 'fftlib.a', + 'SRC_MPI': 'mpi_stub.f90', + 'SRC_OMP': 'omp_stub.f90', + 'SRC_libxc': 'libxcifc_stub.f90', + 'SRC_FFT': 'zfftifc.f90' + } + + # Compiler-specific flags + flags = '' + if self.compiler.name == 'intel': + flags = '-O3 -ip -unroll -no-prec-div -openmp' + elif self.compiler.name == 'gcc': + flags = '-O3 -ffast-math -funroll-loops -fopenmp' + elif self.compiler.name == 'pgi': + flags = '-O3 -mp -lpthread' + elif self.compiler.name == 'g95': + flags = '-O3 -fno-second-underscore' + elif self.compiler.name == 'nag': + flags = '-O4 -kind=byte -dusty -dcfuns' + elif self.compiler.name == 'xl': + flags = '-O3 -qsmp=omp' + config['F90_OPTS'] = flags + config['F77_OPTS'] = flags + + # BLAS/LAPACK support + blas = 'blas.a' + lapack = 'lapack.a' + if '+blas' in spec: + blas = join_path(spec['blas'].prefix.lib, 'libblas.so') + if '+lapack' in spec: + lapack = join_path(spec['lapack'].prefix.lib, 'liblapack.so') + config['LIB_LPK'] = ' '.join([lapack, blas]) # lapack must come before blas + + # FFT support + if '+fft' in spec: + config['LIB_FFT'] = join_path(spec['fftw'].prefix.lib, 'libfftw3.so') + config['SRC_FFT'] = 'zfftifc_fftw.f90' + + # MPI support + if '+mpi' in spec: + config.pop('SRC_MPI') + config['F90'] = join_path(spec['mpi'].prefix.bin, 'mpif90') + config['F77'] = join_path(spec['mpi'].prefix.bin, 'mpif77') + + # OpenMP support + if '+openmp' in spec: + config.pop('SRC_OMP') + + # Libxc support + if '+libxc' in spec: + config['LIB_libxc'] = ' '.join([ + join_path(spec['libxc'].prefix.lib, 'libxcf90.so'), + join_path(spec['libxc'].prefix.lib, 'libxc.so') + ]) + config['SRC_libxc'] = ' '.join([ + 'libxc_funcs.f90', + 'libxc.f90', + 'libxcifc.f90' + ]) + + # Write configuration options to include file + with open('make.inc', 'w') as inc: + for key in config: + inc.write('{0} = {1}\n'.format(key, config[key])) + + + def install(self, spec, prefix): + self.configure(spec) + + make() + make('test') + + mkdirp(prefix.bin) + + install('src/elk', prefix.bin) + install('src/eos/eos', prefix.bin) + install('src/spacegroup/spacegroup', prefix.bin) diff --git a/var/spack/repos/builtin/packages/libxc/package.py b/var/spack/repos/builtin/packages/libxc/package.py new file mode 100644 index 0000000000..010a5918c5 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxc/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Libxc(Package): + """Libxc is a library of exchange-correlation functionals for + density-functional theory.""" + + homepage = "http://www.tddft.org/programs/octopus/wiki/index.php/Libxc" + url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz" + + version('2.2.2', 'd9f90a0d6e36df6c1312b6422280f2ec') + + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, + '--enable-shared') + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 9f13d0690b..4522130ccc 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -12,6 +12,7 @@ class Openblas(Package): version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') variant('shared', default=True, description="Build shared libraries as well as static libs.") + variant('openmp', default=True, description="Enable OpenMP support.") # virtual dependency provides('blas') @@ -37,6 +38,11 @@ class Openblas(Package): if spec.satisfies('@0.2.16'): make_defs += ['BUILD_LAPACK_DEPRECATED=1'] + # Add support for OpenMP + # Note: Make sure your compiler supports OpenMP + if '+openmp' in spec: + make_defs += ['USE_OPENMP=1'] + make_args = make_defs + make_targets make(*make_args) -- cgit v1.2.3-70-g09d2 From 01f2dd03d5fe092ae448ee1a234a197babf38613 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 12 Apr 2016 16:51:27 -0500 Subject: Also install examples directory --- var/spack/repos/builtin/packages/elk/package.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 28ebb89db3..780c41f726 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -104,13 +104,18 @@ class Elk(Package): def install(self, spec, prefix): + # Elk only provides an interactive setup script self.configure(spec) make() make('test') + # The Elk Makefile does not provide an install target mkdirp(prefix.bin) install('src/elk', prefix.bin) install('src/eos/eos', prefix.bin) install('src/spacegroup/spacegroup', prefix.bin) + + install_tree('examples', join_path(prefix, 'examples')) + -- cgit v1.2.3-70-g09d2 From 5717cb981e38979727a9340eb118e88166a9f7e3 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 13 Apr 2016 15:03:03 -0500 Subject: fortran2003 option has been removed from HDF5 --- var/spack/repos/builtin/packages/hdf5/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index f26e225b83..cce609eb29 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -101,10 +101,10 @@ class Hdf5(Package): extra_args.append('--enable-cxx') if '+fortran' in spec: - extra_args.extend([ - '--enable-fortran', - '--enable-fortran2003' - ]) + extra_args.append('--enable-fortran') + # '--enable-fortran2003' no longer exists as of version 1.10.0 + if spec.satisfies('@:1.8.16'): + extra_args.append('--enable-fortran2003') if '+mpi' in spec: # The HDF5 configure script warns if cxx and mpi are enabled -- cgit v1.2.3-70-g09d2 From 2cf9ebc62c18414ddafb44bdda2b2487f72a4ec5 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Wed, 13 Apr 2016 15:00:45 -0700 Subject: Fix compile issues with new libpng versions and qt3 builds by using an older version of libpng. In libpng, make older versions available. --- var/spack/repos/builtin/packages/libpng/package.py | 3 +++ var/spack/repos/builtin/packages/qt/package.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py index 73c8c62341..9d5782896e 100644 --- a/var/spack/repos/builtin/packages/libpng/package.py +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -8,6 +8,9 @@ class Libpng(Package): version('1.6.16', '1a4ad377919ab15b54f6cb6a3ae2622d') version('1.6.15', '829a256f3de9307731d4f52dc071916d') version('1.6.14', '2101b3de1d5f348925990f9aa8405660') + version('1.5.26', '3ca98347a5541a2dad55cd6d07ee60a9') + version('1.4.19', '89bcbc4fc8b31f4a403906cf4f662330') + version('1.2.56', '9508fc59d10a1ffadd9aae35116c19ee') depends_on('zlib') diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 8cb88e6c85..93688fb777 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -29,7 +29,8 @@ class Qt(Package): depends_on("zlib") depends_on("dbus", when='@4:') depends_on("libtiff") - depends_on("libpng") + depends_on("libpng@1.2.56", when='@3') + depends_on("libpng", when='@4:') depends_on("libmng") depends_on("jpeg") @@ -120,6 +121,8 @@ class Qt(Package): @when('@3') def configure(self): + # An user report that this was necessary to link Qt3 on ubuntu + os.environ['LD_LIBRARY_PATH'] = os.getcwd()+'/lib' configure('-prefix', self.prefix, '-v', '-thread', -- cgit v1.2.3-70-g09d2 From f9aafeee1e6a33a76dc1904e97f117194915f4d0 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Wed, 13 Apr 2016 21:58:57 -0700 Subject: Loosen the boost requirement from a specific version that was specified in my initial commit. --- var/spack/repos/builtin/packages/mrnet/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index b8cbb7e8f9..a3abb71285 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -15,13 +15,10 @@ class Mrnet(Package): variant('krellpatch', default=False, description="Build MRNet with krell openspeedshop based patch.") patch('krell-5.0.1.patch', when='@5.0.1+krellpatch') - - variant('lwthreads', default=False, description="Also build the MRNet LW threadsafe libraries") parallel = False - #depends_on("boost") - depends_on("boost@1.53.0") + depends_on("boost") def install(self, spec, prefix): # Build the MRNet LW thread safe libraries when the krelloptions variant is present -- cgit v1.2.3-70-g09d2 From 01fab24c156e82f2886b464a2474fe3474d5312a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 13 Apr 2016 14:02:25 +0200 Subject: binutils depends on flex, bison, and m4 --- var/spack/repos/builtin/packages/binutils/package.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 897539a439..b8064093d2 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -12,6 +12,10 @@ class Binutils(Package): version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e') version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764') + depends_on('m4') + depends_on('flex') + depends_on('bison') + # 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.") variant('gold', default=True, description="build the gold linker") -- cgit v1.2.3-70-g09d2 From cf1914fc00bd98a1885edc4d4190f9c424b0588b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 14 Apr 2016 10:18:06 -0500 Subject: Also install species directory --- var/spack/repos/builtin/packages/elk/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 780c41f726..1d9216fd1a 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -118,4 +118,5 @@ class Elk(Package): install('src/spacegroup/spacegroup', prefix.bin) install_tree('examples', join_path(prefix, 'examples')) + install_tree('species', join_path(prefix, 'species')) -- cgit v1.2.3-70-g09d2 From e03e87b79186c21c3db084056363bea4db8dba04 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 15 Apr 2016 15:57:54 -0400 Subject: 1. Added variants to choose language interfaces. 2. Now produces relocatable code (+fpic) by default --- .../repos/builtin/packages/parallel-netcdf/package.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index e6f8cf026b..1bbd24781e 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -11,11 +11,25 @@ class ParallelNetcdf(Package): version('1.7.0', '267eab7b6f9dc78c4d0e6def2def3aea4bc7c9f0') version('1.6.1', '62a094eb952f9d1e15f07d56e535052604f1ac34') + variant('cxx', default=True, description='Build the C++ Interface') + variant('fortran', default=True, description='Build the Fortran Interface') + variant('fpic', default=True, description='Produce position-independent code (for use with shared libraries)') + depends_on("m4") depends_on("mpi") + # See: https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-mpi=%s" % spec['mpi'].prefix) + args = list() + if '+fpic' in spec: + args.extend(['CFLAGS=-fPIC', 'CXXFLAGS=-fPIC', 'FFLAGS=-fPIC']) + if '~cxx' in spec: + args.append('--disable-cxx') + if '~fortran' in spec: + args.append('--disable-fortran') + + args.extend(["--prefix=%s" % prefix, + "--with-mpi=%s" % spec['mpi'].prefix]) + configure(*args) make() make("install") -- cgit v1.2.3-70-g09d2 From a25e33d96ecbd3db690cd8f0bc5119f506310dab Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Apr 2016 00:50:15 -0400 Subject: Create lib directory --- var/spack/repos/builtin/packages/cereal/package.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cereal/package.py b/var/spack/repos/builtin/packages/cereal/package.py index a83927456f..6acbf666c8 100644 --- a/var/spack/repos/builtin/packages/cereal/package.py +++ b/var/spack/repos/builtin/packages/cereal/package.py @@ -1,4 +1,5 @@ from spack import * +import os import shutil class Cereal(Package): @@ -30,5 +31,8 @@ class Cereal(Package): # Install shutil.rmtree(join_path(prefix, 'doc'), ignore_errors=True) shutil.rmtree(join_path(prefix, 'include'), ignore_errors=True) + shutil.rmtree(join_path(prefix, 'lib'), ignore_errors=True) shutil.copytree('doc', join_path(prefix, 'doc'), symlinks=True) shutil.copytree('include', join_path(prefix, 'include'), symlinks=True) + # Create empty directory to avoid linker warnings later + os.mkdir(join_path(prefix, 'lib')) -- cgit v1.2.3-70-g09d2 From 523be30974c4630450e779a9814d685716dd312e Mon Sep 17 00:00:00 2001 From: Kelly Thompson Date: Sat, 16 Apr 2016 23:11:19 -0600 Subject: + Add CMake version 3.5.2. (#787) --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 91a4e3b415..2493cf0a13 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -30,6 +30,7 @@ class Cmake(Package): homepage = 'https://www.cmake.org' url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz' + version('3.5.2', '701386a1b5ec95f8d1075ecf96383e02') version('3.5.1', 'ca051f4a66375c89d1a524e726da0296') version('3.5.0', '33c5d09d4c33d4ffcc63578a6ba8777e') version('3.4.3', '4cb3ff35b2472aae70f542116d616e63') -- cgit v1.2.3-70-g09d2 From fb4f361cd0a8f12c606013b382d7e4fa5706dbfb Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Apr 2016 01:12:52 -0400 Subject: Update to version 4.1.0 (#785) --- var/spack/repos/builtin/packages/jemalloc/package.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/jemalloc/package.py b/var/spack/repos/builtin/packages/jemalloc/package.py index 8cec9ea75b..9cb0fd1f40 100644 --- a/var/spack/repos/builtin/packages/jemalloc/package.py +++ b/var/spack/repos/builtin/packages/jemalloc/package.py @@ -5,6 +5,7 @@ class Jemalloc(Package): homepage = "http://www.canonware.com/jemalloc/" url = "https://github.com/jemalloc/jemalloc/releases/download/4.0.4/jemalloc-4.0.4.tar.bz2" + version('4.1.0', 'c4e53c947905a533d5899e5cc3da1f94') version('4.0.4', '687c5cc53b9a7ab711ccd680351ff988') variant('stats', default=False, description='Enable heap statistics') @@ -20,5 +21,8 @@ class Jemalloc(Package): configure(*configure_args) + # Don't use -Werror + filter_file(r'-Werror=\S*', '', 'Makefile') + make() make("install") -- cgit v1.2.3-70-g09d2 From 375de085e271f2926ef2381a2e22f40bd5541177 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Apr 2016 01:14:34 -0400 Subject: Make PAPI build on Darwin (#772) * Make PAPI build on Darwin - don't use - run install_name_tool * Use fix_darwin_install_name --- var/spack/repos/builtin/packages/papi/package.py | 31 +++++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index 53d69e28d9..74b3ea9ef9 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -1,5 +1,8 @@ from spack import * +import glob import os +import sys +from llnl.util.filesystem import fix_darwin_install_name class Papi(Package): """PAPI provides the tool designer and application engineer with a @@ -18,17 +21,27 @@ class Papi(Package): version('5.3.0', '367961dd0ab426e5ae367c2713924ffb') def install(self, spec, prefix): - os.chdir("src/") + with working_dir("src"): - configure_args=["--prefix=%s" % prefix] + configure_args=["--prefix=%s" % prefix] - # PAPI uses MPI if MPI is present; since we don't require an - # MPI package, we ensure that all attempts to use MPI fail, so - # that PAPI does not get confused - configure_args.append('MPICC=:') + # PAPI uses MPI if MPI is present; since we don't require + # an MPI package, we ensure that all attempts to use MPI + # fail, so that PAPI does not get confused + configure_args.append('MPICC=:') - configure(*configure_args) + configure(*configure_args) - make() - make("install") + # Don't use + for level in [".", "*", "*/*"]: + files = glob.iglob(join_path(level, "*.[ch]")) + filter_file(r"\", "", *files) + make() + make("install") + + # The shared library is not installed correctly on Darwin + if sys.platform == 'darwin': + os.rename(join_path(prefix.lib, 'libpapi.so'), + join_path(prefix.lib, 'libpapi.dylib')) + fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-70-g09d2 From 63bade7a0c7350681dd29ce877f2a9fad679d67d Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 17 Apr 2016 01:15:07 -0400 Subject: metis: fix OS X install (#764) Without this, the binaries use relative paths for loading which causes them to not be found when running binaries. Not sure why the existing hack wasn't working, but this fixes it the proper way. --- var/spack/repos/builtin/packages/metis/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 41e3ebb429..b05f23a3dc 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -136,6 +136,7 @@ class Metis(Package): source_directory = self.stage.source_path options.append('-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=source_directory)) + options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) if '+shared' in spec: options.append('-DSHARED:BOOL=ON') @@ -184,7 +185,3 @@ class Metis(Package): fs = glob.glob(join_path(source_directory,'GKlib',"*.h")) for f in fs: install(f, GKlib_dist) - - # The shared library is not installed correctly on Darwin; correct this - if (sys.platform == 'darwin') and ('+shared' in spec): - fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-70-g09d2 From dd84a575807636159d80809f59962cf799b83fd7 Mon Sep 17 00:00:00 2001 From: Kelly Thompson Date: Sat, 16 Apr 2016 23:15:48 -0600 Subject: + On some systems, Dia also requires intltool. (#768) --- var/spack/repos/builtin/packages/dia/package.py | 1 + var/spack/repos/builtin/packages/intltool/package.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/intltool/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py index 1cb5910e46..25d5f08205 100644 --- a/var/spack/repos/builtin/packages/dia/package.py +++ b/var/spack/repos/builtin/packages/dia/package.py @@ -7,6 +7,7 @@ class Dia(Package): version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c') + depends_on('intltool') depends_on('gtkplus@2.6.0:') depends_on('cairo') #depends_on('libart') # optional dependency, not yet supported by spack. diff --git a/var/spack/repos/builtin/packages/intltool/package.py b/var/spack/repos/builtin/packages/intltool/package.py new file mode 100644 index 0000000000..9b3c095378 --- /dev/null +++ b/var/spack/repos/builtin/packages/intltool/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Intltool(Package): + """intltool is a set of tools to centralize translation of many different file formats using GNU gettext-compatible PO files.""" + homepage = 'https://freedesktop.org/wiki/Software/intltool/' + + version('0.51.0', '12e517cac2b57a0121cda351570f1e63') + + def url_for_version(self, version): + """Handle version-based custom URLs.""" + return 'https://launchpad.net/intltool/trunk/%s/+download/intltool-%s.tar.gz' % (version, version) + + def install(self, spec, prefix): + + # configure, build, install: + options = ['--prefix=%s' % prefix ] + configure(*options) + make() + make('install') -- cgit v1.2.3-70-g09d2 From 44321c5c2487c62e58f543455569804c95081cfa Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Mon, 18 Apr 2016 16:46:15 -0700 Subject: Update the main Krell Institute and Argo Navis Tech. packages for MPI variant support, get source from github not sourceforge, tested external package usage, and general package clean-up --- .../builtin/packages/cbtf-argonavis/package.py | 90 +++++-- .../repos/builtin/packages/cbtf-krell/package.py | 262 ++++++++++++++---- .../repos/builtin/packages/cbtf-lanl/package.py | 65 +++-- var/spack/repos/builtin/packages/cbtf/package.py | 88 ++++-- .../builtin/packages/openspeedshop/package.py | 300 ++++++++++++++++----- 5 files changed, 631 insertions(+), 174 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py index 7b07933911..90789a98f2 100644 --- a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py +++ b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# Copyright (c) 2015-2016 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 @@ -24,43 +24,83 @@ class CbtfArgonavis(Package): homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" # Mirror access template example - #url = "file:/g/g24/jeg/cbtf-argonavis-1.5.tar.gz" - #version('1.5', '1f7f6512f55409ed2135cfceabe26b82') + #url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/cbtf-argonavis-1.6.tar.gz" + #version('1.6', '0fafa0008478405c2c2319450f174ed4') - version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-argonavis/cbtf-argonavis') + version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf-argonavis.git') - depends_on("cmake@3.0.2:") + depends_on("cmake@3.0.2") + depends_on("boost@1.50.0:") depends_on("papi") + depends_on("mrnet@5.0.1:+lwthreads+krellpatch") depends_on("cbtf") depends_on("cbtf-krell") - depends_on("cuda") + depends_on("cuda@6.0.37") + #depends_on("cuda") parallel = False + def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): + # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + + compile_flags="-O2 -g" + BuildTypeOptions = [] + + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + for word in cmakeOptions[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_CXX_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_C_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'): + cmakeOptions.remove(word) + BuildTypeOptions.extend([ + '-DCMAKE_VERBOSE_MAKEFILE=ON', + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags + ]) + + cmakeOptions.extend(BuildTypeOptions) + + 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/cudatoolkit-6.0" - cupti_prefix_path = "/usr/local/cudatoolkit-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, - '-DCUDA_DIR=%s' % cuda_prefix_path, - '-DPAPI_ROOT=%s' % spec['papi'].prefix, - '-DCBTF_PREFIX=%s' % spec['cbtf'].prefix, - *std_cmake_args) - make("clean") - make() - make("install") + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DCUDA_DIR=%s' % spec['cuda'].prefix, + '-DCUDA_INSTALL_PATH=%s' % spec['cuda'].prefix, + '-DCUDA_TOOLKIT_ROOT_DIR=%s' % spec['cuda'].prefix, + '-DCUPTI_DIR=%s' % join_path(spec['cuda'].prefix + '/extras/CUPTI'), + '-DCUPTI_ROOT=%s' % join_path(spec['cuda'].prefix + '/extras/CUPTI'), + '-DPAPI_ROOT=%s' % spec['papi'].prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DBoost_DIR=%s' % spec['boost'].prefix, + '-DBOOST_LIBRARYDIR=%s' % spec['boost'].prefix.lib, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DBoost_NO_SYSTEM_PATHS=ON' + ]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) + + make("clean") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cbtf-krell/package.py b/var/spack/repos/builtin/packages/cbtf-krell/package.py index 9458ac113c..e6050cb4a9 100644 --- a/var/spack/repos/builtin/packages/cbtf-krell/package.py +++ b/var/spack/repos/builtin/packages/cbtf-krell/package.py @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# Copyright (c) 2015-2016 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 @@ -26,21 +26,30 @@ class CbtfKrell(Package): homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" # optional mirror access template - #url = "file:/g/g24/jeg/cbtf-krell-1.5.tar.gz" - #version('1.5', 'b13f6df6a93c44149d977773dd776d2f') + #url = "file:/home/jeg/cbtf-krell-1.6.tar.gz" + #version('1.6', 'edeb61cd488f16e7b124f77db9ce762d') - version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-krell/cbtf-krell') + version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf-krell.git') + # MPI variants + variant('openmpi', default=False, description="Build mpi experiment collector for openmpi MPI when this variant is enabled.") + variant('mpt', default=False, description="Build mpi experiment collector for SGI MPT MPI when this variant is enabled.") + variant('mvapich2', default=False, description="Build mpi experiment collector for mvapich2 MPI when this variant is enabled.") + variant('mvapich', default=False, description="Build mpi experiment collector for mvapich MPI when this variant is enabled.") + variant('mpich2', default=False, description="Build mpi experiment collector for mpich2 MPI when this variant is enabled.") + variant('mpich', default=False, description="Build mpi experiment collector for mpich MPI when this variant is enabled.") # Dependencies for cbtf-krell + depends_on("cmake@3.0.2") # For binutils service depends_on("binutils@2.24+krellpatch") # collectionTool - depends_on("boost@1.50.0") - depends_on("dyninst@8.2.1") - depends_on("mrnet@4.1.0:+lwthreads") + depends_on("boost@1.50.0:") + depends_on("dyninst@8.2.1:") + depends_on("mrnet@5.0.1:+lwthreads+krellpatch") + depends_on("xerces-c@3.1.1:") depends_on("cbtf") @@ -51,66 +60,207 @@ class CbtfKrell(Package): # 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") + depends_on("openmpi", when='+openmpi') + depends_on("mpich", when='+mpich') + depends_on("mpich2", when='+mpich2') + depends_on("mvapich2", when='+mvapich2') + depends_on("mvapich", when='+mvapich') + depends_on("mpt", when='+mpt') parallel = False + def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): + # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + + compile_flags="-O2 -g" + BuildTypeOptions = [] + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + for word in cmakeOptions[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_CXX_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_C_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'): + cmakeOptions.remove(word) + BuildTypeOptions.extend([ + '-DCMAKE_VERBOSE_MAKEFILE=ON', + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags + ]) + + cmakeOptions.extend(BuildTypeOptions) + + + + def set_mpi_cmakeOptions(self, spec, cmakeOptions): + # Appends to cmakeOptions the options that will enable the appropriate MPI implementations + + MPIOptions = [] + + # openmpi + if '+openmpi' in spec: + MPIOptions.extend([ + '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix + ]) + # mpich + if '+mpich' in spec: + MPIOptions.extend([ + '-DMPICH_DIR=%s' % spec['mpich'].prefix + ]) + # mpich2 + if '+mpich2' in spec: + MPIOptions.extend([ + '-DMPICH2_DIR=%s' % spec['mpich2'].prefix + ]) + # mvapich + if '+mvapich' in spec: + MPIOptions.extend([ + '-DMVAPICH_DIR=%s' % spec['mvapich'].prefix + ]) + # mvapich2 + if '+mvapich2' in spec: + MPIOptions.extend([ + '-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix + ]) + # mpt + if '+mpt' in spec: + MPIOptions.extend([ + '-DMPT_DIR=%s' % spec['mpt'].prefix + ]) + + cmakeOptions.extend(MPIOptions) + 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" - #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 = "" - # 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, - #'-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, + #cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['dyninst'].prefix) + #'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path # 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, - *std_cmake_args) + cmakeOptions = [] + cmakeOptions.extend(['-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 + ]) + + + # Add any MPI implementations coming from variant settings + self.set_mpi_cmakeOptions(spec, cmakeOptions) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) make("clean") make() make("install") + + + #if '+cray' in spec: + #if 'cray' in self.spec.architecture: + # if '+runtime' in spec: + # with working_dir('build_cbtf_cray_runtime', create=True): + # python_vers='%d.%d' % spec['python'].version[:2] + # cmake .. \ + # -DCMAKE_BUILD_TYPE=Debug \ + # -DTARGET_OS="cray" \ + # -DRUNTIME_ONLY="true" \ + # -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \ + # -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \ + # -DCBTF_DIR=${CBTF_ROOT} \ + # -DBOOST_ROOT=${BOOST_INSTALL_PREFIX} \ + # -DXERCESC_DIR=${XERCESC_INSTALL_PREFIX} \ + # -DBINUTILS_DIR=${KRELL_ROOT} \ + # -DLIBMONITOR_DIR=${KRELL_ROOT_COMPUTE} \ + # -DLIBUNWIND_DIR=${KRELL_ROOT_COMPUTE} \ + # -DPAPI_DIR=${PAPI_ROOT} \ + # -DDYNINST_DIR=${DYNINST_CN_ROOT} \ + # -DMRNET_DIR=${MRNET_INSTALL_PREFIX} \ + # -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48 + # else: + # with working_dir('build_cbtf_cray_frontend', create=True): + # python_vers='%d.%d' % spec['python'].version[:2] + # cmake .. \ + # -DCMAKE_BUILD_TYPE=Debug \ + # -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \ + # -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \ + # -DCBTF_DIR=${CBTF_ROOT} \ + # -DRUNTIME_TARGET_OS="cray" \ + # -DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_RUNTIME_ROOT} \ + # -DCBTF_CN_RUNTIME_DIR=${CBTF_CN_RUNTIME_ROOT} \ + # -DLIBMONITOR_CN_RUNTIME_DIR=${LIBMONITOR_CN_ROOT} \ + # -DLIBUNWIND_CN_RUNTIME_DIR=${LIBUNWIND_CN_ROOT} \ + # -DPAPI_CN_RUNTIME_DIR=${PAPI_CN_ROOT} \ + # -DXERCESC_CN_RUNTIME_DIR=/${XERCESC_CN_ROOT} \ + # -DMRNET_CN_RUNTIME_DIR=${MRNET_CN_ROOT} \ + # -DBOOST_CN_RUNTIME_DIR=${BOOST_CN_ROOT} \ + # -DDYNINST_CN_RUNTIME_DIR=${DYNINST_CN_ROOT} \ + # -DBOOST_ROOT=/${KRELL_ROOT} \ + # -DXERCESC_DIR=/${KRELL_ROOT} \ + # -DBINUTILS_DIR=/${KRELL_ROOT} \ + # -DLIBMONITOR_DIR=${KRELL_ROOT} \ + # -DLIBUNWIND_DIR=${KRELL_ROOT} \ + # -DPAPI_DIR=${PAPI_ROOT} \ + # -DDYNINST_DIR=${KRELL_ROOT} \ + # -DMRNET_DIR=${KRELL_ROOT} \ + # -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48 + # fi +# +# make("clean") +# make() +# make("install") +# +# elif '+mic' in spec: +# if '+runtime' in spec: +# with working_dir('build_cbtf_mic_runtime', create=True): +# python_vers='%d.%d' % spec['python'].version[:2] +# cmake .. \ +# +# else: +# with working_dir('build_cbtf_cray_frontend', create=True): +# python_vers='%d.%d' % spec['python'].version[:2] +# cmake .. \ +# fi +# +# else: +# # 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, +# '-DOPENMPI_DIR=%s' % openmpi_prefix_path, +# '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, +# *std_cmake_args) +# +# make("clean") +# make() +# make("install") +# +# fi +# diff --git a/var/spack/repos/builtin/packages/cbtf-lanl/package.py b/var/spack/repos/builtin/packages/cbtf-lanl/package.py index 2da9e8a1f7..5ca88601f3 100644 --- a/var/spack/repos/builtin/packages/cbtf-lanl/package.py +++ b/var/spack/repos/builtin/packages/cbtf-lanl/package.py @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# Copyright (c) 2015-2016 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 @@ -29,32 +29,65 @@ class CbtfLanl(Package): version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl') - + depends_on("cmake@3.0.2") # Dependencies for cbtf-krell - depends_on("boost@1.50") - depends_on("mrnet@4.1.0:+lwthreads") + depends_on("mrnet@5.0.1:+lwthreads+krellpatch") depends_on("xerces-c@3.1.1:") depends_on("cbtf") depends_on("cbtf-krell") parallel = False + def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): + # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + + compile_flags="-O2 -g" + BuildTypeOptions = [] + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + for word in cmakeOptions[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_CXX_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_C_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'): + cmakeOptions.remove(word) + BuildTypeOptions.extend([ + '-DCMAKE_VERBOSE_MAKEFILE=ON', + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags + ]) + + cmakeOptions.extend(BuildTypeOptions) + 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") + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-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') + ]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) + + make("clean") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cbtf/package.py b/var/spack/repos/builtin/packages/cbtf/package.py index 52e6a07020..7ce1cd382b 100644 --- a/var/spack/repos/builtin/packages/cbtf/package.py +++ b/var/spack/repos/builtin/packages/cbtf/package.py @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# Copyright (c) 2015-2016 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 @@ -25,21 +25,44 @@ class Cbtf(Package): homepage = "http://sourceforge.net/p/cbtf/wiki/Home" # Mirror access template example - #url = "file:/g/g24/jeg/cbtf-1.5.tar.gz" - #version('1.6', '1ca88a8834759c4c74452cb97fe7b70a') + #url = "file:/home/jeg/cbtf-1.6.tar.gz" + #version('1.6', 'c1ef4e5aa4e470dffb042abdba0b9987') # Use when the git repository is available - version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf/cbtf') + version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf.git') - depends_on("cmake") - #depends_on("boost@1.42.0:") - depends_on("boost@1.50.0") - depends_on("mrnet@4.1.0+lwthreads") + variant('runtime', default=False, description="build only the runtime libraries and collectors.") + + depends_on("cmake@3.0.2") + depends_on("boost@1.50.0:") + depends_on("mrnet@5.0.1:+lwthreads+krellpatch") depends_on("xerces-c@3.1.1:") - depends_on("libxml2") + # Work around for spack libxml2 package bug, take off python when fixed + depends_on("libxml2+python") parallel = False + def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): + # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + + compile_flags="-O2 -g" + BuildTypeOptions = [] + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + for word in cmakeOptions[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_CXX_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_C_FLAGS'): + cmakeOptions.remove(word) + BuildTypeOptions.extend([ + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags + ]) + + cmakeOptions.extend(BuildTypeOptions) + def install(self, spec, prefix): with working_dir('build', create=True): @@ -48,14 +71,45 @@ class Cbtf(Package): # 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) + if '+runtime' in spec: + # Install message tag include file for use in Intel MIC cbtf-krell build + # FIXME + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-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') + ]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) + + else: + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-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') + ]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) make("clean") make() diff --git a/var/spack/repos/builtin/packages/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py index 8c71bcb7c3..bcd77351aa 100644 --- a/var/spack/repos/builtin/packages/openspeedshop/package.py +++ b/var/spack/repos/builtin/packages/openspeedshop/package.py @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# Copyright (c) 2015-2016 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 @@ -28,20 +28,15 @@ 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.2/openspeedshop-2.2.tar.gz/download" + url = "https://github.com/OpenSpeedShop" version('2.2', '16cb051179c2038de4e8a845edf1d573') + # Use when the git repository is available + version('2.2', branch='master', git='https://github.com/OpenSpeedShop/openspeedshop.git') - #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" - #version('2.1', '64ee17166519838c7b94a1adc138e94f') - - + # Optional mirror template + #url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.2.tar.gz" + #version('2.2', '643337740dc6c2faca60f42d3620b0e1') parallel = False @@ -51,11 +46,17 @@ class Openspeedshop(Package): 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.") + # MPI variants + variant('openmpi', default=False, description="Build mpi experiment collector for openmpi MPI when this variant is enabled.") + variant('mpt', default=False, description="Build mpi experiment collector for SGI MPT MPI when this variant is enabled.") + variant('mvapich2', default=False, description="Build mpi experiment collector for mvapich2 MPI when this variant is enabled.") + variant('mvapich', default=False, description="Build mpi experiment collector for mvapich MPI when this variant is enabled.") + variant('mpich2', default=False, description="Build mpi experiment collector for mpich2 MPI when this variant is enabled.") + variant('mpich', default=False, description="Build mpi experiment collector for mpich MPI when this variant is enabled.") + + depends_on("cmake@3.0.2") # Dependencies for openspeedshop that are common to all the variants of the OpenSpeedShop build depends_on("bison") depends_on("flex") @@ -63,8 +64,8 @@ class Openspeedshop(Package): depends_on("libelf") depends_on("libdwarf") depends_on("sqlite") - depends_on("boost@1.50.0") - depends_on("dyninst@8.2.1") + depends_on("boost@1.50.0:") + depends_on("dyninst@9.1.0") depends_on("python") depends_on("qt@3.3.8b+krellpatch") @@ -72,15 +73,78 @@ class Openspeedshop(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') + depends_on("openmpi", when='+offline+openmpi') + depends_on("mpich", when='+offline+mpich') + depends_on("mpich2", when='+offline+mpich2') + depends_on("mvapich2", when='+offline+mvapich2') + depends_on("mvapich", when='+offline+mvapich') + depends_on("mpt", when='+offline+mpt') # 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:+lwthreads", when='+cbtf') + depends_on("cbtf-argonavis", when='+cbtf+cuda') + depends_on("mrnet@5.0.1:+lwthreads+krellpatch", when='+cbtf') + + def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): + # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + + compile_flags="-O2 -g" + BuildTypeOptions = [] + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + for word in cmakeOptions[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_CXX_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_C_FLAGS'): + cmakeOptions.remove(word) + BuildTypeOptions.extend([ + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags + ]) + + cmakeOptions.extend(BuildTypeOptions) + + def set_mpi_cmakeOptions(self, spec, cmakeOptions): + # Appends to cmakeOptions the options that will enable the appropriate MPI implementations + + MPIOptions = [] + + # openmpi + if '+openmpi' in spec: + MPIOptions.extend([ + '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix + ]) + # mpich + if '+mpich' in spec: + MPIOptions.extend([ + '-DMPICH_DIR=%s' % spec['mpich'].prefix + ]) + # mpich2 + if '+mpich2' in spec: + MPIOptions.extend([ + '-DMPICH2_DIR=%s' % spec['mpich2'].prefix + ]) + # mvapich + if '+mvapich' in spec: + MPIOptions.extend([ + '-DMVAPICH_DIR=%s' % spec['mvapich'].prefix + ]) + # mvapich2 + if '+mvapich2' in spec: + MPIOptions.extend([ + '-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix + ]) + # mpt + if '+mpt' in spec: + MPIOptions.extend([ + '-DMPT_DIR=%s' % spec['mpt'].prefix + ]) + + cmakeOptions.extend(MPIOptions) + def install(self, spec, prefix): @@ -100,51 +164,118 @@ class Openspeedshop(Package): 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, - *std_cmake_args) + + cmakeOptions = [] + cmakeOptions.extend(['-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 + ]) + + # Add any MPI implementations coming from variant settings + self.set_mpi_cmakeOptions(spec, cmakeOptions) + cmakeOptions.extend(std_cmake_args) + + # Adjust the build options to the favored ones for this build + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + cmake('..', *cmakeOptions) + make("clean") make() make("install") else: 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, + #'-DMPICH_DIR=%s' % spec['mpich'].prefix, + #'-DMPICH2_DIR=%s' % spec['mpich2'].prefix, + #'-DBoost_NO_SYSTEM_PATHS=TRUE', + #'-DBOOST_ROOT=%s' % spec['boost'].prefix, + #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, + python_vers='%d.%d' % spec['python'].version[:2] - 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_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, - *std_cmake_args) + + cmakeOptions = [] + cmakeOptions.extend(['-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_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 + ]) + + # Add any MPI implementations coming from variant settings + self.set_mpi_cmakeOptions(spec, cmakeOptions) + cmakeOptions.extend(std_cmake_args) + + # Adjust the build options to the favored ones for this build + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + cmake('..', *cmakeOptions) + make("clean") make() make("install") elif '+cbtf' in spec: instrumentor_setting = "cbtf" + resolve_symbols = "symtabapi" cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) + ':' + join_path(spec['dyninst'].prefix) + #runtime_platform_cray = "cray" + #if '+cray' in spec: + # if '+runtime' in spec: + # #-DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_INSTALL_DIR} \ + # with working_dir('build_cbtf_cray_runtime', create=True): + # python_vers='%d.%d' % spec['python'].version[:2] + # cmake('..', + # '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + # '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + # '-DRUNTIME_PLATFORM=%s' % runtime_platform_cray, + # '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + # '-DRESOLVE_SYMBOLS=%s' % resolve_symbols, + # '-DINSTRUMENTOR=%s' % instrumentor_setting, + # '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + # '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + # '-DCBTF_KRELL_CN_RUNTIME_DIR=%s' % spec['cbtf-krell'].prefix, + # '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + # '-DLIBELF_DIR=%s' % spec['libelf'].prefix, + # '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, + # '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + # '-DPAPI_DIR=%s' % spec['papi'].prefix, + # '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + # '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + # '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + # '-DBoost_NO_SYSTEM_PATHS=TRUE', + # '-DBOOST_ROOT=%s' % spec['boost'].prefix, + # *std_cmake_args) + + # make("clean") + # make() + # make("install") + + + #elif '+mic' in spec: + # comment out else and shift over the default case below until arch detection is in + #else: + if '+runtime' in spec: with working_dir('build_cbtf_runtime', create=True): python_vers='%d.%d' % spec['python'].version[:2] @@ -203,14 +334,63 @@ class Openspeedshop(Package): # 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 + #if '+cbtf' in spec: + # if cray build type detected: + # if '+runtime' in spec: + # with working_dir('build_cray_cbtf_compute', create=True): + # tbd + # else: + # with working_dir('build_cray_cbtf_frontend', create=True): + # tbd + # with working_dir('build_cray_osscbtf_frontend', create=True): + # tbd + # fi + # elif '+intelmic' in spec: + # if '+runtime' in spec: + # with working_dir('build_intelmic_cbtf_compute', create=True): + # tbd + # else: + # with working_dir('build_intelmic_cbtf_frontend', create=True): + # tbd + # with working_dir('build_intelmic_osscbtf_frontend', create=True): + # fi + # else + # with working_dir('build_cluster_cbtf', create=True): + # tbd + # with working_dir('build_cluster osscbtf', create=True): + # tbd + # fi + #elif '+offline' in spec: + # if cray build type detected: + # if '+runtime' in spec: + # with working_dir('build_cray_ossoff_compute', create=True): + # tbd + # else: + # with working_dir('build_cray_ossoff_frontend', create=True): + # tbd + # fi + # elif '+intelmic' in spec: + # if '+runtime' in spec: + # with working_dir('build_intelmic_ossoff_compute', create=True): + # tbd + # else: + # with working_dir('build_intelmic_ossoff_frontend', create=True): + # tbd + # fi + # elif bgq build type detected: + # if '+runtime' in spec: + # with working_dir('build_bgq_ossoff_compute', create=True): + # tbd + # else: + # with working_dir('build_bgq_ossoff_frontend', create=True): + # tbd + # fi + # else + # with working_dir('build_cluster ossoff', create=True): + # tbd + # fi + #fi + + + -- cgit v1.2.3-70-g09d2 From 1acb2a1a09a25a042e30426a70bf96bdb8c489fa Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 19 Apr 2016 16:45:05 -0400 Subject: Add some qthreads patches --- var/spack/repos/builtin/packages/qthreads/ldflags.patch | 11 +++++++++++ var/spack/repos/builtin/packages/qthreads/package.py | 7 ++++++- var/spack/repos/builtin/packages/qthreads/restrict.patch | 12 ++++++++++++ var/spack/repos/builtin/packages/qthreads/trap.patch | 11 +++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/qthreads/ldflags.patch create mode 100644 var/spack/repos/builtin/packages/qthreads/restrict.patch create mode 100644 var/spack/repos/builtin/packages/qthreads/trap.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/qthreads/ldflags.patch b/var/spack/repos/builtin/packages/qthreads/ldflags.patch new file mode 100644 index 0000000000..0c15eab386 --- /dev/null +++ b/var/spack/repos/builtin/packages/qthreads/ldflags.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -40456,7 +40456,7 @@ + hwloc_saved_LDFLAGS="$LDFLAGS" + if test "x$with_hwloc" != x; then + CPPFLAGS="-I$with_hwloc/include $CPPFLAGS" +- LDFLAGS="-L$with_hwloc/lib $CPPFLAGS" ++ LDFLAGS="-L$with_hwloc/lib $LDFLAGS" + fi + + diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py index dacdb71524..5da9340927 100644 --- a/var/spack/repos/builtin/packages/qthreads/package.py +++ b/var/spack/repos/builtin/packages/qthreads/package.py @@ -16,7 +16,12 @@ class Qthreads(Package): version('1.10', '5af8c8bbe88c2a6d45361643780d1671') + patch("ldflags.patch") + patch("restrict.patch") + patch("trap.patch") + def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + configure("--prefix=%s" % prefix, + "--enable-guard-pages") make() make("install") diff --git a/var/spack/repos/builtin/packages/qthreads/restrict.patch b/var/spack/repos/builtin/packages/qthreads/restrict.patch new file mode 100644 index 0000000000..4c95714f6b --- /dev/null +++ b/var/spack/repos/builtin/packages/qthreads/restrict.patch @@ -0,0 +1,12 @@ +--- a/include/qthread/common.h.in ++++ b/include/qthread/common.h.in +@@ -84,7 +84,9 @@ + /* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ ++#ifndef restrict + #undef restrict ++#endif + /* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the diff --git a/var/spack/repos/builtin/packages/qthreads/trap.patch b/var/spack/repos/builtin/packages/qthreads/trap.patch new file mode 100644 index 0000000000..7aa94d82d5 --- /dev/null +++ b/var/spack/repos/builtin/packages/qthreads/trap.patch @@ -0,0 +1,11 @@ +--- a/include/qthread/qthread.hpp ++++ b/include/qthread/qthread.hpp +@@ -236,7 +236,7 @@ + return qthread_incr64((uint64_t *)operand, incr); + + default: +- *(int *)(0) = 0; ++ __builtin_trap(); + } + return T(0); // never hit - keep compiler happy + } -- cgit v1.2.3-70-g09d2 From 7c155f74567a9e3d949369260e732daf13310269 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 20 Apr 2016 16:33:59 -0400 Subject: Check the installed HDF5 library for consistency --- var/spack/repos/builtin/packages/hdf5/package.py | 63 ++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index cce609eb29..eb58eeb637 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -24,6 +24,8 @@ ############################################################################## from spack import * +import shutil +import subprocess class Hdf5(Package): @@ -114,14 +116,16 @@ class Hdf5(Package): # this is not actually a problem. extra_args.extend([ "--enable-parallel", - "CC=%s" % spec['mpi'].prefix.bin + "/mpicc", + "CC=%s" % join_path(spec['mpi'].prefix.bin, "mpicc"), ]) if '+cxx' in spec: - extra_args.append("CXX=%s" % spec['mpi'].prefix.bin + "/mpic++") + extra_args.append("CXX=%s" % join_path(spec['mpi'].prefix.bin, + "mpic++")) if '+fortran' in spec: - extra_args.append("FC=%s" % spec['mpi'].prefix.bin + "/mpifort") + extra_args.append("FC=%s" % join_path(spec['mpi'].prefix.bin, + "mpifort")) if '+szip' in spec: extra_args.append("--with-szlib=%s" % spec['szip'].prefix) @@ -138,6 +142,59 @@ class Hdf5(Package): *extra_args) make() make("install") + self.check_install(spec) + + def check_install(self, spec): + "Build and run a small program to test the installed HDF5 library" + print "Checking HDF5 installation..." + checkdir = "spack-check" + with working_dir(checkdir, create=True): + source = r""" +#include +#include +#include +int main(int argc, char **argv) { + unsigned majnum, minnum, relnum; + herr_t herr = H5get_libversion(&majnum, &minnum, &relnum); + assert(!herr); + printf("HDF5 version %d.%d.%d %u.%u.%u\n", H5_VERS_MAJOR, H5_VERS_MINOR, + H5_VERS_RELEASE, majnum, minnum, relnum); + return 0; +} +""" + expected = """\ +HDF5 version {version} {version} +""".format(version=str(spec.version)) + with open("check.c", 'w') as f: + f.write(source) + if '+mpi' in spec: + cc = which(join_path(spec['mpi'].prefix.bin, "mpicc")) + else: + cc = which('cc') + # TODO: Automate these path settings + cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") + cc('-o', "check", "check.o", + # I couldn't make libraries work on Darwin + "-L%s" % join_path(spec.prefix, "lib"), "-lhdf5", + # join_path(spec.prefix, "lib", "libhdf5.a"), + "-lz") + try: + output = subprocess.check_output("./check") + except: + output = "" + success = output == expected + if not success: + print "Produced output does not match expected output." + print "Expected output:" + print '-'*80 + print expected + print '-'*80 + print "Produced output:" + print '-'*80 + print output + print '-'*80 + raise RuntimeError("HDF5 install check failed") + shutil.rmtree(checkdir) def url_for_version(self, version): v = str(version) -- cgit v1.2.3-70-g09d2 From 867e1333d0c5973f51944418ad3509ff1cc4e131 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 20 Apr 2016 17:01:26 -0400 Subject: Remove outdated comment --- var/spack/repos/builtin/packages/hdf5/package.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index eb58eeb637..bef34ff5bd 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -171,12 +171,10 @@ HDF5 version {version} {version} cc = which(join_path(spec['mpi'].prefix.bin, "mpicc")) else: cc = which('cc') - # TODO: Automate these path settings + # TODO: Automate these path and library settings cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") cc('-o', "check", "check.o", - # I couldn't make libraries work on Darwin "-L%s" % join_path(spec.prefix, "lib"), "-lhdf5", - # join_path(spec.prefix, "lib", "libhdf5.a"), "-lz") try: output = subprocess.check_output("./check") -- cgit v1.2.3-70-g09d2 From ef9347bcfb52e7f80aacb4ecb63d1536b8aaa3c0 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 22 Apr 2016 04:25:17 +0200 Subject: dealii: set DEAL_II_DIR when loading a module (#816) --- var/spack/repos/builtin/packages/dealii/package.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index b251d50ca1..6810e86868 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -251,3 +251,6 @@ class Dealii(Package): cmake('.') make('release') make('run',parallel=False) + + def setup_environment(self, spack_env, env): + env.set('DEAL_II_DIR', self.prefix) -- cgit v1.2.3-70-g09d2 From 5c4bb69af9cceca0b3c4380357ab6e74e7554067 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 21 Apr 2016 22:29:20 -0400 Subject: xerces-c: update to 3.1.3 (#811) The 3.1.2 tarball seems to have gone missing. Also switch to using bz2 rather than gz to reduce the download size. --- var/spack/repos/builtin/packages/xerces-c/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index b59ab178ae..e36fb936e0 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/package.py @@ -24,8 +24,8 @@ class XercesC(Package): """ 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') + url = "https://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.3.tar.bz2" + version('3.1.3', '5e333b55cb43e6b025ddf0e5d0f0fb0d') def install(self, spec, prefix): configure("--prefix=%s" % prefix, -- cgit v1.2.3-70-g09d2 From e7d2fa7084a63d73fe19607a442e47036a3f864b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 22 Apr 2016 12:30:24 -0500 Subject: Add IOR benchmark package --- var/spack/repos/builtin/packages/ior/package.py | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ior/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/ior/package.py b/var/spack/repos/builtin/packages/ior/package.py new file mode 100644 index 0000000000..3ede3d7e37 --- /dev/null +++ b/var/spack/repos/builtin/packages/ior/package.py @@ -0,0 +1,38 @@ +from spack import * +import os + +class Ior(Package): + """The IOR software is used for benchmarking parallel file systems + using POSIX, MPI-IO, or HDF5 interfaces.""" + + homepage = "http://www.nersc.gov/users/computational-systems/cori/nersc-8-procurement/trinity-nersc-8-rfp/nersc-8-trinity-benchmarks/ior/" + url = "https://github.com/LLNL/ior/archive/3.0.1.tar.gz" + + version('3.0.1', '71150025e0bb6ea1761150f48b553065') + + variant('hdf5', default=False, description='support IO with HDF5 backend') + variant('ncmpi', default=False, description='support IO with NCMPI backend') + + depends_on('mpi') + depends_on('hdf5+mpi', when='+hdf5') + depends_on('netcdf+mpi', when='+ncmpi') + + + def install(self, spec, prefix): + os.system('./bootstrap') + + config_args = [ + 'MPICC=%s' % spec['mpi'].prefix.bin + '/mpicc', + '--prefix=%s' % prefix, + ] + + if '+hdf5' in spec: + config_args.append('--with-hdf5') + + if '+ncmpi' in spec: + config_args.append('--with-ncmpi') + + configure(*config_args) + + make() + make('install') -- cgit v1.2.3-70-g09d2 From 0cbaecca60d5852ef0fe0d1378c685ff1dc65fd1 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 22 Apr 2016 21:52:11 -0400 Subject: Don't use subprocess module --- var/spack/repos/builtin/packages/hdf5/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index bef34ff5bd..333c63c288 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -25,7 +25,6 @@ from spack import * import shutil -import subprocess class Hdf5(Package): @@ -177,7 +176,8 @@ HDF5 version {version} {version} "-L%s" % join_path(spec.prefix, "lib"), "-lhdf5", "-lz") try: - output = subprocess.check_output("./check") + check = Executable('./check') + output = check(return_output=True) except: output = "" success = output == expected -- cgit v1.2.3-70-g09d2 From 62d175c984c5413fd95185d7bb3280bad69e1e33 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 23 Apr 2016 12:30:34 -0500 Subject: This commit explicitly sets `libdir`. This is necessary because different systems use different defaults. --- var/spack/repos/builtin/packages/R/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 3a76416f27..7c4aa3520c 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -50,9 +50,12 @@ class R(Package): depends_on('tk') def install(self, spec, prefix): + rlibdir = join_path(prefix, 'rlib') options = ['--prefix=%s' % prefix, + '--libdir=%s' % rlibdir, '--enable-R-shlib', - '--enable-BLAS-shlib'] + '--enable-BLAS-shlib', + '--enable-R-framework=no'] if '+external-lapack' in spec: options.extend(['--with-blas', '--with-lapack']) @@ -66,7 +69,7 @@ class R(Package): @property def r_lib_dir(self): - return os.path.join('lib64', 'R', 'library') + return os.path.join('rlib', 'R', 'library') def setup_dependent_environment(self, spack_env, run_env, extension_spec): # Set R_LIBS to include the library dir for the -- cgit v1.2.3-70-g09d2 From d701d2ccf344ff22fee463504dd85e1d0a5bfdc6 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Sat, 23 Apr 2016 12:15:14 -0700 Subject: Updated the Swig package file to include versions for all of the popular Swig releases. (#790) --- var/spack/repos/builtin/packages/swig/package.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index 8d46c4fe46..78a6c6bbae 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -22,6 +22,7 @@ # 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 Swig(Package): @@ -33,14 +34,19 @@ class Swig(Package): code. In addition, SWIG provides a variety of customization features that let you tailor the wrapping process to suit your application.""" + homepage = "http://www.swig.org" - url = "http://prdownloads.sourceforge.net/swig/swig-3.0.2.tar.gz" + url = "http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz" + version('3.0.8', 'c96a1d5ecb13d38604d7e92148c73c97') version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') + version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4') + version('2.0.2', 'eaf619a4169886923e5f828349504a29') + version('1.3.40', '2df766c9e03e02811b1ab4bba1c7b9cc') depends_on('pcre') def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + configure('--prefix=%s' % prefix) make() - make("install") + make('install') -- cgit v1.2.3-70-g09d2 From 4e062d86b4213595e74510f9b8d91382ed4e1041 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 23 Apr 2016 15:15:32 -0400 Subject: Refine wget's OpenSSL configuration options (#786) --- var/spack/repos/builtin/packages/wget/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/wget/package.py b/var/spack/repos/builtin/packages/wget/package.py index 55728b0515..4b92659478 100644 --- a/var/spack/repos/builtin/packages/wget/package.py +++ b/var/spack/repos/builtin/packages/wget/package.py @@ -17,6 +17,8 @@ class Wget(Package): def install(self, spec, prefix): configure("--prefix=%s" % prefix, - "--with-ssl=openssl") + "--with-ssl=openssl", + "OPENSSL_CFLAGS=-I%s" % spec['openssl'].prefix.include, + "OPENSSL_LIBS=-L%s -lssl -lcrypto -lz" % spec['openssl'].prefix.lib) make() make("install") -- cgit v1.2.3-70-g09d2 From 248248c6b270e2c1707ea29e90de74813ea2debf Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Sat, 23 Apr 2016 15:15:53 -0400 Subject: Added package: NCView (#791) * ncview: Added package * Removed FIXMEs --- var/spack/repos/builtin/packages/ncview/package.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ncview/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py new file mode 100644 index 0000000000..1aa13e3f03 --- /dev/null +++ b/var/spack/repos/builtin/packages/ncview/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Ncview(Package): + """Simple viewer for NetCDF files.""" + homepage = "http://meteora.ucsd.edu/~pierce/ncview_home_page.html" + url = "ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.7.tar.gz" + + version('2.1.7', 'debd6ca61410aac3514e53122ab2ba07') + + depends_on("netcdf") + depends_on("udunits2") + + # OS Dependencies + # Ubuntu: apt-get install libxaw7-dev + # CentOS 7: yum install libXaw-devel + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") -- cgit v1.2.3-70-g09d2 From e32416430c16a51af673a78fb79d47c68464fa98 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 23 Apr 2016 15:18:58 -0400 Subject: Update git (#819) * git: update to 2.8.0 final and add 2.8.1 * git: hard-depend on curl and expat HTTP-based cloning is very prevalent now. --- var/spack/repos/builtin/packages/git/package.py | 32 ++++++------------------- 1 file changed, 7 insertions(+), 25 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 388f84aefd..77521fd658 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -7,7 +7,8 @@ class Git(Package): homepage = "http://git-scm.com" url = "https://github.com/git/git/tarball/v2.7.1" - version('2.8.0-rc2', 'c2cf9f2cc70e35f2fafbaf9258f82e4c') + version('2.8.1', '1308448d95afa41a4135903f22262fc8') + version('2.8.0', 'eca687e46e9750121638f258cff8317b') version('2.7.3', 'fa1c008b56618c355a32ba4a678305f6') version('2.7.1', 'bf0706b433a8dedd27a63a72f9a66060') @@ -23,18 +24,10 @@ class Git(Package): #version('2.2.1', 'ff41fdb094eed1ec430aed8ee9b9849c') - # Git compiles with curl support by default on but if your system - # does not have it you will not be able to clone https repos - variant("curl", default=False, description="Add the internal support of curl for https clone") - - # Git compiles with expat support by default on but if your system - # does not have it you will not be able to push https repos - variant("expat", default=False, description="Add the internal support of expat for https push") - depends_on("openssl") depends_on("autoconf") - depends_on("curl", when="+curl") - depends_on("expat", when="+expat") + depends_on("curl") + depends_on("expat") # Also depends_on gettext: apt-get install gettext (Ubuntu) @@ -49,23 +42,12 @@ class Git(Package): "--prefix=%s" % prefix, "--without-pcre", "--with-openssl=%s" % spec['openssl'].prefix, - "--with-zlib=%s" % spec['zlib'].prefix + "--with-zlib=%s" % spec['zlib'].prefix, + "--with-curl=%s" % spec['curl'].prefix, + "--with-expat=%s" % spec['expat'].prefix, ] - if '+curl' in spec: - configure_args.append("--with-curl=%s" % spec['curl'].prefix) - - if '+expat' in spec: - configure_args.append("--with-expat=%s" % spec['expat'].prefix) - which('autoreconf')('-i') configure(*configure_args) make() make("install") - - - - - - - -- cgit v1.2.3-70-g09d2 From 22e4ee560465a633f7dd8e84a2e7088d8dcf547f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 23 Apr 2016 15:29:47 -0500 Subject: Add OSU Micro-Benchmarks package (#822) * Add OSU Micro-Benchmarks package * Add workaround for GCC bug --- .../packages/osu-micro-benchmarks/package.py | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py new file mode 100644 index 0000000000..01054471a3 --- /dev/null +++ b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py @@ -0,0 +1,38 @@ +from spack import * + +class OsuMicroBenchmarks(Package): + """The Ohio MicroBenchmark suite is a collection of independent MPI + message passing performance microbenchmarks developed and written at + The Ohio State University. It includes traditional benchmarks and + performance measures such as latency, bandwidth and host overhead + and can be used for both traditional and GPU-enhanced nodes.""" + + homepage = "http://mvapich.cse.ohio-state.edu/benchmarks/" + url = "http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-5.3.tar.gz" + + version('5.3', '42e22b931d451e8bec31a7424e4adfc2') + + variant('cuda', default=False, description="Enable CUDA support") + + depends_on('mpi') + depends_on('cuda', when='+cuda') + + + def install(self, spec, prefix): + config_args = [ + 'CC=%s' % spec['mpi'].prefix.bin + '/mpicc', + 'CXX=%s' % spec['mpi'].prefix.bin + '/mpicxx', + 'LDFLAGS=-lrt', + '--prefix=%s' % prefix + ] + + if '+cuda' in spec: + config_args.extend([ + '--enable-cuda', + '--with-cuda=%s' % spec['cuda'].prefix, + ]) + + configure(*config_args) + + make() + make('install') -- cgit v1.2.3-70-g09d2 From a7ffffc336beff3ba2ef98a82ec16c35d65c7982 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 24 Apr 2016 17:14:33 -0500 Subject: Change homepage, explicitly disable --- var/spack/repos/builtin/packages/ior/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/ior/package.py b/var/spack/repos/builtin/packages/ior/package.py index 3ede3d7e37..c46650a674 100644 --- a/var/spack/repos/builtin/packages/ior/package.py +++ b/var/spack/repos/builtin/packages/ior/package.py @@ -5,7 +5,7 @@ class Ior(Package): """The IOR software is used for benchmarking parallel file systems using POSIX, MPI-IO, or HDF5 interfaces.""" - homepage = "http://www.nersc.gov/users/computational-systems/cori/nersc-8-procurement/trinity-nersc-8-rfp/nersc-8-trinity-benchmarks/ior/" + homepage = "https://github.com/LLNL/ior" url = "https://github.com/LLNL/ior/archive/3.0.1.tar.gz" version('3.0.1', '71150025e0bb6ea1761150f48b553065') @@ -28,9 +28,13 @@ class Ior(Package): if '+hdf5' in spec: config_args.append('--with-hdf5') + else: + config_args.append('--without-hdf5') if '+ncmpi' in spec: config_args.append('--with-ncmpi') + else: + config_args.append('--without-ncmpi') configure(*config_args) -- cgit v1.2.3-70-g09d2 From 797af2e80f0effddeca2b964283705940fa45df8 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 24 Apr 2016 17:39:49 -0500 Subject: Add py-csvkit package This adds the py-csvkit package and needed dependencies for working with csv files. --- .../builtin/packages/py-SQLAlchemy/package.py | 15 ++++++++++++++ .../repos/builtin/packages/py-csvkit/package.py | 23 ++++++++++++++++++++++ var/spack/repos/builtin/packages/py-dbf/package.py | 17 ++++++++++++++++ .../repos/builtin/packages/py-jdcal/package.py | 15 ++++++++++++++ .../repos/builtin/packages/py-openpyxl/package.py | 18 +++++++++++++++++ .../repos/builtin/packages/py-xlrd/package.py | 16 +++++++++++++++ 6 files changed, 104 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-SQLAlchemy/package.py create mode 100644 var/spack/repos/builtin/packages/py-csvkit/package.py create mode 100644 var/spack/repos/builtin/packages/py-dbf/package.py create mode 100644 var/spack/repos/builtin/packages/py-jdcal/package.py create mode 100644 var/spack/repos/builtin/packages/py-openpyxl/package.py create mode 100644 var/spack/repos/builtin/packages/py-xlrd/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py new file mode 100644 index 0000000000..ccb882f749 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PySqlalchemy(Package): + """ + The Python SQL Toolkit and Object Relational Mapper + """ + homepage = 'http://www.sqlalchemy.org/' + url = "https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-1.0.12.tar.gz" + + version('1.0.12', '6d19ef29883bbebdcac6613cf391cac4') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-csvkit/package.py b/var/spack/repos/builtin/packages/py-csvkit/package.py new file mode 100644 index 0000000000..1ab848161d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-csvkit/package.py @@ -0,0 +1,23 @@ +from spack import * + +class PyCsvkit(Package): + """ + A library of utilities for working with CSV, the king of tabular file + formats + """ + homepage = 'http://csvkit.rtfd.org/' + url = "https://pypi.python.org/packages/source/c/csvkit/csvkit-0.9.1.tar.gz" + + version('0.9.1', '48d78920019d18846933ee969502fff6') + + extends('python') + + depends_on('py-dateutil') + depends_on('py-dbf') + depends_on('py-xlrd') + depends_on('py-SQLAlchemy') + depends_on('py-six') + depends_on('py-openpyxl') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-dbf/package.py b/var/spack/repos/builtin/packages/py-dbf/package.py new file mode 100644 index 0000000000..75c32b2d61 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-dbf/package.py @@ -0,0 +1,17 @@ +from spack import * + +class PyDbf(Package): + """ + Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro + .dbf files (including memos). + """ + + homepage = 'https://pypi.python.org/pypi/dbf' + url = "https://pypi.python.org/packages/source/d/dbf/dbf-0.96.005.tar.gz" + + version('0.96.005', 'bce1a1ed8b454a30606e7e18dd2f8277') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-jdcal/package.py b/var/spack/repos/builtin/packages/py-jdcal/package.py new file mode 100644 index 0000000000..a2fcbe119c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-jdcal/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyJdcal(Package): + """ + Julian dates from proleptic Gregorian and Julian calendars + """ + homepage = 'http://github.com/phn/jdcal' + url = "https://pypi.python.org/packages/source/j/jdcal/jdcal-1.2.tar.gz" + + version('1.2', 'ab8d5ba300fd1eb01514f363d19b1eb9') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-openpyxl/package.py b/var/spack/repos/builtin/packages/py-openpyxl/package.py new file mode 100644 index 0000000000..5954c4758a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-openpyxl/package.py @@ -0,0 +1,18 @@ +from spack import * + +class PyOpenpyxl(Package): + """ + A Python library to read/write Excel 2007 xlsx/xlsm files + """ + homepage = 'http://openpyxl.readthedocs.org/' + url = "https://pypi.python.org/packages/source/o/openpyxl/openpyxl-2.4.0-a1.tar.gz" + + version('2.4.0-a1', 'e5ca6d23ceccb15115d45cdf26e736fc') + + extends('python') + + depends_on('py-jdcal') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-xlrd/package.py b/var/spack/repos/builtin/packages/py-xlrd/package.py new file mode 100644 index 0000000000..10ca8ce2a7 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-xlrd/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyXlrd(Package): + """ + Library for developers to extract data from Microsoft Excel (tm) + spreadsheet files + """ + homepage = 'http://www.python-excel.org/' + url = "https://pypi.python.org/packages/source/x/xlrd/xlrd-0.9.4.tar.gz" + + version('0.9.4', '911839f534d29fe04525ef8cd88fe865') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 4e671c54ee69d2a335e2b057aada75c2257c3850 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 24 Apr 2016 18:06:51 -0500 Subject: Reformat the description. --- var/spack/repos/builtin/packages/py-SQLAlchemy/package.py | 5 ++--- var/spack/repos/builtin/packages/py-csvkit/package.py | 7 +++---- var/spack/repos/builtin/packages/py-dbf/package.py | 6 ++---- var/spack/repos/builtin/packages/py-jdcal/package.py | 5 ++--- var/spack/repos/builtin/packages/py-openpyxl/package.py | 5 ++--- var/spack/repos/builtin/packages/py-xlrd/package.py | 7 +++---- 6 files changed, 14 insertions(+), 21 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py index ccb882f749..9aecc95c63 100644 --- a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py +++ b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py @@ -1,9 +1,8 @@ from spack import * class PySqlalchemy(Package): - """ - The Python SQL Toolkit and Object Relational Mapper - """ + """The Python SQL Toolkit and Object Relational Mapper""" + homepage = 'http://www.sqlalchemy.org/' url = "https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-1.0.12.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-csvkit/package.py b/var/spack/repos/builtin/packages/py-csvkit/package.py index 1ab848161d..def30457be 100644 --- a/var/spack/repos/builtin/packages/py-csvkit/package.py +++ b/var/spack/repos/builtin/packages/py-csvkit/package.py @@ -1,10 +1,9 @@ from spack import * class PyCsvkit(Package): - """ - A library of utilities for working with CSV, the king of tabular file - formats - """ + """A library of utilities for working with CSV, the king of tabular file + formats""" + homepage = 'http://csvkit.rtfd.org/' url = "https://pypi.python.org/packages/source/c/csvkit/csvkit-0.9.1.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-dbf/package.py b/var/spack/repos/builtin/packages/py-dbf/package.py index 75c32b2d61..698b221903 100644 --- a/var/spack/repos/builtin/packages/py-dbf/package.py +++ b/var/spack/repos/builtin/packages/py-dbf/package.py @@ -1,10 +1,8 @@ from spack import * class PyDbf(Package): - """ - Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro - .dbf files (including memos). - """ + """Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro + .dbf files (including memos)""" homepage = 'https://pypi.python.org/pypi/dbf' url = "https://pypi.python.org/packages/source/d/dbf/dbf-0.96.005.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-jdcal/package.py b/var/spack/repos/builtin/packages/py-jdcal/package.py index a2fcbe119c..54169b2c21 100644 --- a/var/spack/repos/builtin/packages/py-jdcal/package.py +++ b/var/spack/repos/builtin/packages/py-jdcal/package.py @@ -1,9 +1,8 @@ from spack import * class PyJdcal(Package): - """ - Julian dates from proleptic Gregorian and Julian calendars - """ + """Julian dates from proleptic Gregorian and Julian calendars""" + homepage = 'http://github.com/phn/jdcal' url = "https://pypi.python.org/packages/source/j/jdcal/jdcal-1.2.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-openpyxl/package.py b/var/spack/repos/builtin/packages/py-openpyxl/package.py index 5954c4758a..87ff9f3521 100644 --- a/var/spack/repos/builtin/packages/py-openpyxl/package.py +++ b/var/spack/repos/builtin/packages/py-openpyxl/package.py @@ -1,9 +1,8 @@ from spack import * class PyOpenpyxl(Package): - """ - A Python library to read/write Excel 2007 xlsx/xlsm files - """ + """A Python library to read/write Excel 2007 xlsx/xlsm files""" + homepage = 'http://openpyxl.readthedocs.org/' url = "https://pypi.python.org/packages/source/o/openpyxl/openpyxl-2.4.0-a1.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-xlrd/package.py b/var/spack/repos/builtin/packages/py-xlrd/package.py index 10ca8ce2a7..8f25c06aad 100644 --- a/var/spack/repos/builtin/packages/py-xlrd/package.py +++ b/var/spack/repos/builtin/packages/py-xlrd/package.py @@ -1,10 +1,9 @@ from spack import * class PyXlrd(Package): - """ - Library for developers to extract data from Microsoft Excel (tm) - spreadsheet files - """ + """Library for developers to extract data from Microsoft Excel (tm) + spreadsheet files""" + homepage = 'http://www.python-excel.org/' url = "https://pypi.python.org/packages/source/x/xlrd/xlrd-0.9.4.tar.gz" -- cgit v1.2.3-70-g09d2 From 2b7b7f6d9758d47bb59b59e92cb2c7e3b785ac51 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 24 Apr 2016 18:11:18 -0500 Subject: Reformat description text. --- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 1 + var/spack/repos/builtin/packages/r-abind/package.py | 5 ++++- var/spack/repos/builtin/packages/r-filehash/package.py | 10 +++++++++- var/spack/repos/builtin/packages/r-magic/package.py | 6 +++++- 4 files changed, 19 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index e2d9bb9594..2d92c1c4d8 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -2,6 +2,7 @@ from spack import * class RBiocgenerics(Package): """S4 generic functions needed by many Bioconductor packages.""" + homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html' url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py index 54d399c432..d06c7e9240 100644 --- a/var/spack/repos/builtin/packages/r-abind/package.py +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -1,7 +1,10 @@ from spack import * class RAbind(Package): - """Combine multidimensional arrays into a single array. This is a generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and higher-dimensional arrays. Also provides functions 'adrop', 'asub', and 'afill' for manipulating, extracting and replacing data in arrays.""" + """Combine multidimensional arrays into a single array. This is a + generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and + higher-dimensional arrays. Also provides functions 'adrop', 'asub', and + 'afill' for manipulating, extracting and replacing data in arrays.""" homepage = "https://cran.r-project.org/" url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py index a3b688da10..4911c636b4 100644 --- a/var/spack/repos/builtin/packages/r-filehash/package.py +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -1,7 +1,15 @@ from spack import * class RFilehash(Package): - """Implements a simple key-value style database where character string keys are associated with data values that are stored on the disk. A simple interface is provided for inserting, retrieving, and deleting data from the database. Utilities are provided that allow 'filehash' databases to be treated much like environments and lists are already used in R. These utilities are provided to encourage interactive and exploratory analysis on large datasets. Three different file formats for representing the database are currently available and new formats can easily be incorporated by third parties for use in the 'filehash' framework.""" + """Implements a simple key-value style database where character string keys + are associated with data values that are stored on the disk. A simple + interface is provided for inserting, retrieving, and deleting data from the + database. Utilities are provided that allow 'filehash' databases to be + treated much like environments and lists are already used in R. These + utilities are provided to encourage interactive and exploratory analysis on + large datasets. Three different file formats for representing the database + are currently available and new formats can easily be incorporated by third + parties for use in the 'filehash' framework.""" homepage = 'https://cran.r-project.org/' url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py index 5f25b2a162..e900cdb216 100644 --- a/var/spack/repos/builtin/packages/r-magic/package.py +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -1,7 +1,11 @@ from spack import * class RMagic(Package): - """A collection of efficient, vectorized algorithms for the creation and investigation of magic squares and hypercubes, including a variety of functions for the manipulation and analysis of arbitrarily dimensioned arrays.""" + """A collection of efficient, vectorized algorithms for the creation and + investigation of magic squares and hypercubes, including a variety of + functions for the manipulation and analysis of arbitrarily dimensioned + arrays.""" + homepage = "https://cran.r-project.org/" url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" -- cgit v1.2.3-70-g09d2 From b81cb554f505c4075b9df79ab3db08be3d3b9e36 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 25 Apr 2016 09:57:48 +0200 Subject: openblas: a small unit test to make sure Lapack symbols are compiled --- .../repos/builtin/packages/openblas/package.py | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 4522130ccc..252f699652 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -1,6 +1,7 @@ from spack import * import sys import os +import shutil class Openblas(Package): """OpenBLAS: An optimized BLAS library""" @@ -64,6 +65,10 @@ class Openblas(Package): if '+shared' in spec: symlink('libopenblas.%s' % dso_suffix, 'liblapack.%s' % dso_suffix) + # Openblas may pass its own test but still fail to compile Lapack + # symbols. To make sure we get working Blas and Lapack, do a small test. + self.check_install(spec) + def setup_dependent_package(self, module, dspec): # This is WIP for a prototype interface for virtual packages. @@ -76,3 +81,53 @@ class Openblas(Package): if '+shared' in self.spec: self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % dso_suffix) self.spec.lapack_shared_lib = self.spec.blas_shared_lib + + def check_install(self, spec): + "Build and run a small program to test that we have Lapack symbols" + print "Checking Openblas installation..." + checkdir = "spack-check" + with working_dir(checkdir, create=True): + source = r""" +#include +#include +int main(void) { +int i=0; +double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; +double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; +double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; +cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, + 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); +for (i = 0; i < 8; i++) + printf("%lf ", C[i]); +printf("%lf", C[8]); +return 0; +} +""" + expected = """\ +11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000\ +""" + with open("check.c", 'w') as f: + f.write(source) + cc = which('cc') + # TODO: Automate these path and library settings + cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") + cc('-o', "check", "check.o", + "-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas") + try: + check = Executable('./check') + output = check(return_output=True) + except: + output = "" + success = output == expected + if not success: + print "Produced output does not match expected output." + print "Expected output:" + print '-'*80 + print expected + print '-'*80 + print "Produced output:" + print '-'*80 + print output + print '-'*80 + raise RuntimeError("Openblas install check failed") + shutil.rmtree(checkdir) -- cgit v1.2.3-70-g09d2 From 42be50d10b649a130e64f2a742fa4133ed5534b7 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 25 Apr 2016 13:53:41 +0200 Subject: add a test/output pair --- .../repos/builtin/packages/openblas/test_cblas_dgemm.c | 14 ++++++++++++++ .../builtin/packages/openblas/test_cblas_dgemm.output | 1 + 2 files changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c create mode 100644 var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c new file mode 100644 index 0000000000..37785bf47f --- /dev/null +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c @@ -0,0 +1,14 @@ +#include +#include +int main(void) { +int i=0; +double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; +double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; +double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; +cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, + 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); +for (i = 0; i < 8; i++) + printf("%lf ", C[i]); +printf("%lf", C[8]); +return 0; +} diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output new file mode 100644 index 0000000000..490905aca0 --- /dev/null +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output @@ -0,0 +1 @@ +11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000 \ No newline at end of file -- cgit v1.2.3-70-g09d2 From dd37959899d03fc33d59f725dbad4fe33b579725 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 25 Apr 2016 16:21:19 +0200 Subject: output with new lines --- var/spack/repos/builtin/packages/openblas/package.py | 15 +++++++++++---- .../repos/builtin/packages/openblas/test_cblas_dgemm.c | 5 ++--- .../builtin/packages/openblas/test_cblas_dgemm.output | 10 +++++++++- 3 files changed, 22 insertions(+), 8 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 252f699652..61250fb310 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -97,14 +97,21 @@ double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); -for (i = 0; i < 8; i++) - printf("%lf ", C[i]); -printf("%lf", C[8]); +for (i = 0; i < 9; i++) + printf("%f\n", C[i]); return 0; } """ expected = """\ -11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000\ +11.000000 +-9.000000 +5.000000 +-9.000000 +21.000000 +-1.000000 +5.000000 +-1.000000 +3.000000 """ with open("check.c", 'w') as f: f.write(source) diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c index 37785bf47f..634e99d20b 100644 --- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c @@ -7,8 +7,7 @@ double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); -for (i = 0; i < 8; i++) - printf("%lf ", C[i]); -printf("%lf", C[8]); +for (i = 0; i < 9; i++) + printf("%f\n", C[i]); return 0; } diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output index 490905aca0..b8316d7477 100644 --- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output @@ -1 +1,9 @@ -11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000 \ No newline at end of file +11.000000 +-9.000000 +5.000000 +-9.000000 +21.000000 +-1.000000 +5.000000 +-1.000000 +3.000000 -- cgit v1.2.3-70-g09d2 From 1a585a6c748d9445ff691e766efba350259364b5 Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Mon, 25 Apr 2016 22:18:38 -0400 Subject: Added nccmp package --- var/spack/repos/builtin/packages/nccmp/package.py | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/nccmp/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/nccmp/package.py b/var/spack/repos/builtin/packages/nccmp/package.py new file mode 100644 index 0000000000..458afbb1e8 --- /dev/null +++ b/var/spack/repos/builtin/packages/nccmp/package.py @@ -0,0 +1,30 @@ +from spack import * +import os + +class Nccmp(Package): + """Compare NetCDF Files""" + homepage = "http://nccmp.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/nccmp/nccmp-1.8.2.0.tar.gz" + + version('1.8.2.0', '81e6286d4413825aec4327e61a28a580') + + depends_on('netcdf') + + def install(self, spec, prefix): + # Configure says: F90 and F90FLAGS are replaced by FC and + # FCFLAGS respectively in this configure, please unset + # F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure + # again. + os.environ['FC'] = os.environ['F90'] + del os.environ['F90'] + try: + os.environ['FCFLAGS'] = os.environ['F90FLAGS'] + del os.environ['F90FLAGS'] + except KeyError: # There are no flags + pass + + configure('--prefix=%s' % prefix) + + make() + make("check") + make("install") -- cgit v1.2.3-70-g09d2 From 17b73050868818f62af4f98a65b371f68a4e5e59 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Tue, 19 Apr 2016 21:09:54 +0200 Subject: Added package for Paradiseo. --- .../packages/paradiseo/enable_eoserial.patch | 14 +++++ .../packages/paradiseo/fix_osx_detection.patch | 13 +++++ .../builtin/packages/paradiseo/fix_tests.patch | 13 +++++ .../builtin/packages/paradiseo/fix_tutorials.patch | 13 +++++ .../repos/builtin/packages/paradiseo/package.py | 59 ++++++++++++++++++++++ 5 files changed, 112 insertions(+) create mode 100644 var/spack/repos/builtin/packages/paradiseo/enable_eoserial.patch create mode 100644 var/spack/repos/builtin/packages/paradiseo/fix_osx_detection.patch create mode 100644 var/spack/repos/builtin/packages/paradiseo/fix_tests.patch create mode 100644 var/spack/repos/builtin/packages/paradiseo/fix_tutorials.patch create mode 100644 var/spack/repos/builtin/packages/paradiseo/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/paradiseo/enable_eoserial.patch b/var/spack/repos/builtin/packages/paradiseo/enable_eoserial.patch new file mode 100644 index 0000000000..8b3ccfeb84 --- /dev/null +++ b/var/spack/repos/builtin/packages/paradiseo/enable_eoserial.patch @@ -0,0 +1,14 @@ +diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt +index b2b445a..d45ddc7 100644 +--- a/eo/src/CMakeLists.txt ++++ b/eo/src/CMakeLists.txt +@@ -47,7 +47,7 @@ install(DIRECTORY do es ga gp other utils + add_subdirectory(es) + add_subdirectory(ga) + add_subdirectory(utils) +-#add_subdirectory(serial) ++add_subdirectory(serial) # Required when including , which is need by + + if(ENABLE_PYEO) + add_subdirectory(pyeo) + \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/paradiseo/fix_osx_detection.patch b/var/spack/repos/builtin/packages/paradiseo/fix_osx_detection.patch new file mode 100644 index 0000000000..27b240f673 --- /dev/null +++ b/var/spack/repos/builtin/packages/paradiseo/fix_osx_detection.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/Config.cmake b/cmake/Config.cmake +index 02593ba..d198ca9 100644 +--- a/cmake/Config.cmake ++++ b/cmake/Config.cmake +@@ -6,7 +6,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + + # detect OS X version. (use '/usr/bin/sw_vers -productVersion' to extract V from '10.V.x'.) + execute_process (COMMAND /usr/bin/sw_vers -productVersion OUTPUT_VARIABLE MACOSX_VERSION_RAW) +- string(REGEX REPLACE "10\\.([0-9]).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}") ++ string(REGEX REPLACE "10\\.([0-9]+).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}") + if(${MACOSX_VERSION} LESS 5) + message(FATAL_ERROR "Unsupported version of OS X : ${MACOSX_VERSION_RAW}") + return() diff --git a/var/spack/repos/builtin/packages/paradiseo/fix_tests.patch b/var/spack/repos/builtin/packages/paradiseo/fix_tests.patch new file mode 100644 index 0000000000..607c5d5262 --- /dev/null +++ b/var/spack/repos/builtin/packages/paradiseo/fix_tests.patch @@ -0,0 +1,13 @@ +diff --git a/moeo/test/t-moeo2DMinHypervolumeArchive.cpp b/moeo/test/t-moeo2DMinHypervolumeArchive.cpp +index 994a9a4..c4ba77b 100644 +--- a/moeo/test/t-moeo2DMinHypervolumeArchive.cpp ++++ b/moeo/test/t-moeo2DMinHypervolumeArchive.cpp +@@ -41,7 +41,7 @@ + #include + #include + +-#include ++#include + + //----------------------------------------------------------------------------- + diff --git a/var/spack/repos/builtin/packages/paradiseo/fix_tutorials.patch b/var/spack/repos/builtin/packages/paradiseo/fix_tutorials.patch new file mode 100644 index 0000000000..14cb5fed74 --- /dev/null +++ b/var/spack/repos/builtin/packages/paradiseo/fix_tutorials.patch @@ -0,0 +1,13 @@ +diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp +index dc37479..d178941 100644 +--- a/eo/tutorial/Lesson3/exercise3.1.cpp ++++ b/eo/tutorial/Lesson3/exercise3.1.cpp +@@ -289,7 +289,7 @@ void main_function(int argc, char **argv) + checkpoint.add(fdcStat); + + // The Stdout monitor will print parameters to the screen ... +- eoStdoutMonitor monitor(false); ++ eoStdoutMonitor monitor; + + // when called by the checkpoint (i.e. at every generation) + checkpoint.add(monitor); diff --git a/var/spack/repos/builtin/packages/paradiseo/package.py b/var/spack/repos/builtin/packages/paradiseo/package.py new file mode 100644 index 0000000000..c254234b32 --- /dev/null +++ b/var/spack/repos/builtin/packages/paradiseo/package.py @@ -0,0 +1,59 @@ +from spack import * +import sys + +class Paradiseo(Package): + """A C++ white-box object-oriented framework dedicated to the reusable design of metaheuristics.""" + homepage = "http://paradiseo.gforge.inria.fr/" + + # Installing from the development version is a better option at this + # point than using the very old supplied packages + version('head', git='https://gforge.inria.fr/git/paradiseo/paradiseo.git') + # This is a version that the package formula author has tested successfully. + # However, the clone is very large (~1Gb git history). The history in the + # head version has been trimmed significantly. + version('dev-safe', git='https://gforge.inria.fr/git/paradiseo/paradiseo.git', + commit='dbb8fbe9a786efd4d1c26408ac1883442e7643a6') + + variant('mpi', default=True, description='Compile with parallel and distributed metaheuristics module') + variant('smp', default=True, description='Compile with symmetric multi-processing module ') + variant('edo', default=True, description='Compile with (Experimental) EDO module') + #variant('tests', default=False, description='Compile with build tests') + #variant('doc', default=False, description='Compile with documentation') + variant('debug', default=False, description='Builds a debug version of the libraries') + + # Required dependencies + depends_on ("cmake") + depends_on ("eigen") + + # Optional dependencies + depends_on ("mpi", when="+mpi") + depends_on ("doxygen", when='+doc') + + # Patches + patch('enable_eoserial.patch') + patch('fix_osx_detection.patch') + patch('fix_tests.patch') + patch('fix_tutorials.patch') + + def install(self, spec, prefix): + options = [] + options.extend(std_cmake_args) + + options.extend([ + '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), + '-DINSTALL_TYPE:STRING=MIN', + '-DMPI:BOOL=%s' % ('TRUE' if '+mpi' in spec else 'FALSE'), + '-DSMP:BOOL=%s' % ('TRUE' if '+smp' in spec else 'FALSE'), # Note: This requires a C++11 compatible compiler + '-DEDO:BOOL=%s' % ('TRUE' if '+edo' in spec else 'FALSE'), + '-DENABLE_CMAKE_TESTING:BOOL=%s' % ('TRUE' if '+tests' in spec else 'FALSE') + ]) + + with working_dir('spack-build', create=True): + # Configure + cmake('..', *options) + + # Build, test and install + make("VERBOSE=1") + if '+tests' in spec: + make("test") + make("install") -- cgit v1.2.3-70-g09d2 From 168f9c46ea7f249fba3769cf1429348ca218eeae Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 26 Apr 2016 09:18:39 +0200 Subject: astyle: fix installation of the binary --- var/spack/repos/builtin/packages/astyle/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py index 7260fd74a1..5274fc018f 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -14,4 +14,5 @@ class Astyle(Package): make('-f', join_path(self.stage.source_path,'build','clang','Makefile'), parallel=False) + mkdirp(self.prefix.bin) install(join_path(self.stage.source_path, 'src','bin','astyle'), self.prefix.bin) -- cgit v1.2.3-70-g09d2 From 8a45aa41854fbc1824401662f93e08d078109f6e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 26 Apr 2016 12:52:49 +0200 Subject: p4est: add missing dependencies --- var/spack/repos/builtin/packages/p4est/package.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index 1e2969fe64..017c4e3fbf 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -7,10 +7,15 @@ class P4est(Package): version('1.1', '37ba7f4410958cfb38a2140339dbf64f') - # disable by default to make it work on frontend of clusters - variant('tests', default=False, description='Run small tests') + # build dependencies + depends_on('automake') + depends_on('autoconf') + depends_on('libtool@2.4.2:') + # other dependencies + depends_on('lua') # Needed for the submodule sc depends_on('mpi') + depends_on('zlib') def install(self, spec, prefix): options = ['--enable-mpi', @@ -28,7 +33,5 @@ class P4est(Package): configure('--prefix=%s' % prefix, *options) make() - if '+tests' in self.spec: - make("check") - + make("check") make("install") -- cgit v1.2.3-70-g09d2 From 0ff41206923dc9235b7f7341b514b4e2944d262d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 26 Apr 2016 13:13:47 +0200 Subject: dealii: add missing dependencies --- var/spack/repos/builtin/packages/dealii/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 6810e86868..674fe3150a 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -50,8 +50,8 @@ class Dealii(Package): depends_on ("trilinos", when='+trilinos+mpi') # developer dependnecies - #depends_on ("numdiff") #FIXME - #depends_on ("astyle") #FIXME + depends_on ("numdiff", when='@dev') + depends_on ("astyle@2.04", when='@dev') def install(self, spec, prefix): options = [] -- cgit v1.2.3-70-g09d2 From f70046e6b713f783288afac3359ccba6bfd8e233 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Tue, 26 Apr 2016 10:00:24 -0700 Subject: MFEM version 3.1 (#749) MFEM is a free, lightweight, scalable C++ library for finite element methods. Includes lapack, hypre, metis, suite-sparse, mpi variants & tests for serial and parallel versions. --- var/spack/repos/builtin/packages/mfem/package.py | 125 +++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mfem/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py new file mode 100644 index 0000000000..510e09c4e1 --- /dev/null +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -0,0 +1,125 @@ +from spack import * +import glob, string + +class Mfem(Package): + """Free, lightweight, scalable C++ library for finite element methods.""" + + homepage = 'http://www.mfem.org' + url = 'https://github.com/mfem/mfem' + +# version('3.1', git='https://github.com/mfem/mfem.git', +# commit='dbae60fe32e071989b52efaaf59d7d0eb2a3b574') + + version('3.1', '841ea5cf58de6fae4de0f553b0e01ebaab9cd9c67fa821e8a715666ecf18fc57', + url='http://goo.gl/xrScXn', expand=False) + + variant('metis', default=False, description='Activate support for metis') + variant('hypre', default=False, description='Activate support for hypre') + variant('suite-sparse', default=False, + description='Activate support for SuiteSparse') + variant('mpi', default=False, description='Activate support for MPI') + variant('lapack', default=False, description='Activate support for LAPACK') + variant('debug', default=False, description='Build debug version') + + depends_on('blas', when='+lapack') + depends_on('lapack', when='+lapack') + + depends_on('mpi', when='+mpi') + depends_on('metis', when='+mpi') + depends_on('hypre', when='+mpi') + + depends_on('hypre', when='+hypre') + + depends_on('metis@4:', when='+metis') + + depends_on('suite-sparse', when='+suite-sparse') + depends_on('blas', when='+suite-sparse') + depends_on('lapack', when='+suite-sparse') + depends_on('metis@5:', when='+suite-sparse ^suite-sparse@4.5:') + depends_on('cmake', when='^metis@5:') + + def check_variants(self, spec): + if '+mpi' in spec and ('+hypre' not in spec or '+metis' not in spec): + raise InstallError('mfem+mpi must be built with +hypre ' + + 'and +metis!') + if '+suite-sparse' in spec and ('+metis' not in spec or + '+lapack' not in spec): + raise InstallError('mfem+suite-sparse must be built with ' + + '+metis and +lapack!') + if 'metis@5:' in spec and '%clang' in spec and ('^cmake %gcc' not in spec): + raise InstallError('To work around CMake bug with clang, must ' + + 'build mfem with mfem[+variants] %clang ' + + '^cmake %gcc to force CMake to build with gcc') + return + + def install(self, spec, prefix): + self.check_variants(spec) + + options = ['PREFIX=%s' % prefix] + + if '+lapack' in spec: + lapack_lib = '-L{0} -llapack -L{1} -lblas'.format( + spec['lapack'].prefix.lib, spec['blas'].prefix.lib) + options.extend(['MFEM_USE_LAPACK=YES', + 'LAPACK_OPT=-I%s' % spec['lapack'].prefix.include, + 'LAPACK_LIB=%s' % lapack_lib]) + + if '+hypre' in spec: + options.extend(['HYPRE_DIR=%s' % spec['hypre'].prefix, + 'HYPRE_OPT=-I%s' % spec['hypre'].prefix.include, + 'HYPRE_LIB=-L%s' % spec['hypre'].prefix.lib + + ' -lHYPRE']) + + if '+metis' in spec: + metis_lib = '-L%s -lmetis' % spec['metis'].prefix.lib + if spec['metis'].satisfies('@5:'): + metis_str = 'MFEM_USE_METIS_5=YES' + else: + metis_str = 'MFEM_USE_METIS_5=NO' + options.extend([metis_str, + 'METIS_DIR=%s' % spec['metis'].prefix, + 'METIS_OPT=-I%s' % spec['metis'].prefix.include, + 'METIS_LIB=%s' % metis_lib]) + + if '+mpi' in spec: options.extend(['MFEM_USE_MPI=YES']) + + if '+suite-sparse' in spec: + ssp = spec['suite-sparse'].prefix + ss_lib = '-L%s' % ssp.lib + ss_lib += (' -lumfpack -lcholmod -lcolamd -lamd -lcamd' + + ' -lccolamd -lsuitesparseconfig') + + no_librt_archs = ['darwin-i686', 'darwin-x86_64'] + no_rt = any(map(lambda a: spec.satisfies('='+a), no_librt_archs)) + if not no_rt: ss_lib += ' -lrt' + ss_lib += (' ' + metis_lib + ' ' + lapack_lib) + + options.extend(['MFEM_USE_SUITESPARSE=YES', + 'SUITESPARSE_DIR=%s' % ssp, + 'SUITESPARSE_OPT=-I%s' % ssp.include, + 'SUITESPARSE_LIB=%s' % ss_lib]) + + if '+debug' in spec: options.extend(['MFEM_DEBUG=YES']) + + # Dirty hack to cope with URL redirect + tgz_file = string.split(self.url,'/')[-1] + tar = which('tar') + tar('xzvf', tgz_file) + cd(glob.glob('mfem*')[0]) + # End dirty hack to cope with URL redirect + + make('config', *options) + make('all') + + # Run a small test before installation + args = ['-m', join_path('data','star.mesh'), '--no-visualization'] + if '+mpi' in spec: + Executable(join_path(spec['mpi'].prefix.bin, + 'mpirun'))('-np', + '4', + join_path('examples','ex1p'), + *args) + else: + Executable(join_path('examples', 'ex1'))(*args) + + make('install') -- cgit v1.2.3-70-g09d2 From 8e227f603d0c158e9f71a0bc0a815d977415908c Mon Sep 17 00:00:00 2001 From: jppelteret Date: Tue, 26 Apr 2016 19:01:09 +0200 Subject: Fix: Add missing dependencies for gmp and eigen (#830) See https://groups.google.com/forum/#!topic/spack/9JMDwafjBUs --- var/spack/repos/builtin/packages/eigen/package.py | 1 + var/spack/repos/builtin/packages/gmp/package.py | 2 ++ 2 files changed, 3 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py index 1501989812..6b38ab0261 100644 --- a/var/spack/repos/builtin/packages/eigen/package.py +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -45,6 +45,7 @@ class Eigen(Package): # TODO : dependency on googlehash, superlu, adolc missing + depends_on('cmake') depends_on('metis@5:', when='+metis') depends_on('scotch', when='+scotch') depends_on('fftw', when='+fftw') diff --git a/var/spack/repos/builtin/packages/gmp/package.py b/var/spack/repos/builtin/packages/gmp/package.py index fe13de3b95..85e9c237d6 100644 --- a/var/spack/repos/builtin/packages/gmp/package.py +++ b/var/spack/repos/builtin/packages/gmp/package.py @@ -35,6 +35,8 @@ class Gmp(Package): version('6.0.0a', 'b7ff2d88cae7f8085bd5006096eed470') version('6.0.0' , '6ef5869ae735db9995619135bd856b84') + depends_on("m4") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() -- cgit v1.2.3-70-g09d2 From 8ec5e8118643223c00b3106fb4e4f1204821e380 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 26 Apr 2016 10:24:36 -0700 Subject: Update Package : Zoltan (#833) * Added preliminary implementations for the debug and shared variants. * Fixed a few problems with the '+shared' variant of the Zoltan package. Added support for a few more important Zoltan package versions. * Fixed a minor compiler incompatibility issue with the '+shared+mpi' variants. --- var/spack/repos/builtin/packages/zoltan/package.py | 35 +++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py index e20ae81adb..738dfb508b 100644 --- a/var/spack/repos/builtin/packages/zoltan/package.py +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -1,3 +1,4 @@ +import re, os, glob from spack import * class Zoltan(Package): @@ -12,8 +13,13 @@ class Zoltan(Package): base_url = "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions" version('3.83', '1ff1bc93f91e12f2c533ddb01f2c095f') + version('3.8', '9d8fba8a990896881b85351d4327c4a9') + version('3.6', '9cce794f7241ecd8dbea36c3d7a880f9') version('3.3', '5eb8f00bda634b25ceefa0122bd18d65') + variant('debug', default=False, description='Builds a debug version of the library') + variant('shared', default=True, description='Builds a shared version of the library') + variant('fortran', default=True, description='Enable Fortran support') variant('mpi', default=False, description='Enable MPI support') @@ -24,28 +30,49 @@ class Zoltan(Package): '--enable-f90interface' if '+fortan' in spec else '--disable-f90interface', '--enable-mpi' if '+mpi' in spec else '--disable-mpi', ] + config_cflags = [ + '-O0' if '+debug' in spec else '-O3', + '-g' if '+debug' in spec else '-g0', + ] + + if '+shared' in spec: + config_args.append('--with-ar=$(CXX) -shared $(LDFLAGS) -o') + config_args.append('RANLIB=echo') + config_cflags.append('-fPIC') if '+mpi' in spec: - config_args.append('--with-mpi=%s' % spec['mpi'].prefix) - config_args.append('--with-mpi-compilers=%s' % spec['mpi'].prefix.bin) config_args.append('CC=%s/mpicc' % spec['mpi'].prefix.bin) config_args.append('CXX=%s/mpicxx' % spec['mpi'].prefix.bin) + config_args.append('--with-mpi=%s' % spec['mpi'].prefix) + config_args.append('--with-mpi-compilers=%s' % spec['mpi'].prefix.bin) # NOTE: Early versions of Zoltan come packaged with a few embedded # library packages (e.g. ParMETIS, Scotch), which messes with Spack's # ability to descend directly into the package's source directory. - if spec.satisfies('@:3.3'): + if spec.satisfies('@:3.6'): cd('Zoltan_v%s' % self.version) mkdirp('build') cd('build') config_zoltan = Executable('../configure') - config_zoltan('--prefix=%s' % pwd(), *config_args) + config_zoltan( + '--prefix=%s' % pwd(), + '--with-cflags=%s' % ' '.join(config_cflags), + '--with-cxxflags=%s' % ' '.join(config_cflags), + *config_args) make() make('install') + # NOTE: Unfortunately, Zoltan doesn't provide any configuration options for + # the extension of the output library files, so this script must change these + # extensions as a post-processing step. + if '+shared' in spec: + for libpath in glob.glob('lib/*.a'): + libdir, libname = (os.path.dirname(libpath), os.path.basename(libpath)) + move(libpath, os.path.join(libdir, re.sub(r'\.a$', '.so', libname))) + mkdirp(prefix) move('include', prefix) move('lib', prefix) -- cgit v1.2.3-70-g09d2 From b56bfcea968fb6fb2a81a08804258300178c4b05 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 26 Apr 2016 12:31:48 -0500 Subject: Add the turbomole package. (#826) * Add the turbomole package. This package has three modes of operation that need to be selected independently. This is handled with spack vaiants. Turbomole has a builtin MPI implementation so it does not need to depend on an mpi provider when using the +mpi variant. * Whitespace cleanup. --- .../repos/builtin/packages/turbomole/package.py | 124 +++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 var/spack/repos/builtin/packages/turbomole/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/turbomole/package.py b/var/spack/repos/builtin/packages/turbomole/package.py new file mode 100644 index 0000000000..acc95e3b10 --- /dev/null +++ b/var/spack/repos/builtin/packages/turbomole/package.py @@ -0,0 +1,124 @@ +from spack import * +import os +import subprocess + +class Turbomole(Package): + """TURBOMOLE: Program Package for ab initio Electronic Structure + Calculations. NB: Requires a license to download.""" + + # NOTE: Turbomole requires purchase of a license to download. Go to the + # NOTE: Turbomole home page, http://www.turbomole-gmbh.com, for details. + # NOTE: Spack will search the current directory for this file. It is + # NOTE: probably best to add this file to a Spack mirror so that it can be + # NOTE: found from anywhere. For information on setting up a Spack mirror + # NOTE: see http://software.llnl.gov/spack/mirrors.html + + homepage = "http://www.turbomole-gmbh.com/" + + version('7.0.2', '92b97e1e52e8dcf02a4d9ac0147c09d6', + url="file://%s/turbolinux702.tar.gz" % os.getcwd()) + + variant('mpi', default=False, description='Set up MPI environment') + variant('smp', default=False, description='Set up SMP environment') + + # Turbomole's install is odd. There are three variants + # - serial + # - parallel, MPI + # - parallel, SMP + # + # Only one of these can be active at a time. MPI and SMP are set as + # variants so there could be up to 3 installs per version. Switching + # between them would be accomplished with `module swap` commands. + + def do_fetch(self, mirror_only=True): + if '+mpi' in self.spec and '+smp' in self.spec: + raise InstallError('Can not have both SMP and MPI enabled in the same build.') + super(Turbomole, self).do_fetch(mirror_only) + + def get_tm_arch(self): + # For python-2.7 we could use `tm_arch = subprocess.check_output()` + # Use the following for compatibility with python 2.6 + if 'TURBOMOLE' in os.getcwd(): + tm_arch = subprocess.Popen(['sh', 'scripts/sysname'], + stdout=subprocess.PIPE).communicate()[0] + return tm_arch.rstrip('\n') + else: + return + + def install(self, spec, prefix): + if spec.satisfies('@:7.0.2'): + calculate_version = 'calculate_2.4_linux64' + molecontrol_version = 'MoleControl_2.5' + + tm_arch=self.get_tm_arch() + + tar = which('tar') + dst = join_path(prefix, 'TURBOMOLE') + + tar('-x', '-z', '-f', 'thermocalc.tar.gz') + with working_dir('thermocalc'): + cmd = 'sh install << Date: Tue, 26 Apr 2016 12:32:14 -0500 Subject: Put f2py of py-numpy in python ignore list. (#827) There are many python packages that depend on py-numpy. Each one of those will have a copy of f2py that will need to be put in the ignore list for activation. Thise PR adds f2py to the ignore list in the python package.py file so that it does not have to be done for each package that depends on py-numpy. This follows the model of what is done for py-setuptools. This PR also removes the f2py ignore expression for python packages that were using it as it is no longer needed in the individual packages. --- var/spack/repos/builtin/packages/py-bottleneck/package.py | 2 +- var/spack/repos/builtin/packages/py-matplotlib/package.py | 2 +- var/spack/repos/builtin/packages/py-numexpr/package.py | 2 +- var/spack/repos/builtin/packages/py-pandas/package.py | 2 +- var/spack/repos/builtin/packages/py-scikit-image/package.py | 2 +- var/spack/repos/builtin/packages/python/package.py | 2 ++ 6 files changed, 7 insertions(+), 5 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py index 0aa4208b4d..d43308543b 100644 --- a/var/spack/repos/builtin/packages/py-bottleneck/package.py +++ b/var/spack/repos/builtin/packages/py-bottleneck/package.py @@ -7,7 +7,7 @@ class PyBottleneck(Package): version('1.0.0', '380fa6f275bd24f27e7cf0e0d752f5d2') - extends('python', ignore=r'bin/f2py$') + extends('python') depends_on('py-numpy') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 19194c942e..1a190cc5f3 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -12,7 +12,7 @@ class PyMatplotlib(Package): variant('gui', default=False, description='Enable GUI') variant('ipython', default=False, description='Enable ipython support') - extends('python', ignore=r'bin/nosetests.*$|bin/pbr$|bin/f2py$') + extends('python', ignore=r'bin/nosetests.*$|bin/pbr$') depends_on('py-pyside', when='+gui') depends_on('py-ipython', when='+ipython') diff --git a/var/spack/repos/builtin/packages/py-numexpr/package.py b/var/spack/repos/builtin/packages/py-numexpr/package.py index 081a79dec6..0076aa456b 100644 --- a/var/spack/repos/builtin/packages/py-numexpr/package.py +++ b/var/spack/repos/builtin/packages/py-numexpr/package.py @@ -9,7 +9,7 @@ class PyNumexpr(Package): version('2.4.6', '17ac6fafc9ea1ce3eb970b9abccb4fbd') version('2.5', '84f66cced45ba3e30dcf77a937763aaa') - extends('python', ignore=r'bin/f2py$') + extends('python') depends_on('py-numpy') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index 2320b1f92f..59d515eb5e 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -10,7 +10,7 @@ class PyPandas(Package): version('0.16.1', 'fac4f25748f9610a3e00e765474bdea8') version('0.18.0', 'f143762cd7a59815e348adf4308d2cf6') - extends('python', ignore=r'bin/f2py$') + extends('python') depends_on('py-dateutil') depends_on('py-numpy') depends_on('py-setuptools') diff --git a/var/spack/repos/builtin/packages/py-scikit-image/package.py b/var/spack/repos/builtin/packages/py-scikit-image/package.py index 22ce1f8374..d13339060e 100644 --- a/var/spack/repos/builtin/packages/py-scikit-image/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py @@ -7,7 +7,7 @@ class PyScikitImage(Package): version('0.12.3', '04ea833383e0b6ad5f65da21292c25e1') - extends('python', ignore=r'bin/.*\.py$|bin/f2py$') + extends('python', ignore=r'bin/.*\.py$') depends_on('py-dask') depends_on('py-pillow') diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index f5237c3b57..f7e1d94567 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -151,6 +151,8 @@ class Python(Package): patterns.append(r'setuptools\.pth') patterns.append(r'bin/easy_install[^/]*$') patterns.append(r'setuptools.*egg$') + if ext_pkg.name != 'py-numpy': + patterns.append(r'bin/f2py$') return match_predicate(ignore_arg, patterns) -- cgit v1.2.3-70-g09d2 From 55d339194d59f78b001ad939aae2e67f6ebae5ad Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 26 Apr 2016 15:29:16 -0400 Subject: Update hwloc to 1.11.3 --- var/spack/repos/builtin/packages/hwloc/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index ab7205646e..a461a7482c 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -17,6 +17,7 @@ class Hwloc(Package): list_url = "http://www.open-mpi.org/software/hwloc/" list_depth = 3 + version('1.11.3', 'c1d36a9de6028eac1d18ea4782ef958f') version('1.11.2', 'e4ca55c2a5c5656da4a4e37c8fc51b23') version('1.11.1', 'feb4e416a1b25963ed565d8b42252fdc') version('1.9', '1f9f9155682fe8946a97c08896109508') -- cgit v1.2.3-70-g09d2 From ee6a75c9b5bb072ef852b2fae80e2dc1f3944d53 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Wed, 27 Apr 2016 18:43:16 -0400 Subject: Added missing -lpthread to OpenBLAS check. See: https://github.com/xianyi/OpenBLAS/wiki/faq#static_link --- var/spack/repos/builtin/packages/openblas/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 61250fb310..52edd1a77a 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -119,7 +119,7 @@ return 0; # TODO: Automate these path and library settings cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") cc('-o', "check", "check.o", - "-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas") + "-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas", "-lpthread") try: check = Executable('./check') output = check(return_output=True) -- cgit v1.2.3-70-g09d2 From 62d806d51254c4b063c2e88b616526d1abb1e61e Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Wed, 27 Apr 2016 19:01:41 -0400 Subject: hdf5: Set preferred version, so as to not break NetCDF (for now). --- var/spack/repos/builtin/packages/hdf5/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index cce609eb29..470969832f 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -38,7 +38,7 @@ class Hdf5(Package): list_depth = 3 version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199') - version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618') + version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618', preferred=True) version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') -- cgit v1.2.3-70-g09d2 From 71ca837adad0e8c8149bdfd5be602ac7cc27c9a5 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Wed, 27 Apr 2016 20:35:29 -0400 Subject: Add '+fpic' variant. --- var/spack/repos/builtin/packages/openblas/package.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 52edd1a77a..f5d656f659 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -14,6 +14,7 @@ class Openblas(Package): variant('shared', default=True, description="Build shared libraries as well as static libs.") variant('openmp', default=True, description="Enable OpenMP support.") + variant('fpic', default=True, description="Build position independent code") # virtual dependency provides('blas') @@ -33,6 +34,8 @@ class Openblas(Package): if '+shared' in spec: make_targets += ['shared'] else: + if '+fpic' in spec: + make_defs.extend(['CFLAGS=-fPIC', 'FFLAGS=-fPIC']) make_defs += ['NO_SHARED=1'] # fix missing _dggsvd_ and _sggsvd_ -- cgit v1.2.3-70-g09d2 From 17f696d3b3ee83bcb185f583a465be3aef6c2d5f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 29 Apr 2016 09:05:54 +0200 Subject: glib: add missing dependencies --- var/spack/repos/builtin/packages/glib/package.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index 67ead5f941..a3fc3f79eb 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -1,4 +1,5 @@ from spack import * +import sys class Glib(Package): """The GLib package contains a low-level libraries useful for @@ -12,6 +13,8 @@ class Glib(Package): depends_on("libffi") depends_on("zlib") + depends_on("pkg-config") + depends_on('gettext', sys.platform=='darwin') def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 176b9febb4ae0c653645cf5253b90019e9fc73f5 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 29 Apr 2016 09:06:15 +0200 Subject: libxcb: add missing dependencies --- var/spack/repos/builtin/packages/libxcb/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index d7d94c4546..b2543be5da 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -13,6 +13,7 @@ class Libxcb(Package): version('1.11.1', '118623c15a96b08622603a71d8789bf3') depends_on("python") depends_on("xcb-proto") + depends_on("pkg-config") # depends_on('pthread') # Ubuntu: apt-get install libpthread-stubs0-dev # depends_on('xau') # Ubuntu: apt-get install libxau-dev -- cgit v1.2.3-70-g09d2 From 3ad71700dd61d41841a581dc4f59f390dfd112b6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 29 Apr 2016 09:52:49 +0200 Subject: the_silver_searcher: add missing dependency --- var/spack/repos/builtin/packages/the_silver_searcher/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/the_silver_searcher/package.py b/var/spack/repos/builtin/packages/the_silver_searcher/package.py index e4020b6766..30f06354bf 100644 --- a/var/spack/repos/builtin/packages/the_silver_searcher/package.py +++ b/var/spack/repos/builtin/packages/the_silver_searcher/package.py @@ -9,6 +9,7 @@ class TheSilverSearcher(Package): depends_on('pcre') depends_on('xz') + depends_on('pkg-config') def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 8fc43046ebfaa41410c28ba6d3d27fffed25ee4e Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sat, 30 Apr 2016 12:11:10 +0200 Subject: Add missing dependency for glm --- var/spack/repos/builtin/packages/glm/package.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/glm/package.py b/var/spack/repos/builtin/packages/glm/package.py index d00c301b4c..ecae89f1e8 100644 --- a/var/spack/repos/builtin/packages/glm/package.py +++ b/var/spack/repos/builtin/packages/glm/package.py @@ -11,6 +11,8 @@ class Glm(Package): url = "https://github.com/g-truc/glm/archive/0.9.7.1.tar.gz" version('0.9.7.1', '61af6639cdf652d1cdd7117190afced8') + + depends_on ("cmake") def install(self, spec, prefix): with working_dir('spack-build', create=True): -- cgit v1.2.3-70-g09d2 From a588a1fd84869a593903747372a7a2484b80fd52 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Tue, 19 Apr 2016 13:51:46 -0500 Subject: openmp needs to be an option for clang build --- var/spack/repos/builtin/packages/fftw/package.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index bc129aaf1a..5ca6547c9f 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -42,7 +42,7 @@ class Fftw(Package): variant('float', default=True, description='Produces a single precision version of the library') variant('long_double', default=True, description='Produces a long double precision version of the library') variant('quad', default=False, description='Produces a quad precision version of the library (works only with GCC and libquadmath)') - + variant('openmp', default=True, description="Enable OpenMP support.") variant('mpi', default=False, description='Activate MPI support') depends_on('mpi', when='+mpi') @@ -52,8 +52,9 @@ class Fftw(Package): def install(self, spec, prefix): options = ['--prefix=%s' % prefix, '--enable-shared', - '--enable-threads', - '--enable-openmp'] + '--enable-threads'] + if '+openmp' in spec: + options.append('--enable-openmp') if not self.compiler.f77 or not self.compiler.fc: options.append("--disable-fortran") if '+mpi' in spec: -- cgit v1.2.3-70-g09d2 From f8c14e1d98fd7d0d3df0bf8693b93081bf4b70fc Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 20 Apr 2016 09:41:19 -0500 Subject: Make openmp variant false by default. --- var/spack/repos/builtin/packages/fftw/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 5ca6547c9f..e48e0dc46a 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -42,7 +42,7 @@ class Fftw(Package): variant('float', default=True, description='Produces a single precision version of the library') variant('long_double', default=True, description='Produces a long double precision version of the library') variant('quad', default=False, description='Produces a quad precision version of the library (works only with GCC and libquadmath)') - variant('openmp', default=True, description="Enable OpenMP support.") + variant('openmp', default=False, description="Enable OpenMP support.") variant('mpi', default=False, description='Activate MPI support') depends_on('mpi', when='+mpi') -- cgit v1.2.3-70-g09d2 From 83108f815ce09fa95e99e0ef747cf3cee50328b2 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Thu, 21 Apr 2016 09:59:37 -0500 Subject: Error out if +openmp used with OS X clang --- var/spack/repos/builtin/packages/fftw/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index e48e0dc46a..eb8f96cbac 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -53,7 +53,11 @@ class Fftw(Package): options = ['--prefix=%s' % prefix, '--enable-shared', '--enable-threads'] - if '+openmp' in spec: + # Add support for OpenMP + if '+openmp' in spec: + # Note: Apple's Clang does not support OpenMP. + if spec.satisfies('%clang'): + raise InstallError("Apple's clang does not support OpenMP") options.append('--enable-openmp') if not self.compiler.f77 or not self.compiler.fc: options.append("--disable-fortran") -- cgit v1.2.3-70-g09d2 From c33ffbae043dbc5b8f0dfe1b1e3d6532af20042e Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sat, 30 Apr 2016 21:58:39 +0200 Subject: Add extra dependencies for Paradiseo. --- var/spack/repos/builtin/packages/paradiseo/package.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/paradiseo/package.py b/var/spack/repos/builtin/packages/paradiseo/package.py index c254234b32..34766099da 100644 --- a/var/spack/repos/builtin/packages/paradiseo/package.py +++ b/var/spack/repos/builtin/packages/paradiseo/package.py @@ -20,15 +20,20 @@ class Paradiseo(Package): #variant('tests', default=False, description='Compile with build tests') #variant('doc', default=False, description='Compile with documentation') variant('debug', default=False, description='Builds a debug version of the libraries') + variant('openmp', default=False, description='Enable OpenMP support') + variant('gnuplot', default=False, description='Enable GnuPlot support') # Required dependencies depends_on ("cmake") - depends_on ("eigen") # Optional dependencies depends_on ("mpi", when="+mpi") depends_on ("doxygen", when='+doc') - + depends_on ("gnuplot", when='+gnuplot') + depends_on ("eigen", when='+edo') + depends_on ("boost~mpi", when='+edo~mpi') + depends_on ("boost+mpi", when='+edo+mpi') + # Patches patch('enable_eoserial.patch') patch('fix_osx_detection.patch') @@ -45,7 +50,9 @@ class Paradiseo(Package): '-DMPI:BOOL=%s' % ('TRUE' if '+mpi' in spec else 'FALSE'), '-DSMP:BOOL=%s' % ('TRUE' if '+smp' in spec else 'FALSE'), # Note: This requires a C++11 compatible compiler '-DEDO:BOOL=%s' % ('TRUE' if '+edo' in spec else 'FALSE'), - '-DENABLE_CMAKE_TESTING:BOOL=%s' % ('TRUE' if '+tests' in spec else 'FALSE') + '-DENABLE_CMAKE_TESTING:BOOL=%s' % ('TRUE' if '+tests' in spec else 'FALSE'), + '-DENABLE_OPENMP:BOOL=%s' % ('TRUE' if '+openmp' in spec else 'FALSE'), + '-DENABLE_GNUPLOT:BOOL=%s' % ('TRUE' if '+gnuplot' in spec else 'FALSE') ]) with working_dir('spack-build', create=True): -- cgit v1.2.3-70-g09d2 From 631e235ef3907916335f965fa179b94455295f31 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sun, 1 May 2016 11:05:51 +0200 Subject: Added Adol-C package --- var/spack/repos/builtin/packages/adol-c/package.py | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 var/spack/repos/builtin/packages/adol-c/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py new file mode 100644 index 0000000000..a65ec7dd7c --- /dev/null +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -0,0 +1,69 @@ +from spack import * +import sys + +class AdolC(Package): + """A package for the automatic differentiation of first and higher derivatives of vector functions in C and C++ programs by operator overloading.""" + homepage = "https://projects.coin-or.org/ADOL-C" + url = "http://www.coin-or.org/download/source/ADOL-C/ADOL-C-2.6.1.tgz" + + version('head', svn='https://projects.coin-or.org/svn/ADOL-C/trunk/') + version('2.6.1', '1032b28427d6e399af4610e78c0f087b') + + variant('doc', default=True, description='Install documentation') + variant('openmp', default=False, description='Enable OpenMP support') + variant('sparse', default=False, description='Enable sparse drivers') + variant('tests', default=True, description='Build all included examples as a test case') + + def install(self, spec, prefix): + make_args = ['--prefix=%s' % prefix] + + # --with-cflags=FLAGS use CFLAGS=FLAGS (default: -O3 -Wall -ansi) + # --with-cxxflags=FLAGS use CXXFLAGS=FLAGS (default: -O3 -Wall) + + if '+openmp' in spec: + make_args.extend([ + '--with-openmp-flag=-fopenmp' # FIXME: Is this required? -I -L + ]) + + if '+sparse' in spec: + make_args.extend([ + '--enable-sparse' + ]) + + # We can simply use the bundled examples to check + # whether Adol-C works as expected + if '+tests' in spec: + make_args.extend([ + '--enable-docexa', # Documeted examples + '--enable-addexa' # Additional examples + ]) + if '+openmp' in spec: + make_args.extend([ + '--enable-parexa' # Parallel examples + ]) + + configure(*make_args) + make() + make("install") + + # Copy the config.h file, as some packages might require it + source_directory = self.stage.source_path + config_h = join_path(source_directory,'ADOL-C/src/config.h') + install(config_h, join_path(prefix.include,'adolc')) + + # Install documentation to {prefix}/share + if '+doc' in spec: + install_tree('ADOL-C/doc',join_path(prefix.share,'doc')) + + # Install examples to {prefix}/share + if '+tests' in spec: + install_tree('ADOL-C/examples',join_path(prefix.share,'examples')) + + # Run some examples that don't require user input + # TODO: Check that bundled examples produce the correct results + with working_dir(join_path(source_directory,'ADOL-C/examples')): + Executable('tapeless_scalar') + Executable('tapeless_vector') + + with working_dir(join_path(source_directory,'ADOL-C/examples/additional_examples')): + Executable('checkpointing/checkpointing') -- cgit v1.2.3-70-g09d2 From 5ae727668235f8a226cdac9e714d9daa004af64c Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Mon, 2 May 2016 11:01:14 +0200 Subject: Fixes to installation with OpenMP (tested) and execution of test-suite --- .../builtin/packages/adol-c/openmp_exam.patch | 13 +++++++++ var/spack/repos/builtin/packages/adol-c/package.py | 33 ++++++++++++++-------- 2 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 var/spack/repos/builtin/packages/adol-c/openmp_exam.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/adol-c/openmp_exam.patch b/var/spack/repos/builtin/packages/adol-c/openmp_exam.patch new file mode 100644 index 0000000000..8e21c72d92 --- /dev/null +++ b/var/spack/repos/builtin/packages/adol-c/openmp_exam.patch @@ -0,0 +1,13 @@ +diff --git a/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp b/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp +index fc6fc28..14103d2 100644 +--- a/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp ++++ b/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp +@@ -27,7 +27,7 @@ using namespace std; + #include + #include + +-#include "adolc.h" ++#include + + #ifdef _OPENMP + #include diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py index a65ec7dd7c..70933542ca 100644 --- a/var/spack/repos/builtin/packages/adol-c/package.py +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -13,6 +13,8 @@ class AdolC(Package): variant('openmp', default=False, description='Enable OpenMP support') variant('sparse', default=False, description='Enable sparse drivers') variant('tests', default=True, description='Build all included examples as a test case') + + patch('openmp_exam.patch') def install(self, spec, prefix): make_args = ['--prefix=%s' % prefix] @@ -21,9 +23,12 @@ class AdolC(Package): # --with-cxxflags=FLAGS use CXXFLAGS=FLAGS (default: -O3 -Wall) if '+openmp' in spec: - make_args.extend([ - '--with-openmp-flag=-fopenmp' # FIXME: Is this required? -I -L - ]) + if spec.satisfies('%gcc'): + make_args.extend([ + '--with-openmp-flag=-fopenmp' # FIXME: Is this required? -I -L + ]) + else: + raise InstallError("OpenMP flags for compilers other than GCC are not implemented.") if '+sparse' in spec: make_args.extend([ @@ -48,22 +53,28 @@ class AdolC(Package): # Copy the config.h file, as some packages might require it source_directory = self.stage.source_path - config_h = join_path(source_directory,'ADOL-C/src/config.h') + config_h = join_path(source_directory,'ADOL-C','src','config.h') install(config_h, join_path(prefix.include,'adolc')) # Install documentation to {prefix}/share if '+doc' in spec: - install_tree('ADOL-C/doc',join_path(prefix.share,'doc')) + install_tree(join_path('ADOL-C','doc'), + join_path(prefix.share,'doc')) # Install examples to {prefix}/share if '+tests' in spec: - install_tree('ADOL-C/examples',join_path(prefix.share,'examples')) + install_tree(join_path('ADOL-C','examples'), + join_path(prefix.share,'examples')) # Run some examples that don't require user input # TODO: Check that bundled examples produce the correct results - with working_dir(join_path(source_directory,'ADOL-C/examples')): - Executable('tapeless_scalar') - Executable('tapeless_vector') + with working_dir(join_path(source_directory,'ADOL-C','examples')): + Executable('./tapeless_scalar')() + Executable('./tapeless_vector')() - with working_dir(join_path(source_directory,'ADOL-C/examples/additional_examples')): - Executable('checkpointing/checkpointing') + with working_dir(join_path(source_directory,'ADOL-C','examples','additional_examples')): + Executable('./checkpointing/checkpointing')() + + if '+openmp' in spec: + with working_dir(join_path(source_directory,'ADOL-C','examples','additional_examples')): + Executable('./checkpointing/checkpointing')() -- cgit v1.2.3-70-g09d2 From e111add17f885866e997e7483a0ac32235d9c497 Mon Sep 17 00:00:00 2001 From: Vishal Boddu Date: Mon, 2 May 2016 14:31:02 +0200 Subject: missing dependencies (m4) added for netcdf and autoconf --- var/spack/repos/builtin/packages/autoconf/package.py | 2 ++ var/spack/repos/builtin/packages/netcdf/package.py | 1 + 2 files changed, 3 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py index 6412e810a6..b5e29b8a27 100644 --- a/var/spack/repos/builtin/packages/autoconf/package.py +++ b/var/spack/repos/builtin/packages/autoconf/package.py @@ -8,6 +8,8 @@ class Autoconf(Package): version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b') version('2.62', '6c1f3b3734999035d77da5024aab4fbd') + depends_on("m4") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index b60a2c4e9a..a4d9e5213c 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -21,6 +21,7 @@ class Netcdf(Package): depends_on("hdf5+mpi~cxx", when='+mpi') # required for NetCDF-4 support depends_on("hdf5~mpi", when='~mpi') # required for NetCDF-4 support depends_on("zlib") # required for NetCDF-4 support + depends_on("m4") def install(self, spec, prefix): # Environment variables -- cgit v1.2.3-70-g09d2 From b99c8b641a6c370ddbe8cbf78bc8339dbb3d8598 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 20 Apr 2016 10:46:09 -0500 Subject: Add hydra package --- var/spack/repos/builtin/packages/hydra/package.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/hydra/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hydra/package.py b/var/spack/repos/builtin/packages/hydra/package.py new file mode 100644 index 0000000000..c1b8868276 --- /dev/null +++ b/var/spack/repos/builtin/packages/hydra/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Hydra(Package): + """Hydra is a process management system for starting parallel jobs. + Hydra is designed to natively work with existing launcher daemons + (such as ssh, rsh, fork), as well as natively integrate with resource + management systems (such as slurm, pbs, sge).""" + + homepage = "http://www.mpich.org" + url = "http://www.mpich.org/static/downloads/3.2/hydra-3.2.tar.gz" + list_url = "http://www.mpich.org/static/downloads/" + list_depth = 2 + + version('3.2', '4d670916695bf7e3a869cc336a881b39') + + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") -- cgit v1.2.3-70-g09d2 From c110865bf258b67d745b31a526dcb9b348fd9893 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 21 Apr 2016 15:53:44 -0500 Subject: Remove OpenMPI dependency on hwloc --- var/spack/repos/builtin/packages/openmpi/package.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 9a127f1812..3cb9b0be21 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -1,7 +1,5 @@ -import os - from spack import * - +import os class Openmpi(Package): """Open MPI is a project combining technologies and resources from @@ -36,7 +34,6 @@ class Openmpi(Package): provides('mpi@:2.2', when='@1.6.5') provides('mpi@:3.0', when='@1.7.5:') - depends_on('hwloc') def url_for_version(self, version): return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) @@ -51,7 +48,6 @@ class Openmpi(Package): def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, - "--with-hwloc=%s" % spec['hwloc'].prefix, "--enable-shared", "--enable-static"] -- cgit v1.2.3-70-g09d2 From 4e2154e58fef151f22c6e77a923c7cc76b18517b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 18 Apr 2016 16:27:07 -0500 Subject: Add argcomplete python package --- var/spack/repos/builtin/packages/py-argcomplete/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-argcomplete/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-argcomplete/package.py b/var/spack/repos/builtin/packages/py-argcomplete/package.py new file mode 100644 index 0000000000..c94ef7238b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-argcomplete/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyArgcomplete(Package): + """Bash tab completion for argparse.""" + + homepage = "https://pypi.python.org/pypi/argcomplete" + url = "https://pypi.python.org/packages/source/a/argcomplete/argcomplete-1.1.1.tar.gz" + + version('1.1.1', '89a3839096c9f991ad33828e72d21abf') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 9c3d8dae574560f805f430b042b16821fabcf4ed Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 18 Apr 2016 14:54:38 -0500 Subject: Add latest jpeg version --- var/spack/repos/builtin/packages/jpeg/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/jpeg/package.py b/var/spack/repos/builtin/packages/jpeg/package.py index 87820467db..2f15e59ad4 100644 --- a/var/spack/repos/builtin/packages/jpeg/package.py +++ b/var/spack/repos/builtin/packages/jpeg/package.py @@ -1,14 +1,19 @@ from spack import * class Jpeg(Package): - """jpeg library""" + """libjpeg is a widely used free library with functions for handling the + JPEG image data format. It implements a JPEG codec (encoding and decoding) + alongside various utilities for handling JPEG data.""" + homepage = "http://www.ijg.org" - url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz" + url = "http://www.ijg.org/files/jpegsrc.v9b.tar.gz" + version('9b', '6a9996ce116ec5c52b4870dbcd6d3ddb') version('9a', '3353992aecaee1805ef4109aadd433e7') def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() + make("test") make("install") -- cgit v1.2.3-70-g09d2 From 61e5ee5d6368a829f6dd32bca6ca3f97625177aa Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 31 Mar 2016 14:14:44 -0500 Subject: Prevent use of system GTK+ --- var/spack/repos/builtin/packages/qt/package.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 93688fb777..ac68b5792e 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -101,7 +101,7 @@ class Qt(Package): @property def common_config_args(self): - return [ + config_args = [ '-prefix', self.prefix, '-v', '-opensource', @@ -115,7 +115,16 @@ class Qt(Package): '-no-openvg', '-no-pch', # NIS is deprecated in more recent glibc - '-no-nis'] + '-no-nis' + ] + + if '+gtk' in self.spec: + config_args.append('-gtkstyle') + else: + config_args.append('-no-gtkstyle') + + return config_args + # Don't disable all the database drivers, but should # really get them into spack at some point. @@ -128,8 +137,8 @@ class Qt(Package): '-thread', '-shared', '-release', - '-fast' - ) + '-fast', + *self.common_config_args) @when('@4') def configure(self): -- cgit v1.2.3-70-g09d2 From 17fa1b5007355e0c0453b2f6d0213f81586b1756 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 31 Mar 2016 14:21:34 -0500 Subject: Un-fix version 3 --- var/spack/repos/builtin/packages/qt/package.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index ac68b5792e..1e1d6302f3 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -137,8 +137,7 @@ class Qt(Package): '-thread', '-shared', '-release', - '-fast', - *self.common_config_args) + '-fast') @when('@4') def configure(self): -- cgit v1.2.3-70-g09d2 From cde1d183994363cbb70a72bd180999a0ce151e16 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 30 Apr 2016 17:53:17 +0200 Subject: dealii: add new dependency -- gsl --- var/spack/repos/builtin/packages/dealii/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 674fe3150a..f0e9b8f967 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -12,6 +12,7 @@ class Dealii(Package): variant('mpi', default=True, description='Compile with MPI') variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') variant('doc', default=False, description='Compile with documentation') + variant('gsl' , default=True, description='Compile with GSL') variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') variant('metis', default=True, description='Compile with Metis') variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') @@ -39,6 +40,8 @@ class Dealii(Package): depends_on ("mpi", when="+mpi") depends_on ("arpack-ng+mpi", when='+arpack+mpi') depends_on ("doxygen", when='+doc') + depends_on ("gsl", when='@8.5.0:+gsl') + depends_on ("gsl", when='@dev+gsl') depends_on ("hdf5+mpi~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why? depends_on ("metis@5:", when='+metis') depends_on ("netcdf+mpi", when="+netcdf+mpi") @@ -100,7 +103,7 @@ class Dealii(Package): ]) # Optional dependencies for which librariy names are the same as CMake variables - for library in ('hdf5', 'p4est','petsc', 'slepc','trilinos','metis'): + for library in ('gsl','hdf5','p4est','petsc','slepc','trilinos','metis'): if library in spec: options.extend([ '-D{library}_DIR={value}'.format(library=library.upper(), value=spec[library].prefix), -- cgit v1.2.3-70-g09d2 From 2eb4248f90650f83b7fca7587d59e8fc16bb5305 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 2 May 2016 18:52:44 +0200 Subject: dealii: fix a bug where P4EST_DIR was unconditionally requested --- var/spack/repos/builtin/packages/dealii/package.py | 1 - 1 file changed, 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index f0e9b8f967..df8330384d 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -83,7 +83,6 @@ class Dealii(Package): (join_path(spec['lapack'].prefix.lib,'liblapack.%s' % dsuf), # FIXME don't hardcode names join_path(spec['blas'].prefix.lib,'libblas.%s' % dsuf)), # FIXME don't hardcode names '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, - '-DP4EST_DIR=%s' % spec['p4est'].prefix, '-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix, '-DTBB_DIR=%s' % spec['tbb'].prefix, '-DZLIB_DIR=%s' % spec['zlib'].prefix -- cgit v1.2.3-70-g09d2 From 179d308fe06c30b184f37ae91c5bcf1fc77bb536 Mon Sep 17 00:00:00 2001 From: David Poliakoff Date: Mon, 2 May 2016 14:32:57 -0700 Subject: Added a package for the RAJA system --- var/spack/repos/builtin/packages/raja/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 var/spack/repos/builtin/packages/raja/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py new file mode 100644 index 0000000000..f807ab71af --- /dev/null +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -0,0 +1,12 @@ +from spack import * + +class Raja(Package): + """RAJA Parallel Framework.""" + homepage = "http://software.llnl.gov/RAJA/" + + version('git', git='https://github.com/LLNL/RAJA.git', branch="master") + + def install(self, spec, prefix): + cmake('.',*std_cmake_args) + make() + make('install') -- cgit v1.2.3-70-g09d2 From afef04bb54c6a9db37f84d6babe077ee2e862c84 Mon Sep 17 00:00:00 2001 From: David Poliakoff Date: Mon, 2 May 2016 15:49:37 -0700 Subject: Added cnmem package` --- var/spack/repos/builtin/packages/cnmem/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cnmem/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cnmem/package.py b/var/spack/repos/builtin/packages/cnmem/package.py new file mode 100644 index 0000000000..f65838d195 --- /dev/null +++ b/var/spack/repos/builtin/packages/cnmem/package.py @@ -0,0 +1,12 @@ +from spack import * + +class Cnmem(Package): + """RAJA Parallel Framework.""" + homepage = "https://github.com/NVIDIA/cnmem" + + version('git', git='https://github.com/NVIDIA/cnmem.git', branch="master") + + def install(self, spec, prefix): + cmake('.',*std_cmake_args) + make() + make('install') -- cgit v1.2.3-70-g09d2 From e74cc0df275cb7d7b31f5744f3a72b6b65685613 Mon Sep 17 00:00:00 2001 From: David Poliakoff Date: Mon, 2 May 2016 15:53:43 -0700 Subject: Updated docstring --- var/spack/repos/builtin/packages/cnmem/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cnmem/package.py b/var/spack/repos/builtin/packages/cnmem/package.py index f65838d195..0a83e8fc20 100644 --- a/var/spack/repos/builtin/packages/cnmem/package.py +++ b/var/spack/repos/builtin/packages/cnmem/package.py @@ -1,7 +1,7 @@ from spack import * class Cnmem(Package): - """RAJA Parallel Framework.""" + """CNMem mempool for CUDA devices""" homepage = "https://github.com/NVIDIA/cnmem" version('git', git='https://github.com/NVIDIA/cnmem.git', branch="master") -- cgit v1.2.3-70-g09d2 From 89621faaea762538bbfa26bd54baff49539b8f47 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 2 May 2016 20:21:03 -0600 Subject: + Add version 5.0 download for SuperLU_DIST. --- var/spack/repos/builtin/packages/superlu-dist/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 5cf5e129b4..b4c0759d7c 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -6,6 +6,7 @@ class SuperluDist(Package): homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/" url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz" + version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670') version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae') version('4.2', 'ae9fafae161f775fbac6eba11e530a65') version('4.1', '4edee38cc29f687bd0c8eb361096a455') -- cgit v1.2.3-70-g09d2 From 98f8192bde22ad973d126de677566a3f9852a64a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 15:15:55 +0200 Subject: libtool: add a missing dependency --- var/spack/repos/builtin/packages/libtool/package.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index 82a54953b2..c804f5ab5d 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -8,6 +8,8 @@ class Libtool(Package): version('2.4.6' , 'addf44b646ddb4e3919805aa88fa7c5e') version('2.4.2' , 'd2f3b7d4627e69e13514a40e72a24d50') + depends_on('m4') + def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 0583bc98598d5c868e7ca402cbdf80bb4557c8cf Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 16:20:38 +0200 Subject: p4est: put back +tests variant --- var/spack/repos/builtin/packages/p4est/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index 017c4e3fbf..c059632079 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -7,6 +7,8 @@ class P4est(Package): version('1.1', '37ba7f4410958cfb38a2140339dbf64f') + variant('tests', default=True, description='Run small tests') + # build dependencies depends_on('automake') depends_on('autoconf') @@ -33,5 +35,11 @@ class P4est(Package): configure('--prefix=%s' % prefix, *options) make() - make("check") + # Make tests optional as sometimes mpiexec can't be run with an error: + # mpiexec has detected an attempt to run as root. + # Running at root is *strongly* discouraged as any mistake (e.g., in + # defining TMPDIR) or bug can result in catastrophic damage to the OS + # file system, leaving your system in an unusable state. + if '+tests' in self.spec: + make("check") make("install") -- cgit v1.2.3-70-g09d2 From 40d578be958b7bc0269f2f6f92cc2b6e70a43353 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 3 May 2016 10:38:05 -0400 Subject: Disable OpenBLAS's overriding of our "make -jN" option --- .../repos/builtin/packages/openblas/make.patch | 35 ++++++++++++++++++++++ .../repos/builtin/packages/openblas/package.py | 4 ++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/openblas/make.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openblas/make.patch b/var/spack/repos/builtin/packages/openblas/make.patch new file mode 100644 index 0000000000..851214211a --- /dev/null +++ b/var/spack/repos/builtin/packages/openblas/make.patch @@ -0,0 +1,35 @@ +diff --git a/Makefile.system b/Makefile.system +index b89f60e..2dbdad0 100644 +--- a/Makefile.system ++++ b/Makefile.system +@@ -139,6 +139,10 @@ NO_PARALLEL_MAKE=0 + endif + GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE) + ++ifdef MAKE_NO_J ++GETARCH_FLAGS += -DMAKE_NO_J=$(MAKE_NO_J) ++endif ++ + ifdef MAKE_NB_JOBS + GETARCH_FLAGS += -DMAKE_NB_JOBS=$(MAKE_NB_JOBS) + endif +diff --git a/getarch.c b/getarch.c +index f9c49e6..dffad70 100644 +--- a/getarch.c ++++ b/getarch.c +@@ -1012,6 +1012,7 @@ int main(int argc, char *argv[]){ + #endif + #endif + ++#ifndef MAKE_NO_J + #ifdef MAKE_NB_JOBS + printf("MAKE += -j %d\n", MAKE_NB_JOBS); + #elif NO_PARALLEL_MAKE==1 +@@ -1021,6 +1022,7 @@ int main(int argc, char *argv[]){ + printf("MAKE += -j %d\n", get_num_cores()); + #endif + #endif ++#endif + + break; + diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 61250fb310..14d4c89b19 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -19,13 +19,15 @@ class Openblas(Package): provides('blas') provides('lapack') + patch('make.patch') def install(self, spec, prefix): # Openblas is picky about compilers. Configure fails with # FC=/abs/path/to/f77, whereas FC=f77 works fine. # To circumvent this, provide basename only: make_defs = ['CC=%s' % os.path.basename(spack_cc), - 'FC=%s' % os.path.basename(spack_f77)] + 'FC=%s' % os.path.basename(spack_f77), + 'MAKE_NO_J=1'] make_targets = ['libs', 'netlib'] -- cgit v1.2.3-70-g09d2 From 51c6867f72e91bb061e8bd021b64fa12706c0f33 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 10:30:35 -0500 Subject: Re-add hwloc as a dependency of openmpi --- var/spack/repos/builtin/packages/openmpi/package.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 3cb9b0be21..74f0a7bfd1 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -34,6 +34,8 @@ class Openmpi(Package): provides('mpi@:2.2', when='@1.6.5') provides('mpi@:3.0', when='@1.7.5:') + depends_on('hwloc') + def url_for_version(self, version): return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) @@ -48,6 +50,7 @@ class Openmpi(Package): def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, + "--with-hwloc=%s" % spec['hwloc'].prefix, "--enable-shared", "--enable-static"] -- cgit v1.2.3-70-g09d2 From f4260da1c262731f9287db4f972e7eae6399135d Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 3 May 2016 12:05:35 -0600 Subject: Mark SuperLU_DIST version 4.3 as the preferred version since petsc and trilinos are not tested with 5.0. --- var/spack/repos/builtin/packages/superlu-dist/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index b4c0759d7c..3420d9b90a 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -7,7 +7,8 @@ class SuperluDist(Package): url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz" version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670') - version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae') + # default to version 4.3 since petsc and trilinos are not tested with 5.0. + version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae', preferred=True) version('4.2', 'ae9fafae161f775fbac6eba11e530a65') version('4.1', '4edee38cc29f687bd0c8eb361096a455') version('4.0', 'c0b98b611df227ae050bc1635c6940e0') -- cgit v1.2.3-70-g09d2 From eaa45d8a9a8cd26379ea7bd3bcee99cbab08d9e7 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 13:28:38 -0500 Subject: Remove hdf5 ~cxx constraint on netcdf --- var/spack/repos/builtin/packages/netcdf/package.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index a4d9e5213c..4aad0f6f3c 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -12,16 +12,19 @@ class Netcdf(Package): version('4.4.0', 'cffda0cbd97fdb3a06e9274f7aef438e') version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae') - variant('mpi', default=True, description='Enables MPI parallelism') - variant('hdf4', default=False, description="Enable HDF4 support") + variant('mpi', default=True, description='Enables MPI parallelism') + variant('hdf4', default=False, description='Enable HDF4 support') - # Dependencies: - depends_on("curl") # required for DAP support - depends_on("hdf", when='+hdf4') - depends_on("hdf5+mpi~cxx", when='+mpi') # required for NetCDF-4 support - depends_on("hdf5~mpi", when='~mpi') # required for NetCDF-4 support - depends_on("zlib") # required for NetCDF-4 support depends_on("m4") + depends_on("hdf", when='+hdf4') + + # Required for DAP support + depends_on("curl") + + # Required for NetCDF-4 support + depends_on("zlib") + depends_on("hdf5+mpi", when='+mpi') + depends_on("hdf5~mpi", when='~mpi') def install(self, spec, prefix): # Environment variables @@ -49,7 +52,7 @@ class Netcdf(Package): # /usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0' LIBS.append("-lcurl") CPPFLAGS.append("-I%s" % spec['curl'].prefix.include) - LDFLAGS.append ("-L%s" % spec['curl'].prefix.lib) + LDFLAGS.append( "-L%s" % spec['curl'].prefix.lib) if '+mpi' in spec: config_args.append('--enable-parallel4') -- cgit v1.2.3-70-g09d2 From a3d2d0cd22efef3fa24fce3a92b579d8cc938805 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 15:44:23 -0500 Subject: Add latest OpenSSL versions --- var/spack/repos/builtin/packages/openssl/package.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 9e3109bfed..d0c95731a2 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -15,10 +15,12 @@ class Openssl(Package): version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') version('1.0.1r', '1abd905e079542ccae948af37e393d28') + version('1.0.1t', '9837746fcf8a6727d46d22ca35953da1') version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a') version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5') version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d') version('1.0.2g', 'f3c710c045cdee5fd114feb69feba7aa') + version('1.0.2h', '9392e65072ce4b614c1392eefc1f23d0') depends_on("zlib") parallel = False -- cgit v1.2.3-70-g09d2 From 88fa9084e2846008238a3136933a16d0ab6b413c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 15:58:14 -0500 Subject: Add latest version of GCC --- var/spack/repos/builtin/packages/gcc/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 6043b62279..8f90757232 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -38,6 +38,7 @@ class Gcc(Package): list_url = 'http://open-source-box.org/gcc/' list_depth = 2 + version('6.1.0', '8fb6cb98b8459f5863328380fbf06bd1') version('5.3.0', 'c9616fd448f980259c31de613e575719') version('5.2.0', 'a51bcfeb3da7dd4c623e27207ed43467') version('4.9.3', '6f831b4d251872736e8e9cc09746f327') -- cgit v1.2.3-70-g09d2 From c3317819cb89abdcd9fe1cb9431436c4e4ef8702 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 4 May 2016 10:37:52 +0200 Subject: mpi: add self.spec.[mpicc|mpicxx|mpifc|mpif77] to avoid hardcoding MPI wrappers names --- lib/spack/docs/packaging_guide.rst | 17 +++++++++++++++++ var/spack/repos/builtin/packages/mpich/package.py | 5 +++++ var/spack/repos/builtin/packages/openmpi/package.py | 5 +++++ 3 files changed, 27 insertions(+) (limited to 'var') diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 519c0da232..34d11308f5 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1831,6 +1831,23 @@ successfully find ``libdwarf.h`` and ``libdwarf.so``, without the packager having to provide ``--with-libdwarf=/path/to/libdwarf`` on the command line. +Message Parsing Interface (MPI) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +It is common for high performance computing software/packages to use ``MPI``. +As a result of conretization, a given package can be built using different +implementations of MPI such as ``Openmpi``, ``MPICH`` or ``IntelMPI``. +In some scenarios to configure a package one have to provide it with appropriate MPI +compiler wrappers such as ``mpicc``, ``mpic++``. +However different implementations of ``MPI`` may have different names for those +wrappers. In order to make package's ``install()`` method indifferent to the +choice ``MPI`` implementation, each package which implements ``MPI`` sets up +``self.spec.mpicc``, ``self.spec.mpicxx``, ``self.spec.mpifc`` and ``self.spec.mpif77`` +to point to ``C``, ``C++``, ``Fortran 90`` and ``Fortran 77`` ``MPI`` wrappers. +Package developers are advised to use these variables, for example ``self.spec['mpi'].mpicc`` +instead of hard-coding ``join_path(self.spec['mpi'].prefix.bin, 'mpicc')`` for +the reasons outlined above. + + Forking ``install()`` ~~~~~~~~~~~~~~~~~~~~~ diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index b317ec6651..aaa6386df7 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -54,6 +54,11 @@ class Mpich(Package): spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') + def setup_dependent_package(self, module, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" # FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers? diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 3cb9b0be21..89a21e869c 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -45,6 +45,11 @@ class Openmpi(Package): spack_env.set('OMPI_FC', spack_fc) spack_env.set('OMPI_F77', spack_f77) + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') + def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, -- cgit v1.2.3-70-g09d2 From f417b1cf904d99b4fb81ab31ec3ddd6da362d286 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 4 May 2016 11:01:52 +0200 Subject: p4est: use mpicc,mpicxx,mpifc,mpif77 compiler variables instead of hardcoding names --- var/spack/repos/builtin/packages/p4est/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index 017c4e3fbf..5b2474a067 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -24,10 +24,10 @@ class P4est(Package): '--without-blas', 'CPPFLAGS=-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL', 'CFLAGS=-O2', - 'CC=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # TODO: use ENV variables or MPI class wrappers - 'CXX=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), - 'FC=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - 'F77=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif77'), + 'CC=%s' % self.spec['mpi'].mpicc, + 'CXX=%s' % self.spec['mpi'].mpicxx, + 'FC=%s' % self.spec['mpi'].mpifc, + 'F77=%s' % self.spec['mpi'].mpif77 ] configure('--prefix=%s' % prefix, *options) -- cgit v1.2.3-70-g09d2 From 7eb463a66e600e7a4d9692610763bfffbe9ac64a Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 4 May 2016 15:05:56 +0200 Subject: only fail when it is apples clang --- var/spack/repos/builtin/packages/fftw/package.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index eb8f96cbac..008939ece8 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -57,6 +57,8 @@ class Fftw(Package): if '+openmp' in spec: # Note: Apple's Clang does not support OpenMP. if spec.satisfies('%clang'): + ver = '%s' % self.compiler.version + if ver.endswith('-apple'): raise InstallError("Apple's clang does not support OpenMP") options.append('--enable-openmp') if not self.compiler.f77 or not self.compiler.fc: -- cgit v1.2.3-70-g09d2 From 796bf5f85cd22039f6131b15d401ef4a82bf7f86 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 4 May 2016 17:33:19 +0200 Subject: mvapich2: add self.spec.[mpicc|mpicxx|mpifc|mpif77] --- var/spack/repos/builtin/packages/mvapich2/package.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 3e60b517db..3d4f2d0c68 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -146,6 +146,10 @@ class Mvapich2(Package): spack_env.set('MPICH_F77', spack_f77) spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') def install(self, spec, prefix): # we'll set different configure flags depending on our environment -- cgit v1.2.3-70-g09d2 From bfe009f98d8f468c839ed75f12d881c246dd2ceb Mon Sep 17 00:00:00 2001 From: "Robert.French" Date: Wed, 4 May 2016 15:26:10 +0000 Subject: Subversion uses serf for http repos Add Scons package Add serf package Subversion uses serf for http repos --- var/spack/repos/builtin/packages/scons/package.py | 13 ++++++ var/spack/repos/builtin/packages/serf/package.py | 51 ++++++++++++++++++++++ .../repos/builtin/packages/subversion/package.py | 2 + 3 files changed, 66 insertions(+) create mode 100644 var/spack/repos/builtin/packages/scons/package.py create mode 100644 var/spack/repos/builtin/packages/serf/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/scons/package.py b/var/spack/repos/builtin/packages/scons/package.py new file mode 100644 index 0000000000..594aeced88 --- /dev/null +++ b/var/spack/repos/builtin/packages/scons/package.py @@ -0,0 +1,13 @@ +from spack import * + +class Scons(Package): + """SCons is a software construction tool""" + homepage = "http://scons.org" + url = "http://downloads.sourceforge.net/project/scons/scons/2.5.0/scons-2.5.0.tar.gz" + + version('2.5.0', '9e00fa0df8f5ca5c5f5975b40e0ed354') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py new file mode 100644 index 0000000000..a5c9057b99 --- /dev/null +++ b/var/spack/repos/builtin/packages/serf/package.py @@ -0,0 +1,51 @@ +############################################################################## +# 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 Serf(Package): + """Apache Serf - a high performance C-based HTTP client library built upon the Apache Portable Runtime (APR) library""" + homepage = 'https://serf.apache.org/' + url = 'https://archive.apache.org/dist/serf/serf-1.3.8.tar.bz2' + + version('1.3.8', '1d45425ca324336ce2f4ae7d7b4cfbc5567c5446') + + depends_on('apr') + depends_on('apr-util') + depends_on('scons') + depends_on('expat') + depends_on('openssl') + + def install(self, spec, prefix): + scons = which("scons") + + options = ['PREFIX=%s' % prefix] + options.append('APR=%s' % spec['apr'].prefix) + options.append('APU=%s' % spec['apr-util'].prefix) + options.append('OPENSSL=%s' % spec['openssl'].prefix) + options.append('LINKFLAGS=-L%s/lib' % spec['expat'].prefix) + options.append('CPPFLAGS=-I%s/include' % spec['expat'].prefix) + + scons(*options) + scons('install') diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py index 5db1c3eb92..04cde94aad 100644 --- a/var/spack/repos/builtin/packages/subversion/package.py +++ b/var/spack/repos/builtin/packages/subversion/package.py @@ -37,6 +37,7 @@ class Subversion(Package): depends_on('apr-util') depends_on('zlib') depends_on('sqlite') + depends_on('serf') # Optional: We need swig if we want the Perl, Python or Ruby # bindings. @@ -54,6 +55,7 @@ class Subversion(Package): options.append('--with-apr-util=%s' % spec['apr-util'].prefix) options.append('--with-zlib=%s' % spec['zlib'].prefix) options.append('--with-sqlite=%s' % spec['sqlite'].prefix) + options.append('--with-serf=%s' % spec['serf'].prefix) #options.append('--with-swig=%s' % spec['swig'].prefix) configure(*options) -- cgit v1.2.3-70-g09d2 From 67d64b804f5b08bc9e4493efd25ab549333e550e Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 4 May 2016 23:53:10 +0200 Subject: more succinctly --- var/spack/repos/builtin/packages/fftw/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 008939ece8..4ffc787594 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -57,7 +57,7 @@ class Fftw(Package): if '+openmp' in spec: # Note: Apple's Clang does not support OpenMP. if spec.satisfies('%clang'): - ver = '%s' % self.compiler.version + ver = str(self.compiler.version) if ver.endswith('-apple'): raise InstallError("Apple's clang does not support OpenMP") options.append('--enable-openmp') -- cgit v1.2.3-70-g09d2 From 32f7b06a36e99e2fbfc56147b3c4803fa2946838 Mon Sep 17 00:00:00 2001 From: Dhanannjay 'Djay' Deo Date: Wed, 4 May 2016 18:14:38 -0400 Subject: Add version 2.10.2 --- var/spack/repos/builtin/packages/visit/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index 9b21370fa3..716cd2c101 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -7,6 +7,7 @@ class Visit(Package): url = "http://portal.nersc.gov/project/visit/releases/2.10.1/visit2.10.1.tar.gz" version('2.10.1', '3cbca162fdb0249f17c4456605c4211e') + version('2.10.2', '253de0837a9d69fb689befc98ea4d068') depends_on("vtk@6.1.0~opengl2") depends_on("qt@4.8.6") -- cgit v1.2.3-70-g09d2 From 514a8c737a69f8176ccd5531a87b5042ff847ddc Mon Sep 17 00:00:00 2001 From: Greg Lee Date: Wed, 4 May 2016 16:38:43 -0700 Subject: added git commit for clang support --- var/spack/repos/builtin/packages/mrnet/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index a3abb71285..b52233be4a 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -6,6 +6,7 @@ class Mrnet(Package): url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_5.0.1.tar.gz" list_url = "http://ftp.cs.wisc.edu/paradyn/mrnet" + version('5.0.1-2', git='https://github.com/dyninst/mrnet.git', commit='20b1eacfc6d680d9f6472146d2dfaa0f900cc2e9') version('5.0.1', '17f65738cf1b9f9b95647ff85f69ecdd') version('4.1.0', '5a248298b395b329e2371bf25366115c') version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') -- cgit v1.2.3-70-g09d2 From 27de2a42d9d3b0f572c37a6ce1612b7df9855240 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 4 May 2016 20:27:58 -0400 Subject: Update Flex to 2.6.0 --- var/spack/repos/builtin/packages/flex/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index b065904912..e4795893e0 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -6,6 +6,7 @@ class Flex(Package): homepage = "http://flex.sourceforge.net/" url = "http://download.sourceforge.net/flex/flex-2.5.39.tar.gz" + version('2.6.0', '5724bcffed4ebe39e9b55a9be80859ec') version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 1785de0f3152a7d853425f07c236faf60eb91e0e Mon Sep 17 00:00:00 2001 From: Dhanannjay 'Djay' Deo Date: Wed, 4 May 2016 22:08:01 -0400 Subject: remove hdf5 which is silo actually a silo dependency --- var/spack/repos/builtin/packages/visit/package.py | 1 - 1 file changed, 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index 716cd2c101..91ffd4c045 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -12,7 +12,6 @@ class Visit(Package): depends_on("vtk@6.1.0~opengl2") depends_on("qt@4.8.6") depends_on("python") - depends_on("hdf5") # silo seems to need it depends_on("silo+shared") def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 45e77e7739e3e96b776eb0691daa5cfaaa9e26ce Mon Sep 17 00:00:00 2001 From: Dhanannjay 'Djay' Deo Date: Wed, 4 May 2016 22:49:47 -0400 Subject: Correctly extend std_cmake_args --- var/spack/repos/builtin/packages/visit/package.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index 91ffd4c045..14e3b6a0c1 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -18,13 +18,12 @@ class Visit(Package): with working_dir('spack-build', create=True): feature_args = std_cmake_args[:] - feature_args = ["-DVTK_MAJOR_VERSION=6", - "-DVTK_MINOR_VERSION=1", - "-DCMAKE_INSTALL_PREFIX:PATH=%s" % spec.prefix, - "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, - "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin, - "-DVISIT_SILO_DIR:PATH=%s" % spec['silo'].prefix, - "-DVISIT_HDF5_DIR:PATH=%s" % spec['hdf5'].prefix] + feature_args.extend(["-DVTK_MAJOR_VERSION=6", + "-DVTK_MINOR_VERSION=1", + "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, + "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin, + "-DVISIT_SILO_DIR:PATH=%s" % spec['silo'].prefix, + "-DVISIT_HDF5_DIR:PATH=%s" % spec['hdf5'].prefix]) cmake('../src', *feature_args) -- cgit v1.2.3-70-g09d2 From ef202fbe0ca1f23ca7f0ea271d45cee8a0623e4e Mon Sep 17 00:00:00 2001 From: Dhanannjay 'Djay' Deo Date: Wed, 4 May 2016 22:50:15 -0400 Subject: Build static and shared libraries for silo --- var/spack/repos/builtin/packages/silo/package.py | 1 - 1 file changed, 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 638a894b7b..7e68663c6e 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -24,7 +24,6 @@ class Silo(Package): '--enable-fortran' if '+fortran' in spec else '--disable-fortran', '--enable-silex' if '+silex' in spec else '--disable-silex', '--enable-shared' if '+shared' in spec else '--disable-shared', - '--disable-static' if '+shared' in spec else '--enable-static', ] if '+silex' in spec: -- cgit v1.2.3-70-g09d2 From b12fb7ebc845313d404e4448c145cda4e00517f3 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 5 May 2016 10:24:32 +0200 Subject: mpi: move mpicc/mpicxx/mpifc/mpif77 to setup_dependent_package() --- var/spack/repos/builtin/packages/mpich/package.py | 2 +- var/spack/repos/builtin/packages/mvapich2/package.py | 2 ++ var/spack/repos/builtin/packages/openmpi/package.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index aaa6386df7..4b84f44bd7 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -54,12 +54,12 @@ class Mpich(Package): spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + def setup_dependent_package(self, module, dep_spec): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') - def setup_dependent_package(self, module, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" # FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers? module.mpicc = join_path(self.prefix.bin, 'mpicc') diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 3d4f2d0c68..c68a04d251 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -146,6 +146,8 @@ class Mvapich2(Package): spack_env.set('MPICH_F77', spack_f77) spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + + def setup_dependent_package(self, module, dep_spec): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 89a21e869c..92a5018886 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -45,6 +45,7 @@ class Openmpi(Package): spack_env.set('OMPI_FC', spack_fc) spack_env.set('OMPI_F77', spack_f77) + def setup_dependent_package(self, module, dep_spec): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') -- cgit v1.2.3-70-g09d2 From c3bc4d6195a7f84525f117acfb68e2df5149d1ff Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 5 May 2016 10:28:04 +0200 Subject: mpich: remove module.mpicc as no formula is using it and it is a duplicate of self.spec.mpicc --- var/spack/repos/builtin/packages/mpich/package.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 4b84f44bd7..5d68f20351 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -60,10 +60,6 @@ class Mpich(Package): self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') - """For dependencies, make mpicc's use spack wrapper.""" - # FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers? - module.mpicc = join_path(self.prefix.bin, 'mpicc') - def install(self, spec, prefix): config_args = ["--prefix=" + prefix, "--enable-shared"] -- cgit v1.2.3-70-g09d2 From 18d2b28c498026828aab4fc2ece62b2e062d74c2 Mon Sep 17 00:00:00 2001 From: "Robert D. French" Date: Thu, 5 May 2016 10:38:35 -0400 Subject: Build and install BBCP Build and install BBCP Use correct destination for install --- var/spack/repos/builtin/packages/bbcp/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/bbcp/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/bbcp/package.py b/var/spack/repos/builtin/packages/bbcp/package.py new file mode 100644 index 0000000000..e9baa5ccf4 --- /dev/null +++ b/var/spack/repos/builtin/packages/bbcp/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Bbcp(Package): + """Securely and quickly copy data from source to target""" + homepage = "http://www.slac.stanford.edu/~abh/bbcp/" + + version('git', git='http://www.slac.stanford.edu/~abh/bbcp/bbcp.git', branch="master") + + def install(self, spec, prefix): + cd("src") + make() + # BBCP wants to build the executable in a directory whose name depends on the system type + makesname = Executable("../MakeSname") + bbcp_executable_path = "../bin/%s/bbcp" % makesname(output=str).rstrip("\n") + destination_path = "%s/bin/" % prefix + mkdirp(destination_path) + install(bbcp_executable_path, destination_path) -- cgit v1.2.3-70-g09d2 From 1203a14563ff8589a65def3bd99dc6a9cc399e92 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 5 May 2016 14:01:21 -0500 Subject: Remove tutorial comments --- var/spack/repos/builtin/packages/xerces-c/package.py | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index e36fb936e0..bd02ddcd4b 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/package.py @@ -1,19 +1,3 @@ -# 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): -- cgit v1.2.3-70-g09d2 From db80c5e97e7fc95b08e4a38cb88ec598c2939e2c Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 5 May 2016 21:11:54 -0400 Subject: Disable -Werror This leads to problems if new compiler versions report new kinds of warnings. --- var/spack/repos/builtin/packages/binutils/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index b8064093d2..158d722046 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -29,6 +29,7 @@ class Binutils(Package): configure_args = [ '--prefix=%s' % prefix, '--disable-dependency-tracking', + '--disable-werror', '--enable-interwork', '--enable-multilib', '--enable-shared', -- cgit v1.2.3-70-g09d2 From 9f212e72014e6397215bf7695695c59c710b516d Mon Sep 17 00:00:00 2001 From: "Tanzima Z. Islam" Date: Fri, 6 May 2016 13:50:34 -0700 Subject: Adding a new package file for Kripke --- var/spack/repos/builtin/packages/kripke/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/kripke/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py new file mode 100644 index 0000000000..68ccc4cb6c --- /dev/null +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Kripke(Package): + """Kripke is a simple, scalable, 3D Sn deterministic particle transport code.""" + + homepage = "https://codesign.llnl.gov/kripke.php" + url = "" + #version('master', git='https://lc.llnl.gov/stash/scm/kripke/kripke.git') + version('master', git='https://lc.llnl.gov/stash/scm/~islam3/kripke.git') + + def install(self, spec, prefix): + with working_dir('build', create=True): + cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', '-DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain/chaos_5_x86_64_ib-ic15.cmake', '-DENABLE_OPENMP=1', '..', *std_cmake_args) + make() + make("install") + -- cgit v1.2.3-70-g09d2 From 7bf724b1d3c92073543e8e3e72cfbf788531d401 Mon Sep 17 00:00:00 2001 From: "Cecilia W. Castillo" Date: Fri, 6 May 2016 14:14:13 -0700 Subject: add support for crypto version 5.6.1 --- var/spack/repos/builtin/packages/cryptopp/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py index bc83cb2b65..c2778e14da 100644 --- a/var/spack/repos/builtin/packages/cryptopp/package.py +++ b/var/spack/repos/builtin/packages/cryptopp/package.py @@ -13,6 +13,7 @@ class Cryptopp(Package): version('5.6.3', '3c5b70e2ec98b7a24988734446242d07') version('5.6.2', '7ed022585698df48e65ce9218f6c6a67') + version('5.6.1', '96cbeba0907562b077e26bcffb483828') def install(self, spec, prefix): make() -- cgit v1.2.3-70-g09d2 From c82db2116b6a1945f21d636d2981427a3bb957fe Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Fri, 6 May 2016 17:13:09 -0400 Subject: nco: Added new package --- var/spack/repos/builtin/packages/antlr/package.py | 47 +++++++++++++++++++++++ var/spack/repos/builtin/packages/nco/package.py | 30 +++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 var/spack/repos/builtin/packages/antlr/package.py create mode 100644 var/spack/repos/builtin/packages/nco/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/antlr/package.py b/var/spack/repos/builtin/packages/antlr/package.py new file mode 100644 index 0000000000..c7c7e3e850 --- /dev/null +++ b/var/spack/repos/builtin/packages/antlr/package.py @@ -0,0 +1,47 @@ +from spack import * + +class Antlr(Package): + + homepage = "http://www.antlr.org" + url = "https://github.com/antlr/antlr/tarball/v2.7.7" + + # NOTE: This requires that a system Java be available. + # Spack does not yet know how to install Java compilers + + # Notes from http://nco.sourceforge.net/#bld + # The first steps to build (i.e., compile, for the most part) NCO from + # source code are to install the pre-requisites: ANTLR version 2.7.7 + # (like this one not version 3.x or 4.x!) (required for ncap2)... ANTLR + # binaries from major distributions are pre-built with the source patch + # necessary to allow NCO to link to ANTLR... The ANTLR source file + # CharScanner.hpp must include this line: #include or else + # ncap2 will not compile (this tarball is already patched). + version('2.7.7', '914865e853fe8e1e61a9f23d045cb4ab', + # Patched version as described above + url='http://dust.ess.uci.edu/tmp/antlr-2.7.7.tar.gz') + # Unpatched version + # url='http://dust.ess.uci.edu/nco/antlr-2.7.7.tar.gz') + + variant('cxx', default=False, description='Enable ANTLR for C++') + variant('java', default=False, description='Enable ANTLR for Java') + variant('python', default=False, description='Enable ANTLR for Python') + variant('csharp', default=False, description='Enable ANTLR for Csharp') + + + def install(self, spec, prefix): + # Check for future enabling of variants + for v in ('+java', '+python', '+csharp'): + if v in spec: + raise Error('Illegal variant %s; for now, Spack only knows how to build antlr or antlr+cxx') + + config_args = [ + '--prefix=%s' % prefix, + '--%s-cxx' % ('enable' if '+cxx' in spec else 'disable'), + '--%s-java' % ('enable' if '+java' in spec else 'disable'), + '--%s-python' % ('enable' if '+python' in spec else 'disable'), + '--%s-csharp' % ('enable' if '+csharp' in spec else 'disable')] + + # which('autoreconf')('-iv') + configure(*config_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py new file mode 100644 index 0000000000..3a9aeaa656 --- /dev/null +++ b/var/spack/repos/builtin/packages/nco/package.py @@ -0,0 +1,30 @@ +from spack import * +import os + +class Nco(Package): + """The NCO toolkit manipulates and analyzes data stored in + netCDF-accessible formats""" + + homepage = "https://sourceforge.net/projects/nco" + url = "https://github.com/nco/nco/archive/4.5.5.tar.gz" + + version('4.5.5', '9f1f1cb149ad6407c5a03c20122223ce') + + # See "Compilation Requirements" at: + # http://nco.sourceforge.net/#bld + + depends_on('netcdf') + depends_on('antlr@2.7.7+cxx') # (required for ncap2) + depends_on('gsl') # (desirable for ncap2) + depends_on('udunits2') # (allows dimensional unit transformations) + # depends_on('opendap') # (enables network transparency), + + def install(self, spec, prefix): + opts = [ + '--prefix=%s' % prefix, + '--disable-openmp', # TODO: Make this a variant + '--disable-dap', # TODO: Make this a variant + '--disable-esmf'] + configure(*opts) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 86449790fe66f07239cd552f1ce579bf341bd1f4 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 6 May 2016 15:15:40 -0700 Subject: add pmi support and process managers to the MPIs --- var/spack/repos/builtin/packages/mpich/package.py | 4 ++++ var/spack/repos/builtin/packages/openmpi/package.py | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 5d68f20351..2179086fe5 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -43,6 +43,8 @@ class Mpich(Package): version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') variant('verbs', default=False, description='Build support for OpenFabrics verbs.') + variant('pmi', default=True, description='Build with PMI support') + variant('hydra', default=True, description='Build the hydra process manager') provides('mpi@:3.0', when='@3:') provides('mpi@:1.3', when='@1:') @@ -62,6 +64,8 @@ class Mpich(Package): def install(self, spec, prefix): config_args = ["--prefix=" + prefix, + "--with-pmi=" + ("yes" if '+pmi' in spec else 'no'), + "--with-pm=" + ('hydra' if '+hydra' in spec else 'no'), "--enable-shared"] # Variants diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 776fb6eeaa..d0dd2d657f 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -26,6 +26,7 @@ class Openmpi(Package): patch('configure.patch', when="@1.10.0:1.10.1") variant('psm', default=False, description='Build support for the PSM library.') + variant('pmi', default=True, description='Build support for PMI-based launchers') variant('verbs', default=False, description='Build support for OpenFabrics verbs.') # TODO : variant support for other schedulers is missing @@ -67,6 +68,9 @@ class Openmpi(Package): if '+psm' in spec: config_args.append("--with-psm") + if '+pmi' in spec: + config_args.append("--with-pmi") #TODO: let user specify directory when possible + if '+verbs' in spec: # Up through version 1.6, this option was previously named --with-openib if spec.satisfies('@:1.6'): -- cgit v1.2.3-70-g09d2 From 22afc6dadd81db12262571bddad6256c2900db64 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 6 May 2016 15:33:26 -0700 Subject: pile of dependencies for neovim, including luajit and libuv --- var/spack/repos/builtin/packages/LuaJIT/package.py | 15 +++++++++++++++ .../repos/builtin/packages/libtermkey/package.py | 17 +++++++++++++++++ var/spack/repos/builtin/packages/libuv/package.py | 21 +++++++++++++++++++++ .../repos/builtin/packages/libvterm/package.py | 12 ++++++++++++ .../repos/builtin/packages/msgpack-c/package.py | 14 ++++++++++++++ .../repos/builtin/packages/unibilium/package.py | 12 ++++++++++++ 6 files changed, 91 insertions(+) create mode 100644 var/spack/repos/builtin/packages/LuaJIT/package.py create mode 100644 var/spack/repos/builtin/packages/libtermkey/package.py create mode 100644 var/spack/repos/builtin/packages/libuv/package.py create mode 100644 var/spack/repos/builtin/packages/libvterm/package.py create mode 100644 var/spack/repos/builtin/packages/msgpack-c/package.py create mode 100644 var/spack/repos/builtin/packages/unibilium/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/LuaJIT/package.py b/var/spack/repos/builtin/packages/LuaJIT/package.py new file mode 100644 index 0000000000..7b2a269212 --- /dev/null +++ b/var/spack/repos/builtin/packages/LuaJIT/package.py @@ -0,0 +1,15 @@ +import os +from spack import * + +class Luajit(Package): + """Flast flexible JITed lua""" + homepage = "http://www.luajit.org" + url = "http://luajit.org/download/LuaJIT-2.0.4.tar.gz" + + version('2.0.4', 'dd9c38307f2223a504cbfb96e477eca0') + + def install(self, spec, prefix): + # Linking with the C++ compiler is a dirty hack to deal with the fact + # that unwinding symbols are not included by libc, this is necessary + # on some platforms for the final link stage to work + make("install", "PREFIX=" + prefix, "TARGET_LD=" + os.environ['CXX']) diff --git a/var/spack/repos/builtin/packages/libtermkey/package.py b/var/spack/repos/builtin/packages/libtermkey/package.py new file mode 100644 index 0000000000..7f25edaf76 --- /dev/null +++ b/var/spack/repos/builtin/packages/libtermkey/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Libtermkey(Package): + """Easy keyboard entry processing for terminal programs""" + homepage = "http://www.leonerd.org.uk/code/libtermkey/" + url = "http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.18.tar.gz" + + version('0.18' , '3be2e3e5a851a49cc5e8567ac108b520') + version('0.17' , '20edb99e0d95ec1690fe90e6a555ae6d') + version('0.16' , '7a24b675aaeb142d30db28e7554987d4') + version('0.15b', '27689756e6c86c56ae454f2ac259bc3d') + version('0.14' , 'e08ce30f440f9715c459060e0e048978') + + + def install(self, spec, prefix): + make() + make("install", "PREFIX=" + prefix) diff --git a/var/spack/repos/builtin/packages/libuv/package.py b/var/spack/repos/builtin/packages/libuv/package.py new file mode 100644 index 0000000000..eace94d1a6 --- /dev/null +++ b/var/spack/repos/builtin/packages/libuv/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Libuv(Package): + """Multi-platform library with a focus on asynchronous IO""" + homepage = "http://libuv.org" + url = "https://github.com/libuv/libuv/archive/v1.9.0.tar.gz" + + version('1.9.0', '14737f9c76123a19a290dabb7d1cd04c') + + depends_on('automake') + depends_on('autoconf') + depends_on('libtool') + + def install(self, spec, prefix): + bash = which("bash") + bash('autogen.sh') + configure('--prefix=%s' % prefix) + + make() + make("check") + make("install") diff --git a/var/spack/repos/builtin/packages/libvterm/package.py b/var/spack/repos/builtin/packages/libvterm/package.py new file mode 100644 index 0000000000..3212f6550d --- /dev/null +++ b/var/spack/repos/builtin/packages/libvterm/package.py @@ -0,0 +1,12 @@ +from spack import * + +class Libvterm(Package): + """An abstract library implementation of a terminal emulator""" + homepage = "http://www.leonerd.org.uk/code/libvterm/" + url = "http://www.leonerd.org.uk/code/libvterm/libvterm-0+bzr681.tar.gz" + + version('681', '7a4325a7350b7092245c04e8ee185ac3') + + def install(self, spec, prefix): + make() + make("install", "PREFIX=" + prefix) diff --git a/var/spack/repos/builtin/packages/msgpack-c/package.py b/var/spack/repos/builtin/packages/msgpack-c/package.py new file mode 100644 index 0000000000..a363bc89be --- /dev/null +++ b/var/spack/repos/builtin/packages/msgpack-c/package.py @@ -0,0 +1,14 @@ +from spack import * + +class MsgpackC(Package): + """A small, fast binary interchange format convertible to/from JSON""" + homepage = "http://www.msgpack.org" + url = "https://github.com/msgpack/msgpack-c/archive/cpp-1.4.1.tar.gz" + + version('1.4.1', 'e2fd3a7419b9bc49e5017fdbefab87e0') + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/unibilium/package.py b/var/spack/repos/builtin/packages/unibilium/package.py new file mode 100644 index 0000000000..ef5de56f79 --- /dev/null +++ b/var/spack/repos/builtin/packages/unibilium/package.py @@ -0,0 +1,12 @@ +from spack import * + +class Unibilium(Package): + """A terminfo parsing library""" + homepage = "https://github.com/mauke/unibilium" + url = "https://github.com/mauke/unibilium/archive/v1.2.0.tar.gz" + + version('1.2.0', '9b1c97839a880a373da6c097443b43c4') + + def install(self, spec, prefix): + make("PREFIX="+prefix) + make("install", "PREFIX="+prefix) -- cgit v1.2.3-70-g09d2 From 72b91758c9537009de967cfe560c2a510b9c2795 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 20 Apr 2016 10:06:49 +0200 Subject: openblas: raise an error when using +openmp with clang; set +openmp to false by default --- var/spack/repos/builtin/packages/openblas/package.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 99649da9ca..14f0395c4b 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -8,13 +8,14 @@ class Openblas(Package): homepage = "http://www.openblas.net" url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz" + version('0.2.18', '805e7f660877d588ea7e3792cda2ee65') version('0.2.17', '664a12807f2a2a7cda4781e3ab2ae0e1') version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc') version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') - variant('shared', default=True, description="Build shared libraries as well as static libs.") - variant('openmp', default=True, description="Enable OpenMP support.") - variant('fpic', default=True, description="Build position independent code") + variant('shared', default=True, description="Build shared libraries as well as static libs.") + variant('openmp', default=False, description="Enable OpenMP support.") + variant('fpic', default=True, description="Build position independent code") # virtual dependency provides('blas') @@ -45,8 +46,13 @@ class Openblas(Package): make_defs += ['BUILD_LAPACK_DEPRECATED=1'] # Add support for OpenMP - # Note: Make sure your compiler supports OpenMP if '+openmp' in spec: + # Note: Apple's most recent Clang 7.3.0 still does not support OpenMP. + # What is worse, Openblas (as of 0.2.18) hardcoded that OpenMP cannot + # be used with any (!) compiler named clang, bummer. + if spec.satisfies('%clang'): + raise InstallError('OpenBLAS does not support OpenMP with clang!') + make_defs += ['USE_OPENMP=1'] make_args = make_defs + make_targets -- cgit v1.2.3-70-g09d2 From 95c7f4fba3477240c03019414923537b1da1a364 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sun, 8 May 2016 16:53:31 +0200 Subject: Fixes #915 --- var/spack/repos/builtin/packages/gmsh/package.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py index 9d759303cb..eb2981bba2 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -62,6 +62,9 @@ class Gmsh(Package): build_directory = join_path(self.stage.path, 'spack-build') source_directory = self.stage.source_path + + # Prevent GMsh from using its own strange directory structure on OSX + options.append('-DENABLE_OS_SPECIFIC_INSTALL=OFF') if '+shared' in spec: options.extend(['-DENABLE_BUILD_SHARED:BOOL=ON', -- cgit v1.2.3-70-g09d2 From 6e07f46df89ef272357a2aa42bfaf4c4d60e0dfe Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Mon, 9 May 2016 14:02:41 +0200 Subject: add missing m4 dependency to bison --- var/spack/repos/builtin/packages/bison/package.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index 7c526fb958..9a2ddcbf96 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -10,6 +10,8 @@ class Bison(Package): version('3.0.4', 'a586e11cd4aff49c3ff6d3b6a4c9ccf8') + depends_on("m4") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 970196d825237b96fdf27ecdbeb07bcf49580fff Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Mon, 9 May 2016 14:23:07 +0200 Subject: GMsh: Fix binary linking against its own libraries GMsh binary now links against full path name of libraries. This fixes problems, such as `dyld: Library not loaded: libGmsh.2.11.dylib`, when running the executable. --- var/spack/repos/builtin/packages/gmsh/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py index eb2981bba2..5f659c56df 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -62,7 +62,9 @@ class Gmsh(Package): build_directory = join_path(self.stage.path, 'spack-build') source_directory = self.stage.source_path - + + options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) + # Prevent GMsh from using its own strange directory structure on OSX options.append('-DENABLE_OS_SPECIFIC_INSTALL=OFF') -- cgit v1.2.3-70-g09d2 From 3948b082ad7f5eecc3b1078a2944f226a9a7ae87 Mon Sep 17 00:00:00 2001 From: Ben Couturier Date: Mon, 9 May 2016 22:32:46 +0200 Subject: Added gdb 7.11 --- var/spack/repos/builtin/packages/gdb/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py index b346fe80c2..0e9e8fc099 100644 --- a/var/spack/repos/builtin/packages/gdb/package.py +++ b/var/spack/repos/builtin/packages/gdb/package.py @@ -34,6 +34,7 @@ class Gdb(Package): homepage = "https://www.gnu.org/software/gdb" url = "http://ftp.gnu.org/gnu/gdb/gdb-7.10.tar.gz" + version('7.11', 'f585059252836a981ea5db9a5f8ce97f') version('7.10.1', 'b93a2721393e5fa226375b42d567d90b') version('7.10', 'fa6827ad0fd2be1daa418abb11a54d86') version('7.9.1', 'f3b97de919a9dba84490b2e076ec4cb0') -- cgit v1.2.3-70-g09d2 From 7e6be184bc51060a3df79e35991a6018149e439f Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Fri, 22 Apr 2016 14:50:19 -0700 Subject: Updated and fixed the Scotch package. - Fixed a bug that was causing shared library usage to fail when linking with another application. - Updated the repository URL to allow for more general version downloading. - Added installation support for version 5.1.10b. - Cleaned up the installation file to make it a bit easier to follow and modify. --- var/spack/repos/builtin/packages/scotch/package.py | 118 +++++++++++---------- 1 file changed, 61 insertions(+), 57 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 8229ed8686..6f8c8d2706 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -4,85 +4,90 @@ import os class Scotch(Package): """Scotch is a software package for graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering.""" + homepage = "http://www.labri.fr/perso/pelegrin/scotch/" - url = "http://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz" + url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.3.tar.gz" list_url = "http://gforge.inria.fr/frs/?group_id=248" version('6.0.3', '10b0cc0f184de2de99859eafaca83cfc') + version('5.1.10b', '9b8622b39c141ecaca4a46298486fd99') 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') + depends_on('mpi', when='+mpi') + depends_on('zlib', when='+compression') - def compiler_specifics(self, makefile_inc, defines): - if self.compiler.name == 'gcc': - defines.append('-Drestrict=__restrict') - elif self.compiler.name == 'intel': - defines.append('-restrict') + def validate(self, spec): + # NOTE : Scotch v6.0.0 and older have separate tar files for their esmumps- + # compatible versions. In any normal circumstance, it would be better just + # to use these tar files since they're more comprehensive, but they + # unfortunately have very strange URLs that are non-uniform. For the time + # being, I'm going to just use the '~esmumps' URLs that are uniform for + # the sake of simplicity. + if spec.satisfies('@:6.0.0') and '+esmumps' in spec: + raise RuntimeError('The "+esmumps" variant is only supported for Scotch v6.0.1+.') - makefile_inc.append('CCS = $(CC)') + def patch(self): + makefile_inc = [] + cflags = [ + '-O3', + '-DCOMMON_RANDOM_FIXED_SEED', + '-DSCOTCH_DETERMINISTIC', + '-DSCOTCH_RENAME', + '-DIDXSIZE64' + ] - if '+mpi' in self.spec: + ## Library Build Type ## + + if '+shared' in self.spec: makefile_inc.extend([ - 'CCP = %s' % os.path.join(self.spec['mpi'].prefix.bin, 'mpicc'), - 'CCD = $(CCP)' - ]) + 'LIB = .so', + 'CLIBFLAGS = -shared -fPIC', + 'RANLIB = echo', + 'AR = $(CC)', + 'ARFLAGS = -shared $(LDFLAGS) -o' + ]) + cflags.append('-fPIC') else: makefile_inc.extend([ - 'CCP = mpicc', # It is set but not used - 'CCD = $(CCS)' - ]) + 'LIB = .a', + 'CLIBFLAGS = ', + 'RANLIB = ranlib', + 'AR = ar', + 'ARFLAGS = -ruv ' + ]) + ## Compiler-Specific Options ## + if self.compiler.name == 'gcc': + cflags.append('-Drestrict=__restrict') + elif self.compiler.name == 'intel': + cflags.append('-restrict') - def library_build_type(self, makefile_inc, defines): - makefile_inc.extend([ - 'LIB = .a', - 'CLIBFLAGS = ', - 'RANLIB = ranlib', - 'AR = ar', - 'ARFLAGS = -ruv ' - ]) + makefile_inc.append('CCS = $(CC)') + makefile_inc.append('CCP = %s' % + (os.path.join(self.spec['mpi'].prefix.bin, 'mpicc') if '+mpi' in self.spec else 'mpicc')) + makefile_inc.append('CCD = $(CCS)') - @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' - ]) + ## Extra Features ## - def extra_features(self, makefile_inc, defines): ldflags = [] - + if '+compression' in self.spec: - defines.append('-DCOMMON_FILE_COMPRESS_GZ') + cflags.append('-DCOMMON_FILE_COMPRESS_GZ') ldflags.append('-L%s -lz' % (self.spec['zlib'].prefix.lib)) - defines.append('-DCOMMON_PTHREAD') + cflags.append('-DCOMMON_PTHREAD') ldflags.append('-lm -lrt -pthread') - - makefile_inc.append('LDFLAGS = %s' % ' '.join(ldflags)) - def patch(self): - makefile_inc = [] - defines = [ - '-DCOMMON_RANDOM_FIXED_SEED', - '-DSCOTCH_DETERMINISTIC', - '-DSCOTCH_RENAME', - '-DIDXSIZE64' ] + makefile_inc.append('LDFLAGS = %s' % ' '.join(ldflags)) - self.library_build_type(makefile_inc, defines) - self.compiler_specifics(makefile_inc, defines) - self.extra_features(makefile_inc, defines) + ## General Features ## makefile_inc.extend([ 'EXE =', @@ -93,18 +98,19 @@ class Scotch(Package): 'MKDIR = mkdir', 'MV = mv', 'CP = cp', - 'CFLAGS = -O3 %s' % (' '.join(defines)), + 'CFLAGS = %s' % ' '.join(cflags), '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, - '' + 'prefix = %s' % self.prefix ]) with working_dir('src'): with open('Makefile.inc', 'w') as fh: fh.write('\n'.join(makefile_inc)) - + def install(self, spec, prefix): + self.validate(spec) + targets = ['scotch'] if '+mpi' in self.spec: targets.append('ptscotch') @@ -115,12 +121,10 @@ class Scotch(Package): targets.append('ptesmumps') with working_dir('src'): - for app in targets: - make(app, parallel=(not app=='ptesmumps')) + for target in targets: + make(target, parallel=(target!='ptesmumps')) - install_tree('bin', prefix.bin) install_tree('lib', prefix.lib) install_tree('include', prefix.include) install_tree('man/man1', prefix.share_man1) - -- cgit v1.2.3-70-g09d2 From 88d2f6b83a46edb407397193fe5294d1303070a0 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Fri, 29 Apr 2016 11:44:38 -0700 Subject: Enabled the '+esmumps' variant for 'scotch@:6.0.0'. Added support for 'scotch@6.0.0'. --- .../repos/builtin/packages/scotch/Makefile.esmumps | 5 ++ var/spack/repos/builtin/packages/scotch/package.py | 58 +++++++++++++++++----- 2 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 var/spack/repos/builtin/packages/scotch/Makefile.esmumps (limited to 'var') diff --git a/var/spack/repos/builtin/packages/scotch/Makefile.esmumps b/var/spack/repos/builtin/packages/scotch/Makefile.esmumps new file mode 100644 index 0000000000..4bfc760197 --- /dev/null +++ b/var/spack/repos/builtin/packages/scotch/Makefile.esmumps @@ -0,0 +1,5 @@ +esmumps : scotch + (cd esmumps ; $(MAKE) scotch && $(MAKE) install) + +ptesmumps : ptscotch + (cd esmumps ; $(MAKE) ptscotch && $(MAKE) ptinstall) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 6f8c8d2706..5820e826de 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -1,16 +1,18 @@ from spack import * -import os +import os, re class Scotch(Package): """Scotch is a software package for graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering.""" homepage = "http://www.labri.fr/perso/pelegrin/scotch/" - url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.3.tar.gz" + url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.3.tar.gz" + base_url = "http://gforge.inria.fr/frs/download.php/latestfile/298" list_url = "http://gforge.inria.fr/frs/?group_id=248" version('6.0.3', '10b0cc0f184de2de99859eafaca83cfc') - version('5.1.10b', '9b8622b39c141ecaca4a46298486fd99') + version('6.0.0', 'c50d6187462ba801f9a82133ee666e8e') + version('5.1.10b', 'f587201d6cf5cf63527182fbfba70753') variant('mpi', default=False, description='Activate the compilation of PT-Scotch') variant('compression', default=True, description='Activate the posibility to use compressed files') @@ -22,17 +24,47 @@ class Scotch(Package): depends_on('mpi', when='+mpi') depends_on('zlib', when='+compression') - def validate(self, spec): - # NOTE : Scotch v6.0.0 and older have separate tar files for their esmumps- - # compatible versions. In any normal circumstance, it would be better just - # to use these tar files since they're more comprehensive, but they - # unfortunately have very strange URLs that are non-uniform. For the time - # being, I'm going to just use the '~esmumps' URLs that are uniform for - # the sake of simplicity. - if spec.satisfies('@:6.0.0') and '+esmumps' in spec: - raise RuntimeError('The "+esmumps" variant is only supported for Scotch v6.0.1+.') + # NOTE: Versions of Scotch up to version 6.0.0 don't include support for + # building with 'esmumps' in their default packages. In order to enable + # support for this feature, we must grab the 'esmumps' enabled archives + # from the Scotch hosting site. These alternative archives include a strict + # superset of the behavior in their default counterparts, so we choose to + # always grab these versions for older Scotch versions for simplicity. + @when('@:6.0.0') + def url_for_version(self, version): + return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version) + + @when('@6.0.1:') + def url_for_version(self, version): + return super(Scotch, self).url_for_version(version) + + # NOTE: Several of the 'esmumps' enabled Scotch releases up to version 6.0.0 + # have broken build scripts that don't properly build 'esmumps' as a separate + # target, so we need a patch procedure to remove 'esmumps' from existing targets + # and to add it as a standalone target. + @when('@:6.0.0') + def patch(self): + makefile_path = os.path.join('src', 'Makefile') + with open(makefile_path, 'r') as makefile: + esmumps_enabled = any(re.search(r'^esmumps(\s*):(.*)$', line) for line in makefile.readlines()) + + if not esmumps_enabled: + mff = FileFilter(makefile_path) + mff.filter(r'^.*((esmumps)|(ptesmumps)).*(install).*$', '') + makefile_esmumps_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Makefile.esmumps') + with open(makefile_path, 'a') as makefile: + makefile.write('\ninclude %s\n' % makefile_esmumps_path) + + @when('@6.0.1:') def patch(self): + pass + + # NOTE: Configuration of Scotch is achieved by writing a 'Makefile.inc' file + # that contains all of the configuration variables and their desired values + # for the installation. This function writes this file based on the given + # installation variants. + def configure(self): makefile_inc = [] cflags = [ '-O3', @@ -109,7 +141,7 @@ class Scotch(Package): fh.write('\n'.join(makefile_inc)) def install(self, spec, prefix): - self.validate(spec) + self.configure() targets = ['scotch'] if '+mpi' in self.spec: -- cgit v1.2.3-70-g09d2 From ceab445b9fe371d50703c599ec2cf742f6199f41 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Mon, 9 May 2016 14:39:42 -0700 Subject: Integrated improvements from PR #893 to remove hardcoded MPI path. --- var/spack/repos/builtin/packages/scotch/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 5820e826de..8fad74b24f 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -103,7 +103,7 @@ class Scotch(Package): makefile_inc.append('CCS = $(CC)') makefile_inc.append('CCP = %s' % - (os.path.join(self.spec['mpi'].prefix.bin, 'mpicc') if '+mpi' in self.spec else 'mpicc')) + (self.spec['mpi'].mpicc if '+mpi' in self.spec else 'mpicc')) makefile_inc.append('CCD = $(CCS)') ## Extra Features ## -- cgit v1.2.3-70-g09d2 From 045e5bd4585fdf556651b9c71a0ca7428a27563c Mon Sep 17 00:00:00 2001 From: "Tanzima Z. Islam" Date: Mon, 9 May 2016 16:22:07 -0700 Subject: Adding a new package: Kripke from the public tar ball --- var/spack/repos/builtin/packages/kripke/package.py | 38 ++++++++++++++++------ 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py index 68ccc4cb6c..b6f4e4fd73 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -1,16 +1,34 @@ +# 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 kripke +# +# You can always get back here to change things with: +# +# spack edit kripke +# +# See the spack documentation for more information on building +# packages. +# from spack import * class Kripke(Package): - """Kripke is a simple, scalable, 3D Sn deterministic particle transport code.""" - + """Kripke is a simple, scalable, 3D Sn deterministic particle transport proxy/mini app.""" homepage = "https://codesign.llnl.gov/kripke.php" - url = "" - #version('master', git='https://lc.llnl.gov/stash/scm/kripke/kripke.git') - version('master', git='https://lc.llnl.gov/stash/scm/~islam3/kripke.git') + url = "https://codesign.llnl.gov/downloads/kripke-openmp-1.1.tar.gz" - def install(self, spec, prefix): - with working_dir('build', create=True): - cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', '-DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain/chaos_5_x86_64_ib-ic15.cmake', '-DENABLE_OPENMP=1', '..', *std_cmake_args) - make() - make("install") + version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf') + #depends_on("mvapich2@1.9:") + + def install(self, spec, prefix): + with working_dir('build', create=True): + cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', '-DENABLE_OPENMP=1', '-DENABLE_MPI=1', '..', *std_cmake_args) + make() + #Kripke does not provide an install, so creating one here. + mkdirp(prefix.bin) + install('kripke', prefix.bin) -- cgit v1.2.3-70-g09d2 From 23ec6c6bb031d48e64be07acd199b957ada774e8 Mon Sep 17 00:00:00 2001 From: "Tanzima Z. Islam" Date: Mon, 9 May 2016 16:34:27 -0700 Subject: Removed FIXME comments --- var/spack/repos/builtin/packages/kripke/package.py | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py index b6f4e4fd73..f7cc96053a 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -1,19 +1,3 @@ -# 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 kripke -# -# You can always get back here to change things with: -# -# spack edit kripke -# -# See the spack documentation for more information on building -# packages. -# from spack import * class Kripke(Package): -- cgit v1.2.3-70-g09d2 From 2e0ee5404d839a69c626407436c6cb059a51d9fd Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 9 May 2016 17:14:25 -0700 Subject: clean up Kripke package and dependencies. --- var/spack/repos/builtin/packages/kripke/package.py | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py index f7cc96053a..345b8af4d0 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -1,18 +1,28 @@ from spack import * class Kripke(Package): - """Kripke is a simple, scalable, 3D Sn deterministic particle transport proxy/mini app.""" + """Kripke is a simple, scalable, 3D Sn deterministic particle + transport proxy/mini app. + """ homepage = "https://codesign.llnl.gov/kripke.php" url = "https://codesign.llnl.gov/downloads/kripke-openmp-1.1.tar.gz" version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf') - #depends_on("mvapich2@1.9:") + variant('mpi', default=True, description='Enable MPI support') + + depends_on('mpi', when="+mpi") def install(self, spec, prefix): with working_dir('build', create=True): - cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', '-DENABLE_OPENMP=1', '-DENABLE_MPI=1', '..', *std_cmake_args) - make() - #Kripke does not provide an install, so creating one here. - mkdirp(prefix.bin) - install('kripke', prefix.bin) + cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', + '-DENABLE_OPENMP=1', + '-DENABLE_MPI=1', + '..', + *std_cmake_args) + make() + + # Kripke does not provide install target, so we have to copy + # things into place. + mkdirp(prefix.bin) + install('kripke', prefix.bin) -- cgit v1.2.3-70-g09d2 From b063ab42bff9a3382a6c79663d41d13a0c028c50 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 27 Apr 2016 11:57:48 +0200 Subject: openblas: fix and cleanup the unit test --- .../repos/builtin/packages/openblas/package.py | 68 +++++++++------------- .../builtin/packages/openblas/test_cblas_dgemm.c | 54 ++++++++++++++--- .../packages/openblas/test_cblas_dgemm.output | 3 + 3 files changed, 74 insertions(+), 51 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 99649da9ca..72b0b65a2f 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -88,48 +88,33 @@ class Openblas(Package): self.spec.lapack_shared_lib = self.spec.blas_shared_lib def check_install(self, spec): - "Build and run a small program to test that we have Lapack symbols" + # TODO: Pull this out to the framework function which recieves a pair of xyz.c and xyz.output print "Checking Openblas installation..." - checkdir = "spack-check" - with working_dir(checkdir, create=True): - source = r""" -#include -#include -int main(void) { -int i=0; -double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; -double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; -double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; -cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, - 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); -for (i = 0; i < 9; i++) - printf("%f\n", C[i]); -return 0; -} -""" - expected = """\ -11.000000 --9.000000 -5.000000 --9.000000 -21.000000 --1.000000 -5.000000 --1.000000 -3.000000 -""" - with open("check.c", 'w') as f: - f.write(source) - cc = which('cc') - # TODO: Automate these path and library settings - cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") - cc('-o', "check", "check.o", - "-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas", "-lpthread") - try: - check = Executable('./check') - output = check(return_output=True) - except: - output = "" + source_file = join_path(os.path.dirname(self.module.__file__), + 'test_cblas_dgemm.c') + output_file = join_path(os.path.dirname(self.module.__file__), + 'test_cblas_dgemm.output') + + with open(output_file, 'r') as f: + expected = f.read() + + cc = which('cc') + cc('-c', "-I%s" % join_path(spec.prefix, "include"), source_file) + link_flags = ["-L%s" % join_path(spec.prefix, "lib"), + "-llapack", + "-lblas", + "-lpthread" + ] + if '+openmp' in spec: + link_flags.extend([self.compiler.openmp_flag]) + cc('-o', "check", "test_cblas_dgemm.o", + *link_flags) + + try: + check = Executable('./check') + output = check(return_output=True) + except: + output = "" success = output == expected if not success: print "Produced output does not match expected output." @@ -142,4 +127,3 @@ return 0; print output print '-'*80 raise RuntimeError("Openblas install check failed") - shutil.rmtree(checkdir) diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c index 634e99d20b..3813a23b69 100644 --- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c @@ -1,13 +1,49 @@ #include #include + +double m[] = { + 3, 1, 3, + 1, 5, 9, + 2, 6, 5 +}; + +double x[] = { + -1, 3, -3 +}; + +#ifdef __cplusplus +extern "C" { +#endif + + void dgesv_(int *n, int *nrhs, double *a, int *lda, + int *ipivot, double *b, int *ldb, int *info); + +#ifdef __cplusplus +} +#endif + int main(void) { -int i=0; -double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; -double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; -double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; -cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, - 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); -for (i = 0; i < 9; i++) - printf("%f\n", C[i]); -return 0; + int i; + // blas: + double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; + cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, + 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); + for (i = 0; i < 9; i++) + printf("%f\n", C[i]); + + // lapack: + int ipiv[3]; + int j; + int info; + int n = 1; + int nrhs = 1; + int lda = 3; + int ldb = 3; + dgesv_(&n,&nrhs, &m[0], &lda, ipiv, &x[0], &ldb, &info); + for (i=0; i<3; ++i) + printf("%5.1f %3d\n", x[i], ipiv[i]); + + return 0; } diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output index b8316d7477..9c235e314f 100644 --- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output @@ -7,3 +7,6 @@ 5.000000 -1.000000 3.000000 + -0.3 1 + 3.0 1499101120 + -3.0 32767 -- cgit v1.2.3-70-g09d2 From e3115aa505b8fc68893e4ebeaf5e5f152507e693 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 May 2016 00:31:06 -0700 Subject: Kripke variants. --- var/spack/repos/builtin/packages/kripke/package.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py index 345b8af4d0..7d067ea44d 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -9,15 +9,19 @@ class Kripke(Package): version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf') - variant('mpi', default=True, description='Enable MPI support') + variant('mpi', default=True, description='Build with MPI.') + variant('openmp', default=True, description='Build with OpenMP enabled.') depends_on('mpi', when="+mpi") def install(self, spec, prefix): with working_dir('build', create=True): + def enabled(variant): + return (1 if variant in spec else 0) + cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', - '-DENABLE_OPENMP=1', - '-DENABLE_MPI=1', + '-DENABLE_OPENMP=%d' % enabled('+openmp'), + '-DENABLE_MPI=%d' % enabled('+mpi'), '..', *std_cmake_args) make() -- cgit v1.2.3-70-g09d2 From 0f427ed334f8a58e888872d60419709cfd6f41c3 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 May 2016 01:07:17 -0700 Subject: Tweak nccmp to be more spack-compatible. - Spack doesn't set F90, but it confuses the nccmp build. Just remove it from the environment. - TODO: should build environment unset this variable? --- var/spack/repos/builtin/packages/nccmp/package.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/nccmp/package.py b/var/spack/repos/builtin/packages/nccmp/package.py index 458afbb1e8..72e86831c6 100644 --- a/var/spack/repos/builtin/packages/nccmp/package.py +++ b/var/spack/repos/builtin/packages/nccmp/package.py @@ -1,5 +1,4 @@ from spack import * -import os class Nccmp(Package): """Compare NetCDF Files""" @@ -15,16 +14,10 @@ class Nccmp(Package): # FCFLAGS respectively in this configure, please unset # F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure # again. - os.environ['FC'] = os.environ['F90'] - del os.environ['F90'] - try: - os.environ['FCFLAGS'] = os.environ['F90FLAGS'] - del os.environ['F90FLAGS'] - except KeyError: # There are no flags - pass + env.pop('F90', None) + env.pop('F90FLAGS', None) configure('--prefix=%s' % prefix) - make() make("check") make("install") -- cgit v1.2.3-70-g09d2