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>
This commit is contained in:
Erik 2022-10-31 12:33:55 -04:00 committed by GitHub
parent 30d84a2716
commit 214890c026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -342,8 +342,13 @@ def test(self):
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")