Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling with NVHPC #1076

Merged
merged 8 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/linuxWF.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
# see https://github.com/plumed/plumed2/issues/976
- -intel-
- -pycv-mpi-
#this does not install mpi but uses the internal one
- -nvhpc-mpi-
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
Expand Down Expand Up @@ -136,6 +138,18 @@ jobs:
echo "CXX=icpx" >> $GITHUB_ENV
echo "CC=icx" >> $GITHUB_ENV
echo "FC=ifx" >> $GITHUB_ENV
- name: Install NVHPC compiler
if: contains( matrix.variant, '-nvhpc-' )
# use this if it does not work
# wget https://developer.download.nvidia.com/hpc-sdk/24.3/nvhpc_2024_243_Linux_x86_64_cuda_12.3.tar.gz
# tar xpzf nvhpc_2024_243_Linux_x86_64_cuda_12.3.tar.gz
# nvhpc_2024_243_Linux_x86_64_cuda_12.3/install
run: |
curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
sudo apt-get update -y
sudo apt-get install -y nvhpc-24-3
# nvhpcinstalls his own mpi compilers
- name: Install MPI
# install MPI at last since it modifies CC and CXX
if: contains( matrix.variant, '-mpi-' )
Expand Down
3 changes: 2 additions & 1 deletion src/tools/MergeVectorTools.h
Iximiel marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ static void mergeSortedVectors(const C* const* vecs, std::size_t size, std::vect
/// to allow using a priority_queu, which selects the highest element.
/// we here (counterintuitively) define < as >
bool operator< (Entry const& rhs) const { return top() > rhs.top(); }
const auto & top() const { return *fwdIt; }
// TODO: revert "typename C::value_type" to "auto": nvc++ and icpc seems to do not deduce automatically the return type
const typename C::value_type & top() const { return *fwdIt; }
void next() { ++fwdIt;};
};

Expand Down
Loading