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
This commit is contained in:
Chris White 2021-06-21 18:29:18 -07:00 committed by GitHub
parent c83f4b01aa
commit c9932b2d1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 69 additions and 66 deletions

View file

@ -171,7 +171,7 @@ spack:
- cuda_specs: - cuda_specs:
- amrex +cuda cuda_arch=70 - amrex +cuda cuda_arch=70
- axom +cuda cuda_arch=70 ^umpire@4.1.2 ~shared # - axom +cuda cuda_arch=70 ^umpire@4.1.2 ~shared
- caliper +cuda cuda_arch=70 - caliper +cuda cuda_arch=70
- chai +cuda ~benchmarks ~tests cuda_arch=70 ^umpire@4.1.2 ~shared - chai +cuda ~benchmarks ~tests cuda_arch=70 ^umpire@4.1.2 ~shared
- ginkgo +cuda cuda_arch=70 - ginkgo +cuda cuda_arch=70
@ -368,4 +368,3 @@ spack:
url: https://cdash.spack.io url: https://cdash.spack.io
project: Spack Testing project: Spack Testing
site: Cloud Gitlab Infrastructure site: Cloud Gitlab Infrastructure

View file

@ -196,7 +196,6 @@ def initconfig_hardware_entries(self):
spec = self.spec spec = self.spec
entries = super(Axom, self).initconfig_hardware_entries() entries = super(Axom, self).initconfig_hardware_entries()
if spec.satisfies('target=ppc64le:'):
if "+cuda" in spec: if "+cuda" in spec:
entries.append(cmake_cache_option("ENABLE_CUDA", True)) entries.append(cmake_cache_option("ENABLE_CUDA", True))
entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION",
@ -244,23 +243,19 @@ def initconfig_hardware_entries(self):
not spec.satisfies('+cuda target=ppc64le:') not spec.satisfies('+cuda target=ppc64le:')
)) ))
if spec.satisfies('target=ppc64le:'):
if (self.compiler.fc is not None) and ("xlf" in self.compiler.fc): if (self.compiler.fc is not None) and ("xlf" in self.compiler.fc):
description = ("Converts C-style comments to Fortran style "
"in preprocessed files")
entries.append(cmake_cache_string(
"BLT_FORTRAN_FLAGS",
"-WF,-C! -qxlf2003=polymorphic",
description))
# Grab lib directory for the current fortran compiler # Grab lib directory for the current fortran compiler
libdir = pjoin(os.path.dirname( libdir = pjoin(os.path.dirname(
os.path.dirname(self.compiler.fc)), os.path.dirname(self.compiler.fc)),
"lib") "lib")
description = ("Adds a missing rpath for libraries " description = ("Adds a missing rpath for libraries "
"associated with the fortran compiler") "associated with the fortran compiler")
linker_flags = "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath," + libdir linker_flags = "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath," + libdir
entries.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", entries.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS",
linker_flags, description)) linker_flags, description))
if "+shared" in spec: if "+shared" in spec:
linker_flags = "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath," \ linker_flags = "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath," \
+ libdir + libdir
@ -268,6 +263,14 @@ def initconfig_hardware_entries(self):
"CMAKE_SHARED_LINKER_FLAGS", "CMAKE_SHARED_LINKER_FLAGS",
linker_flags, description)) 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 # Fix for working around CMake adding implicit link directories
# returned by the BlueOS compilers to link executables with # returned by the BlueOS compilers to link executables with
# non-system default stdlib # non-system default stdlib
@ -278,7 +281,8 @@ def initconfig_hardware_entries(self):
"gcc/powerpc64le-unknown-linux-gnu/4.9.3") "gcc/powerpc64le-unknown-linux-gnu/4.9.3")
_link_dirs = "{0};{1}".format(_gcc_prefix, _gcc_prefix2) _link_dirs = "{0};{1}".format(_gcc_prefix, _gcc_prefix2)
entries.append(cmake_cache_string( entries.append(cmake_cache_string(
"BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE", _link_dirs)) "BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE",
_link_dirs))
return entries return entries
@ -327,7 +331,7 @@ def initconfig_package_entries(self):
entries.append(cmake_cache_path('%s_DIR' % dep.upper(), entries.append(cmake_cache_path('%s_DIR' % dep.upper(),
dep_dir)) dep_dir))
else: else:
entries.append('# %s not build\n' % dep.upper()) entries.append('# %s not built\n' % dep.upper())
if '+scr' in spec: if '+scr' in spec:
dep_dir = get_spec_path(spec, 'scr', path_replacements) dep_dir = get_spec_path(spec, 'scr', path_replacements)
@ -339,7 +343,7 @@ def initconfig_package_entries(self):
dep_dir = get_spec_path(spec, dep, path_replacements) dep_dir = get_spec_path(spec, dep, path_replacements)
entries.append(cmake_cache_path('%s_DIR' % dep.upper(), dep_dir)) entries.append(cmake_cache_path('%s_DIR' % dep.upper(), dep_dir))
else: else:
entries.append('# scr not build\n') entries.append('# scr not built\n')
################################## ##################################
# Devtools # Devtools