summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik <epalmer@lbl.gov>2022-10-31 12:33:55 -0400
committerGitHub <noreply@github.com>2022-10-31 09:33:55 -0700
commit214890c026cff8002bd9e8554aecb2b58c32b08c (patch)
tree9ffb9f3abf60c903a95a73bbaf71a53f9ef98908
parent30d84a2716bfbbdc2fdb6185de0277ba42fc46cf (diff)
downloadspack-214890c026cff8002bd9e8554aecb2b58c32b08c.tar.gz
spack-214890c026cff8002bd9e8554aecb2b58c32b08c.tar.bz2
spack-214890c026cff8002bd9e8554aecb2b58c32b08c.tar.xz
spack-214890c026cff8002bd9e8554aecb2b58c32b08c.zip
Enable Cuda for AMReX smoke test. (#28576)
* Enable Cuda for AMReX smoke test. * style fix * more style fixes * change /... to join_path Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/amrex/package.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py
index 55bb65fc8f..b41bd126fa 100644
--- a/var/spack/repos/builtin/packages/amrex/package.py
+++ b/var/spack/repos/builtin/packages/amrex/package.py
@@ -342,8 +342,13 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
args = []
args.append("-S./cache/amrex/Tests/SpackSmokeTest")
args.append("-DAMReX_ROOT=" + self.prefix)
- args.append("-DMPI_C_COMPILER=" + self.spec["mpi"].mpicc)
- args.append("-DMPI_CXX_COMPILER=" + self.spec["mpi"].mpicxx)
+ if "+mpi" in self.spec:
+ args.append("-DMPI_C_COMPILER=" + self.spec["mpi"].mpicc)
+ args.append("-DMPI_CXX_COMPILER=" + self.spec["mpi"].mpicxx)
+
+ if "+cuda" in self.spec:
+ args.append("-DCMAKE_CUDA_COMPILER=" + join_path(self.spec["cuda"].prefix.bin, "nvcc"))
+
args.extend(self.cmake_args())
self.run_test(cmake_bin, args, purpose="Configure with CMake")