From 2fb7f65b1326e1aec255d466550f1af1da5f4a48 Mon Sep 17 00:00:00 2001 From: Ajay Panyala Date: Thu, 2 May 2024 12:15:45 -0700 Subject: [PATCH] rename gpu options --- .github/workflows/c-cpp.yaml | 4 ++-- docs/install.md | 4 ++-- exachem/cc/ccsd_t/ccsd_t.cmake | 6 +++--- support/spack/packages/exachem/package.py | 15 ++++++++------- support/spack/packages/tamm/package.py | 15 ++++++++------- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/c-cpp.yaml b/.github/workflows/c-cpp.yaml index 69cc24f..19e79cb 100644 --- a/.github/workflows/c-cpp.yaml +++ b/.github/workflows/c-cpp.yaml @@ -220,7 +220,7 @@ jobs: # TAMM build git clone https://github.com/NWChemEx/TAMM $GITHUB_WORKSPACE/TAMM cd $GITHUB_WORKSPACE/TAMM - cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PATH }} -DLINALG_VENDOR=${{ env.LA_VENDOR }} -DGPU_ARCH=70 -DMODULES="CC" -DUSE_CUDA=${{ env.USE_CUDA }} -DUSE_SCALAPACK=${{ env.USE_SCALAPACK }} + cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PATH }} -DLINALG_VENDOR=${{ env.LA_VENDOR }} -DGPU_ARCH=70 -DMODULES="CC" -DTAMM_ENABLE_CUDA=${{ env.USE_CUDA }} -DUSE_SCALAPACK=${{ env.USE_SCALAPACK }} cd build make -j${{ env.EC_NPROC }} make install @@ -250,7 +250,7 @@ jobs: # TAMM build git clone https://github.com/NWChemEx/TAMM $GITHUB_WORKSPACE/TAMM cd $GITHUB_WORKSPACE/TAMM - UPCXX_CODEMODE=O3 CXX=upcxx cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PATH }} -DGPU_ARCH=70 -DMODULES="CC" -DUSE_UPCXX=ON -DMPIRUN_EXECUTABLE=${{ env.CI_MPIEXEC }} + UPCXX_CODEMODE=O3 CXX=upcxx cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PATH }} -DGPU_ARCH=70 -DMODULES="CC" -DTAMM_ENABLE_CUDA=${{ env.USE_CUDA }} -DUSE_UPCXX=ON -DMPIRUN_EXECUTABLE=${{ env.CI_MPIEXEC }} cd build UPCXX_NETWORK=smp UPCXX_CODEMODE=O3 make -j${{ env.EC_NPROC }} UPCXX_NETWORK=smp UPCXX_CODEMODE=O3 make install diff --git a/docs/install.md b/docs/install.md index a4cf047..a138e92 100644 --- a/docs/install.md +++ b/docs/install.md @@ -16,7 +16,7 @@ cd TAMM && mkdir build && cd build ``` - ### A detailed list of the cmake build options available are listed [here](https://tamm.readthedocs.io/en/latest/install.html) ``` -CC=gcc CXX=g++ FC=gfortran cmake -DCMAKE_INSTALL_PREFIX= -DMODULES="CC" .. +CC=gcc CXX=g++ FC=gfortran cmake -DCMAKE_INSTALL_PREFIX= -DMODULES="CC;DFT" .. make -j4 install ``` @@ -24,7 +24,7 @@ make -j4 install ``` git clone https://github.com/ExaChem/exachem.git cd exachem && mkdir build && cd build -CC=gcc CXX=g++ FC=gfortran cmake -DCMAKE_INSTALL_PREFIX= -DMODULES="CC" .. +CC=gcc CXX=g++ FC=gfortran cmake -DCMAKE_INSTALL_PREFIX= -DMODULES="CC;DFT" .. make -j4 ``` diff --git a/exachem/cc/ccsd_t/ccsd_t.cmake b/exachem/cc/ccsd_t/ccsd_t.cmake index 7c4b1d0..e0bb35f 100644 --- a/exachem/cc/ccsd_t/ccsd_t.cmake +++ b/exachem/cc/ccsd_t/ccsd_t.cmake @@ -11,20 +11,20 @@ set(CCSD_T_COMMON_SRCS ${CCSD_T_SRCDIR}/fused_common.hpp ) -if(USE_CUDA) +if(TAMM_HAS_CUDA) set(CCSD_T_SRCS ${CCSD_T_COMMON_SRCS} ${CCSD_T_SRCDIR}/ccsd_t_all_fused.hpp ${CCSD_T_SRCDIR}/ccsd_t_all_fused_gpu.cu ${CCSD_T_SRCDIR}/ccsd_t_all_fused_nontcCuda_Hip_Sycl.cpp) set_source_files_properties(${CCSD_T_SRCDIR}/ccsd_t_all_fused_nontcCuda_Hip_Sycl.cpp PROPERTIES LANGUAGE CUDA) -elseif(USE_HIP) +elseif(TAMM_HAS_HIP) set(CCSD_T_SRCS ${CCSD_T_COMMON_SRCS} ${CCSD_T_SRCDIR}/ccsd_t_all_fused.hpp ${CCSD_T_SRCDIR}/ccsd_t_all_fused_nontcCuda_Hip_Sycl.cpp) set_source_files_properties(${CCSD_T_SRCDIR}/ccsd_t_all_fused_nontcCuda_Hip_Sycl.cpp PROPERTIES LANGUAGE HIP) -elseif(USE_DPCPP) +elseif(TAMM_HAS_DPCPP) set(CCSD_T_SRCS ${CCSD_T_COMMON_SRCS} ${CCSD_T_SRCDIR}/ccsd_t_all_fused.hpp ${CCSD_T_SRCDIR}/ccsd_t_all_fused_nontcCuda_Hip_Sycl.cpp) diff --git a/support/spack/packages/exachem/package.py b/support/spack/packages/exachem/package.py index 03bdea9..c11a091 100644 --- a/support/spack/packages/exachem/package.py +++ b/support/spack/packages/exachem/package.py @@ -1,4 +1,4 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) @@ -20,22 +20,23 @@ class Exachem(CMakePackage,CudaPackage): depends_on('mpi') depends_on('intel-oneapi-mkl +cluster') depends_on('cmake@3.22:') - depends_on('cuda@11.5:', when='+cuda') + depends_on('cuda@11.8:', when='+cuda') depends_on('hdf5 +mpi') - # Still need to update libint recipe for 2.7.x - #depends_on('libint@2.7:') + # Still need to update libint recipe for 2.9.x + #depends_on('libint@2.9:') + conflicts("+cuda", when="cuda_arch=none") def cmake_args(self): args = [ # This was not able to detect presence of libint in first test #'-DLibInt2_ROOT=%s' % self.spec['libint'].prefix, - '-DMODULES=CC', + '-DMODULES=CC;DFT', '-DHDF5_ROOT=%s' % self.spec['hdf5'].prefix, '-DLINALG_VENDOR=IntelMKL', '-DLINALG_PREFIX=%s' % join_path(self.spec['intel-oneapi-mkl'].prefix, 'mkl', 'latest'), ] if '+cuda' in self.spec: - args.extend([ '-DUSE_CUDA=ON', - ]) + args.append( "-DTAMM_ENABLE_CUDA=ON" ) + args.append("-DGPU_ARCH=" + self.spec.variants["cuda_arch"].value) return args \ No newline at end of file diff --git a/support/spack/packages/tamm/package.py b/support/spack/packages/tamm/package.py index 233d459..07d2d68 100644 --- a/support/spack/packages/tamm/package.py +++ b/support/spack/packages/tamm/package.py @@ -1,4 +1,4 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) @@ -23,22 +23,23 @@ class Tamm(CMakePackage,CudaPackage): depends_on('mpi') depends_on('intel-oneapi-mkl +cluster') depends_on('cmake@3.22:') - depends_on('cuda@11.5:', when='+cuda') + depends_on('cuda@11.8:', when='+cuda') depends_on('hdf5 +mpi') - # Still need to update libint recipe for 2.7.x - #depends_on('libint@2.7:') + # Still need to update libint recipe for 2.9.x + #depends_on('libint@2.9:') + conflicts("+cuda", when="cuda_arch=none") def cmake_args(self): args = [ # This was not able to detect presence of libint in first test #'-DLibInt2_ROOT=%s' % self.spec['libint'].prefix, - '-DMODULES=CC', + '-DMODULES=CC;DFT', '-DHDF5_ROOT=%s' % self.spec['hdf5'].prefix, '-DLINALG_VENDOR=IntelMKL', '-DLINALG_PREFIX=%s' % join_path(self.spec['intel-oneapi-mkl'].prefix, 'mkl', 'latest'), ] if '+cuda' in self.spec: - args.extend([ '-DUSE_CUDA=ON', - ]) + args.append( "-DTAMM_ENABLE_CUDA=ON" ) + args.append("-DGPU_ARCH=" + self.spec.variants["cuda_arch"].value) return args \ No newline at end of file