summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorChris White <white238@llnl.gov>2021-06-21 18:29:18 -0700
committerGitHub <noreply@github.com>2021-06-22 01:29:18 +0000
commitc9932b2d1e7cfd54238eb462683aa2a18f26a52c (patch)
tree502e31601b2260af8ce412cb19a53b50017a10f5 /var
parentc83f4b01aa621f936edff4bcb58cf5497e2eb516 (diff)
downloadspack-c9932b2d1e7cfd54238eb462683aa2a18f26a52c.tar.gz
spack-c9932b2d1e7cfd54238eb462683aa2a18f26a52c.tar.bz2
spack-c9932b2d1e7cfd54238eb462683aa2a18f26a52c.tar.xz
spack-c9932b2d1e7cfd54238eb462683aa2a18f26a52c.zip
Axom: Remove blueos check on cuda variant (#24349)
* remove blueos check on cuda variant, fix typo * restore necessary compiler guard * remove axom+cuda from testing because it only partially works outside ppc systems
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/axom/package.py130
1 files changed, 67 insertions, 63 deletions
diff --git a/var/spack/repos/builtin/packages/axom/package.py b/var/spack/repos/builtin/packages/axom/package.py
index 347b08a06d..1a3b90d7b8 100644
--- a/var/spack/repos/builtin/packages/axom/package.py
+++ b/var/spack/repos/builtin/packages/axom/package.py
@@ -196,39 +196,38 @@ class Axom(CachedCMakePackage, CudaPackage):
spec = self.spec
entries = super(Axom, self).initconfig_hardware_entries()
- if spec.satisfies('target=ppc64le:'):
- if "+cuda" in spec:
- entries.append(cmake_cache_option("ENABLE_CUDA", True))
- entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION",
- True))
+ if "+cuda" in spec:
+ entries.append(cmake_cache_option("ENABLE_CUDA", True))
+ entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION",
+ True))
- entries.append(
- cmake_cache_option("AXOM_ENABLE_ANNOTATIONS", True))
+ entries.append(
+ cmake_cache_option("AXOM_ENABLE_ANNOTATIONS", True))
- # CUDA_FLAGS
- cudaflags = "-restrict --expt-extended-lambda "
+ # CUDA_FLAGS
+ cudaflags = "-restrict --expt-extended-lambda "
- if not spec.satisfies('cuda_arch=none'):
- cuda_arch = spec.variants['cuda_arch'].value[0]
- entries.append(cmake_cache_string(
- "CMAKE_CUDA_ARCHITECTURES",
- cuda_arch))
- cudaflags += '-arch sm_${CMAKE_CUDA_ARCHITECTURES} '
- else:
- entries.append(
- "# cuda_arch could not be determined\n\n")
-
- if "+cpp14" in spec:
- cudaflags += " -std=c++14"
- else:
- cudaflags += " -std=c++11"
+ if not spec.satisfies('cuda_arch=none'):
+ cuda_arch = spec.variants['cuda_arch'].value[0]
+ entries.append(cmake_cache_string(
+ "CMAKE_CUDA_ARCHITECTURES",
+ cuda_arch))
+ cudaflags += '-arch sm_${CMAKE_CUDA_ARCHITECTURES} '
+ else:
entries.append(
- cmake_cache_string("CMAKE_CUDA_FLAGS", cudaflags))
+ "# cuda_arch could not be determined\n\n")
- entries.append(
- "# nvcc does not like gtest's 'pthreads' flag\n")
- entries.append(
- cmake_cache_option("gtest_disable_pthreads", True))
+ if "+cpp14" in spec:
+ cudaflags += " -std=c++14"
+ else:
+ cudaflags += " -std=c++11"
+ entries.append(
+ cmake_cache_string("CMAKE_CUDA_FLAGS", cudaflags))
+
+ entries.append(
+ "# nvcc does not like gtest's 'pthreads' flag\n")
+ entries.append(
+ cmake_cache_option("gtest_disable_pthreads", True))
entries.append("#------------------{0}".format("-" * 30))
entries.append("# Hardware Specifics")
@@ -244,41 +243,46 @@ class Axom(CachedCMakePackage, CudaPackage):
not spec.satisfies('+cuda target=ppc64le:')
))
- if spec.satisfies('target=ppc64le:'):
- if (self.compiler.fc is not None) and ("xlf" in self.compiler.fc):
- description = ("Converts C-style comments to Fortran style "
- "in preprocessed files")
+ if (self.compiler.fc is not None) and ("xlf" in self.compiler.fc):
+ # Grab lib directory for the current fortran compiler
+ libdir = pjoin(os.path.dirname(
+ os.path.dirname(self.compiler.fc)),
+ "lib")
+ description = ("Adds a missing rpath for libraries "
+ "associated with the fortran compiler")
+
+ linker_flags = "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath," + libdir
+
+ entries.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS",
+ linker_flags, description))
+
+ if "+shared" in spec:
+ linker_flags = "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath," \
+ + libdir
entries.append(cmake_cache_string(
- "BLT_FORTRAN_FLAGS",
- "-WF,-C! -qxlf2003=polymorphic",
- description))
- # Grab lib directory for the current fortran compiler
- libdir = pjoin(os.path.dirname(
- os.path.dirname(self.compiler.fc)),
- "lib")
- description = ("Adds a missing rpath for libraries "
- "associated with the fortran compiler")
- linker_flags = "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath," + libdir
- entries.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS",
- linker_flags, description))
- if "+shared" in spec:
- linker_flags = "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath," \
- + libdir
+ "CMAKE_SHARED_LINKER_FLAGS",
+ linker_flags, description))
+
+ description = ("Converts C-style comments to Fortran style "
+ "in preprocessed files")
+ entries.append(cmake_cache_string(
+ "BLT_FORTRAN_FLAGS",
+ "-WF,-C! -qxlf2003=polymorphic",
+ description))
+
+ if spec.satisfies('target=ppc64le:'):
+ # Fix for working around CMake adding implicit link directories
+ # returned by the BlueOS compilers to link executables with
+ # non-system default stdlib
+ _gcc_prefix = "/usr/tce/packages/gcc/gcc-4.9.3/lib64"
+ if os.path.exists(_gcc_prefix):
+ _gcc_prefix2 = pjoin(
+ _gcc_prefix,
+ "gcc/powerpc64le-unknown-linux-gnu/4.9.3")
+ _link_dirs = "{0};{1}".format(_gcc_prefix, _gcc_prefix2)
entries.append(cmake_cache_string(
- "CMAKE_SHARED_LINKER_FLAGS",
- linker_flags, description))
-
- # Fix for working around CMake adding implicit link directories
- # returned by the BlueOS compilers to link executables with
- # non-system default stdlib
- _gcc_prefix = "/usr/tce/packages/gcc/gcc-4.9.3/lib64"
- if os.path.exists(_gcc_prefix):
- _gcc_prefix2 = pjoin(
- _gcc_prefix,
- "gcc/powerpc64le-unknown-linux-gnu/4.9.3")
- _link_dirs = "{0};{1}".format(_gcc_prefix, _gcc_prefix2)
- entries.append(cmake_cache_string(
- "BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE", _link_dirs))
+ "BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE",
+ _link_dirs))
return entries
@@ -327,7 +331,7 @@ class Axom(CachedCMakePackage, CudaPackage):
entries.append(cmake_cache_path('%s_DIR' % dep.upper(),
dep_dir))
else:
- entries.append('# %s not build\n' % dep.upper())
+ entries.append('# %s not built\n' % dep.upper())
if '+scr' in spec:
dep_dir = get_spec_path(spec, 'scr', path_replacements)
@@ -339,7 +343,7 @@ class Axom(CachedCMakePackage, CudaPackage):
dep_dir = get_spec_path(spec, dep, path_replacements)
entries.append(cmake_cache_path('%s_DIR' % dep.upper(), dep_dir))
else:
- entries.append('# scr not build\n')
+ entries.append('# scr not built\n')
##################################
# Devtools