Skip to content

Commit

Permalink
rename gpu options
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaypanyala committed May 2, 2024
1 parent e65360c commit 2fb7f65
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/c-cpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ 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=<exachem-install-path> -DMODULES="CC" ..
CC=gcc CXX=g++ FC=gfortran cmake -DCMAKE_INSTALL_PREFIX=<exachem-install-path> -DMODULES="CC;DFT" ..
make -j4 install
```

## Step 2
```
git clone https://github.com/ExaChem/exachem.git
cd exachem && mkdir build && cd build
CC=gcc CXX=g++ FC=gfortran cmake -DCMAKE_INSTALL_PREFIX=<exachem-install-path> -DMODULES="CC" ..
CC=gcc CXX=g++ FC=gfortran cmake -DCMAKE_INSTALL_PREFIX=<exachem-install-path> -DMODULES="CC;DFT" ..
make -j4
```

Expand Down
6 changes: 3 additions & 3 deletions exachem/cc/ccsd_t/ccsd_t.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 8 additions & 7 deletions support/spack/packages/exachem/package.py
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -20,22 +20,23 @@ class Exachem(CMakePackage,CudaPackage):
depends_on('mpi')
depends_on('intel-oneapi-mkl +cluster')
depends_on('[email protected]:')
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('[email protected]:')
# Still need to update libint recipe for 2.9.x
#depends_on('[email protected]:')
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
15 changes: 8 additions & 7 deletions support/spack/packages/tamm/package.py
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -23,22 +23,23 @@ class Tamm(CMakePackage,CudaPackage):
depends_on('mpi')
depends_on('intel-oneapi-mkl +cluster')
depends_on('[email protected]:')
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('[email protected]:')
# Still need to update libint recipe for 2.9.x
#depends_on('[email protected]:')
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

0 comments on commit 2fb7f65

Please sign in to comment.