Skip to content

Commit

Permalink
Bump default NVHPC version to 24.7 (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
samcmill authored Aug 2, 2024
1 parent 67fdb28 commit 2a91503
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/building_blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -3196,7 +3196,7 @@ the default GNU toolchain.

- __version__: The version of the HPC SDK to use. Note when `package`
is set the version is determined automatically from the package
file name. The default value is `23.11`.
file name. The default value is `24.7`.

__Examples__

Expand Down
12 changes: 9 additions & 3 deletions hpccm/building_blocks/nvhpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class nvhpc(bb_base, hpccm.templates.downloader, hpccm.templates.envvars,
version: The version of the HPC SDK to use. Note when `package`
is set the version is determined automatically from the package
file name. The default value is `23.11`.
file name. The default value is `24.7`.
# Examples
Expand Down Expand Up @@ -175,14 +175,20 @@ def __init__(self, **kwargs):
self.__tarball = kwargs.get('tarball', False)
self.__toolchain = kwargs.get('toolchain', None)
self.__url = kwargs.get('url', None)
self.__version = kwargs.get('version', '23.11')
self.__version = kwargs.get('version', '24.7')
self.__wd = kwargs.get('wd', hpccm.config.g_wd) # working directory
self.__year = '' # Filled in by __get_version()

self.toolchain = toolchain(CC='nvc', CXX='nvc++', F77='nvfortran',
F90='nvfortran', FC='nvfortran')

if Version(self.__version) >= Version('23.7'):
if Version(self.__version) >= Version('24.7'):
self.__cuda_version_default = '12.5'
elif Version(self.__version) >= Version('24.5'):
self.__cuda_version_default = '12.4'
elif Version(self.__version) >= Version('23.11'):
self.__cuda_version_default = '12.3'
elif Version(self.__version) >= Version('23.7'):
self.__cuda_version_default = '12.2'
elif Version(self.__version) >= Version('23.5'):
self.__cuda_version_default = '12.1'
Expand Down
42 changes: 21 additions & 21 deletions test/test_nvhpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_defaults_ubuntu(self):
"""Default HPC SDK building block"""
n = nvhpc(eula=True)
self.assertMultiLineEqual(str(n),
r'''# NVIDIA HPC SDK version 23.11
r'''# NVIDIA HPC SDK version 24.7
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
Expand All @@ -52,12 +52,12 @@ def test_defaults_ubuntu(self):
echo "deb [signed-by=/usr/share/keyrings/DEB-GPG-KEY-NVIDIA-HPC-SDK.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /" >> /etc/apt/sources.list.d/hpccm.list && \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
nvhpc-23-11-cuda-multi && \
nvhpc-24-7-cuda-multi && \
rm -rf /var/lib/apt/lists/*
ENV CPATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nvshmem/include:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nccl/include:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/extras/qd/include/qd:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/math_libs/include:$CPATH \
LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nvshmem/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nccl/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/math_libs/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/cuda/lib64:$LD_LIBRARY_PATH \
MANPATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/man:$MANPATH \
PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nvshmem/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nccl/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/profilers/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/cuda/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/mpi/bin:$PATH''')
ENV CPATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nvshmem/include:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nccl/include:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/extras/qd/include/qd:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/math_libs/include:$CPATH \
LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nvshmem/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nccl/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/math_libs/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/cuda/lib64:$LD_LIBRARY_PATH \
MANPATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/man:$MANPATH \
PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nvshmem/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nccl/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/profilers/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/cuda/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/mpi/bin:$PATH''')

@x86_64
@centos
Expand All @@ -66,19 +66,19 @@ def test_defaults_centos(self):
"""Default HPC SDK building block"""
n = nvhpc(eula=True)
self.assertMultiLineEqual(str(n),
r'''# NVIDIA HPC SDK version 23.11
r'''# NVIDIA HPC SDK version 24.7
RUN yum install -y \
ca-certificates && \
rm -rf /var/cache/yum/*
RUN yum install -y yum-utils && \
yum-config-manager --add-repo https://developer.download.nvidia.com/hpc-sdk/rhel/nvhpc.repo && \
yum install -y \
nvhpc-cuda-multi-23.11 && \
nvhpc-cuda-multi-24.7 && \
rm -rf /var/cache/yum/*
ENV CPATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nvshmem/include:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nccl/include:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/extras/qd/include/qd:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/math_libs/include:$CPATH \
LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nvshmem/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nccl/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/math_libs/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/cuda/lib64:$LD_LIBRARY_PATH \
MANPATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/man:$MANPATH \
PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nvshmem/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/nccl/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/profilers/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/cuda/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/mpi/bin:$PATH''')
ENV CPATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nvshmem/include:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nccl/include:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/extras/qd/include/qd:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/math_libs/include:$CPATH \
LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nvshmem/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nccl/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/math_libs/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/cuda/lib64:$LD_LIBRARY_PATH \
MANPATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/man:$MANPATH \
PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nvshmem/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/nccl/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/profilers/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/cuda/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/mpi/bin:$PATH''')

@x86_64
@centos
Expand Down Expand Up @@ -218,10 +218,10 @@ def test_runtime_ubuntu(self):
libnuma1 \
openssh-client && \
rm -rf /var/lib/apt/lists/*
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/REDIST/compilers/lib/* /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/lib/
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/mpi /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/mpi
ENV LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/mpi/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/lib:$LD_LIBRARY_PATH \
PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/mpi/bin:$PATH''')
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/REDIST/compilers/lib/* /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/lib/
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/mpi /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/mpi
ENV LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/mpi/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/lib:$LD_LIBRARY_PATH \
PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/mpi/bin:$PATH''')

@x86_64
@centos
Expand All @@ -241,11 +241,11 @@ def test_runtime_centos(self):
numactl-libs \
openssh-clients && \
rm -rf /var/cache/yum/*
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/REDIST/comm_libs/11.8/nccl/lib/libnccl.so /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/11.8/nccl/lib/libnccl.so
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/REDIST/compilers/lib/* /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/lib/
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/REDIST/math_libs/11.8/lib64/libcufft.so.10 /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/math_libs/11.8/lib64/libcufft.so.10
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/REDIST/math_libs/11.8/lib64/libcublas.so.11 /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/math_libs/11.8/lib64/libcublas.so.11
ENV LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/comm_libs/11.8/nccl/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/math_libs/11.8/lib64:$LD_LIBRARY_PATH''')
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/REDIST/comm_libs/11.8/nccl/lib/libnccl.so /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/11.8/nccl/lib/libnccl.so
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/REDIST/compilers/lib/* /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/lib/
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/REDIST/math_libs/11.8/lib64/libcufft.so.10 /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/math_libs/11.8/lib64/libcufft.so.10
COPY --from=0 /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/REDIST/math_libs/11.8/lib64/libcublas.so.11 /opt/nvidia/hpc_sdk/Linux_x86_64/24.7/math_libs/11.8/lib64/libcublas.so.11
ENV LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/11.8/nccl/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/math_libs/11.8/lib64:$LD_LIBRARY_PATH''')

@x86_64
@ubuntu
Expand Down

0 comments on commit 2a91503

Please sign in to comment.