summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/globalarrays/ibm-xl.patch250
-rw-r--r--var/spack/repos/builtin/packages/globalarrays/package.py74
2 files changed, 45 insertions, 279 deletions
diff --git a/var/spack/repos/builtin/packages/globalarrays/ibm-xl.patch b/var/spack/repos/builtin/packages/globalarrays/ibm-xl.patch
deleted file mode 100644
index 644e3a559a..0000000000
--- a/var/spack/repos/builtin/packages/globalarrays/ibm-xl.patch
+++ /dev/null
@@ -1,250 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 2022280..dac3b7f 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -174,6 +174,15 @@ option (F2C_HIDDEN_STRING_LENGTH_AFTER_ARGS "Set F77 macros" ON)
- if (ENABLE_FORTRAN)
- include( FortranCInterface )
- FortranCInterface_HEADER(${CMAKE_SOURCE_DIR}/f2c_cmake.h MACRO_NAMESPACE F77_FUNC_)
-+ add_custom_command(
-+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/f2c_cmake.fh
-+ COMMAND ${CMAKE_COMMAND} -D INPUT:PATH="${CMAKE_CURRENT_SOURCE_DIR}/f2c_cmake.h" -D OUTPUT:PATH="${CMAKE_CURRENT_SOURCE_DIR}/f2c_cmake.fh" -P ${PROJECT_SOURCE_DIR}/tools/f2c_cmake_fh_from_h.cmake DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/f2c_cmake.h
-+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/f2c_cmake.h
-+ )
-+ add_custom_target(
-+ GenerateF2c_cmakeFH ALL
-+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/f2c_cmake.fh
-+ )
- else()
- CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/cmake/f2c_dummy.h.in
- ${CMAKE_SOURCE_DIR}/f2c_cmake.h )
-@@ -336,6 +345,15 @@ if (ENABLE_FORTRAN)
- set (F77_IARGC IARGC)
- set (F77_FLUSH flush)
- set (HAVE_F77_FLUSH 1)
-+ elseif (CMAKE_Fortran_COMPILER MATCHES "xlf.*")
-+ message(STATUS "Using IBM XL Fortran compiler settings")
-+ set (F90_MODULE )
-+ set (F77_GETARG GETARG)
-+ set (F77_GETARG_ARGS "i,s")
-+ set (F77_GETARG_DECLS "intrinsic GETARG")
-+ set (F77_IARGC IARGC)
-+ set (F77_FLUSH flush_)
-+ set (HAVE_F77_FLUSH 1)
- endif()
- else()
- # need to set these variable even if only compiling C/C++
-diff --git a/cmake/config.h.in b/cmake/config.h.in
-index 3ce6a32..9ad868f 100644
---- a/cmake/config.h.in
-+++ b/cmake/config.h.in
-@@ -58,11 +58,11 @@
-
- #cmakedefine01 F2C_HIDDEN_STRING_LENGTH_AFTER_ARGS
-
--/*#define F77_FUNC(name,NAME) F77_FUNC_GLOBAL(name,NAME)*/
--/*#define F77_FUNC_(name,NAME) F77_FUNC_GLOBAL_(name,NAME)*/
-+#define F77_FUNC(name,NAME) F77_FUNC_GLOBAL(name,NAME)
-+#define F77_FUNC_(name,NAME) F77_FUNC_GLOBAL_(name,NAME)
-
--#define F77_FUNC(name,NAME) name ## _
--#define F77_FUNC_(name,NAME) name ## _
-+/* #define F77_FUNC(name,NAME) name ## _ */
-+/* #define F77_FUNC_(name,NAME) name ## _ */
-
- #define FXX_MODULE ${F90_MODULE}
- #define F77_GETARG ${F77_GETARG}
-diff --git a/tools/config_fh_from_h.cmake b/tools/config_fh_from_h.cmake
-index acdf776..fb10422 100644
---- a/tools/config_fh_from_h.cmake
-+++ b/tools/config_fh_from_h.cmake
-@@ -7,6 +7,13 @@ if (INPUT)
- foreach (l in ${in0})
- # Only retain lines that start with "#"
- set(found "")
-+ string(REGEX MATCH "^#include" found "${l}")
-+ if (found)
-+ # don't include f2c_cmake.h
-+ set(out "#include \"f2c_cmake.fh\"\n")
-+ continue ()
-+ endif ()
-+ set(found "")
- string(REGEX MATCH "^#" found "${l}")
- if (found)
- set(out "${out}${l}\n")
-diff --git a/tools/f2c_cmake_fh_from_h.cmake b/tools/f2c_cmake_fh_from_h.cmake
-new file mode 100644
-index 0000000..acdf776
---- /dev/null
-+++ b/tools/f2c_cmake_fh_from_h.cmake
-@@ -0,0 +1,21 @@
-+if (INPUT)
-+ if (OUTPUT)
-+ file(READ "${INPUT}" in0)
-+# replace carriage returns with a semi-colon
-+ string (REGEX REPLACE "\n" ";" in0 "${in0}")
-+ set(out "")
-+ foreach (l in ${in0})
-+ # Only retain lines that start with "#"
-+ set(found "")
-+ string(REGEX MATCH "^#" found "${l}")
-+ if (found)
-+ set(out "${out}${l}\n")
-+ endif ()
-+ endforeach ()
-+ file(WRITE "${OUTPUT}" "${out}")
-+ else (OUTPUT)
-+ message(ERROR "OUTPUT variable must be set")
-+ endif (OUTPUT)
-+else (INPUT)
-+ message(ERROR "INPUT variable must be set")
-+endif (INPUT)
-diff --git a/global/src/cnames.h b/global/src/cnames.h
-index efdec60..cadfd0a 100644
---- a/global/src/cnames.h
-+++ b/global/src/cnames.h
-@@ -2268,6 +2268,7 @@
- #define nga_iupdate_ghosts_ F77_FUNC_(nga_iupdate_ghosts,NGA_IUPDATE_GHOSTS)
- #define nga_supdate_ghosts_ F77_FUNC_(nga_supdate_ghosts,NGA_SUPDATE_GHOSTS)
- #define nga_zupdate_ghosts_ F77_FUNC_(nga_zupdate_ghosts,NGA_ZUPDATE_GHOSTS)
-+#define nga_update_ghosts_nb_ F77_FUNC_(nga_update_ghosts_nb, NGA_UPDATE_GHOSTS_NB)
- #define ga_update6_ghosts_ F77_FUNC_(ga_update6_ghosts, GA_UPDATE6_GHOSTS)
- #define ga_cupdate6_ghosts_ F77_FUNC_(ga_cupdate6_ghosts,GA_CUPDATE6_GHOSTS)
- #define ga_dupdate6_ghosts_ F77_FUNC_(ga_dupdate6_ghosts,GA_DUPDATE6_GHOSTS)
-diff --git a/global/testing/perform.F b/global/testing/perform.F
-index b18146d..e1b9641 100644
---- a/global/testing/perform.F
-+++ b/global/testing/perform.F
-@@ -110,7 +110,7 @@ c
- & ilo,ihi,jlo,jhi
- write(6,*)'bytes loop get put',
- & ' accumulate'
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- call ga_sync()
- c
-@@ -145,7 +145,7 @@ c
- if (me .eq. 0) then
- write(6,77)bytes, count, tg, 1d-6*bytes/tg,
- & tp, 1d-6*bytes/tp, ta, 1d-6*bytes/ta
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- enddo
- c
-diff --git a/global/testing/mir_perf1.F b/global/testing/mir_perf1.F
-index 074e838..3548552 100644
---- a/global/testing/mir_perf1.F
-+++ b/global/testing/mir_perf1.F
-@@ -133,7 +133,7 @@ c
- & ' accumulate'
- write(6,*)' bytes dim sec MB/s sec MB/s',
- & ' sec MB/s'
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- call ga_sync()
- c
-@@ -174,7 +174,7 @@ c
- if (me .eq. 0) then
- write(6,77)bytes, chunk(loop), tg,
- & 1d-6*bytes/tg,tp, 1d-6*bytes/tp, ta, 1d-6*bytes/ta
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- enddo
- c
-@@ -388,7 +388,7 @@ c
- & ' accumulate'
- write(6,*)' bytes dim sec MB/s sec MB/s',
- & ' sec MB/s'
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- call ga_sync()
- c
-@@ -427,7 +427,7 @@ c
- if (me .eq. 0) then
- write(6,77)bytes, chunk(loop), tg,
- & 1d-6*bytes/tg,tp, 1d-6*bytes/tp, ta, 1d-6*bytes/ta
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- enddo
- c
-diff --git a/global/testing/mir_perf2.F b/global/testing/mir_perf2.F
-index fb50398..3b3bed6 100644
---- a/global/testing/mir_perf2.F
-+++ b/global/testing/mir_perf2.F
-@@ -124,7 +124,7 @@ c
- & ' accumulate'
- write(6,*)' bytes dim sec MB/s sec MB/s',
- & ' sec MB/s'
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- call ga_sync()
- c
-@@ -163,7 +163,7 @@ c
- if (me .eq. 0) then
- write(6,77)bytes, chunk(loop), tg,
- & 1d-6*bytes/tg,tp, 1d-6*bytes/tp, ta, 1d-6*bytes/ta
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- enddo
- c
-@@ -377,7 +377,7 @@ c
- & ' accumulate'
- write(6,*)' bytes dim sec MB/s sec MB/s',
- & ' sec MB/s'
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- call ga_sync()
- c
-@@ -416,7 +416,7 @@ c
- if (me .eq. 0) then
- write(6,77)bytes, chunk(loop), tg,
- & 1d-6*bytes/tg,tp, 1d-6*bytes/tp, ta, 1d-6*bytes/ta
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- enddo
- c
-diff --git a/global/testing/perfmod.F b/global/testing/perfmod.F
-index ec3fe37..7770be7 100644
---- a/global/testing/perfmod.F
-+++ b/global/testing/perfmod.F
-@@ -119,7 +119,7 @@ c
-
- write(6,*)'bytes loop get put',
- & ' accumulate'
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- call ga_sync()
- c
-@@ -157,7 +157,7 @@ c
- if (me .eq. 0) then
- write(6,77)bytes, count, tg, 1d-6*bytes/tg,
- & tp, 1d-6*bytes/tp, ta, 1d-6*bytes/ta
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- enddo
- c
-diff --git a/global/testing/sprsmatmult.F b/global/testing/sprsmatmult.F
-index 3fdeb3f..3682c3b 100644
---- a/global/testing/sprsmatmult.F
-+++ b/global/testing/sprsmatmult.F
-@@ -108,7 +108,7 @@ c
- print *,'Comparing distributed multiply with serial multiply'
- print *
- #endif
-- call flush(6)
-+ call F77_FLUSH(6)
- endif
- c
- c*** Initialize the MA package
diff --git a/var/spack/repos/builtin/packages/globalarrays/package.py b/var/spack/repos/builtin/packages/globalarrays/package.py
index 2fe46e7b93..bd6f92168f 100644
--- a/var/spack/repos/builtin/packages/globalarrays/package.py
+++ b/var/spack/repos/builtin/packages/globalarrays/package.py
@@ -1,9 +1,9 @@
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
-# Produced at IBM.
+# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
-# Created by Serban Maerean, serban@ibm.com, All rights reserved.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/spack/spack
@@ -25,42 +25,58 @@
from spack import *
-class Globalarrays(CMakePackage):
- """The Global Arrays (GA) toolkit provides a shared memory style
- programming environment in the context of distributed array data
- structures.
- """
+class Globalarrays(AutotoolsPackage):
+ """Global Arrays (GA) is a Partitioned Global Address Space (PGAS)
+ programming model. It provides primitives for one-sided communication
+ (Get, Put, Accumulate) and Atomic Operations (read increment).
+ It supports blocking and non-blocking primtives, and supports location
+ consistency."""
homepage = "http://hpc.pnl.gov/globalarrays/"
- url = "https://github.com/GlobalArrays/ga"
+ url = "https://github.com/GlobalArrays/ga/releases/download/v5.7/ga-5.7.tar.gz"
- version('master', git='https://github.com/GlobalArrays/ga', branch='master')
+ version('5.7', 'bb9a441a6b4fbb8b52b58c2d3f4cd07f')
+ version('5.6.5', '90da628dc72048deeda3f0cd095cb5b3')
+ version('5.6.4', '051901b316c9766b8ba54306bff7f6b3')
+ version('5.6.3', 'df3cf6cc8288d9f202b7fd0ea82f5491')
+ version('5.6.2', '901e4612203bac45059be524fc1abfb7')
+ version('5.6.1', '674c0ea9bf413840b1ff1e669de73fca')
+ version('5.6', '49d7e997daed094eeb9565423879ba36')
- variant('i8', default=False, description='Build with 8 byte integers')
+ variant('int64', default=False, description='Compile with 64 bit indices support')
+ variant('blas', default=False, description='Enable BLAS')
+ variant('lapack', default=False, description='Enable LAPACK')
+ variant('scalapack', default=False, description='Enable SCALAPACK')
+ variant('armci', values=('mpi-ts', 'mpi-pr', 'mpi3', 'openib', 'ofi'),
+ default='mpi-ts', description='ARMCI runtime')
- depends_on('blas')
- depends_on('lapack')
depends_on('mpi')
+ depends_on('blas', when='+blas')
+ depends_on('lapack', when='+lapack')
+ depends_on('scalapack', when='+scalapack')
- patch('ibm-xl.patch', when='%xl')
- patch('ibm-xl.patch', when='%xl_r')
+ conflicts('+lapack', when='~blas')
+ conflicts('+scalapack', when='~blas')
+ conflicts('+scalapack', when='~lapack')
- def cmake_args(self):
- options = []
+ def configure_args(self):
+ args = ['--with-mpi']
- options.extend([
- '-DENABLE_FORTRAN=ON',
- '-DENABLE_BLAS=ON',
- ])
+ if '+blas' in self.spec:
+ if '+int64' in self.spec:
+ args.append('--with-blas8')
+ else:
+ args.append('--with-blas')
- if self.compiler.name == 'xl' or self.compiler.name == 'xl_r':
- # use F77 compiler if IBM XL
- options.extend([
- '-DCMAKE_Fortran_COMPILER=%s' % self.compiler.f77,
- '-DCMAKE_Fortran_FLAGS=-qzerosize'
- ])
+ if '+lapack' in self.spec:
+ args.append('--with-lapack')
- if "+i8" in self.spec:
- options.extend(['-DENABLE_I8=ON'])
+ if '+scalapack' in self.spec:
+ if '+int64' in self.spec:
+ args.append('--with-scalapack8')
+ else:
+ args.append('--with-scalapack')
- return options
+ args.append('--with-' + self.spec.variants['armci'].value)
+
+ return args