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

[feature] CI on nvhpc, the NVIDIA HPC compilers #237

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
49 changes: 43 additions & 6 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- run: make
- run: make check
- run: make install
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: generic
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
working-directory: out
- run: make check
working-directory: out
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: out-of-tree
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
HWLOC_CPUID_PATH: ${{ github.workspace }}/cpuid
VALGRIND_SUPPRESSIONS_FILES: ${{ github.workspace }}/.valgrind.supp
OMP_NUM_THREADS: 1
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: valgrind
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
HWLOC_CPUID_PATH: ${{ github.workspace }}/cpuid
VALGRIND_SUPPRESSIONS_FILES: ${{ github.workspace }}/.valgrind.supp
OMP_NUM_THREADS: 1
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: valgrind
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
mkdir build
./configure --prefix=`pwd`/build --without-rocm
- run: make distcheck
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: distcheck
Expand All @@ -173,7 +173,44 @@ jobs:
- run: make CFLAGS=-std=c99
- run: make check
- run: make install
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: rocm
path: |
config.log
tests/*.log
benchmarks/*.log
doc/tutorials/*.log
nvhpc:
env:
CFLAGS: "-std=c99"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: nvcr.io/nvidia/nvhpc:24.7-devel-cuda12.5-ubuntu22.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- run: apt-get update
- run: apt-get install -y make autoconf automake libtool pkgconf libhwloc-dev
- run: |
echo "0.8.0" > .tarball-version
- name: build
run: |
source /usr/share/lmod/6.6/init/bash
module load nvhpc
./autogen.sh
mkdir build
./configure --prefix=`pwd`/build --with-cuda CUDA_HOME=$NVHPC_ROOT/cuda
make
make check
make install
- uses: actions/upload-artifact@v4
if: failure()
with:
name: rocm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/$INSTALL_PATH/lib:$LD_LIBRARY_PATH
cd xsbench/openmp-threading
test -n "$(./XSBench -s small | grep 'Verification checksum' | grep -i valid)"
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: generic
Expand Down
9 changes: 6 additions & 3 deletions benchmarks/blas/l1_kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,18 @@ double ddot(size_t n, double *a, double *b, double *c, double scalar)
(void)*c;
(void)scalar;
size_t i;
long double dot = 0.0;
/* should be a long double for overflow checks, but some compilers (nvc)
* don't support reduce on long double in 2024.
*/
double dot = 0.0;

#pragma omp parallel for reduction(+ : dot)
for (i = 0; i < n; i++) {
long double temp;
double temp;
temp = a[i] * b[i];
dot += temp;
}
return (double)dot;
return dot;
}

double dnrm2(size_t n, double *a, double *b, double *c, double scalar)
Expand Down
9 changes: 4 additions & 5 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,10 @@ endif
# Cuda sources

if HAVE_CUDA
libcuda_la_SOURCES=area/cuda.c dma/cuda.c
noinst_LTLIBRARIES+=libcuda.la
libcuda_la_CPPFLAGS=$(AM_CPPFLAGS) $(CUDA_CFLAGS)
libcuda_la_LDFLAGS=$(AM_LDFLAGS) $(CUDA_LIBS)
libaml_la_LIBADD=libcuda.la
AM_CPPFLAGS += $(CUDA_CFLAGS)
AM_LDFLAGS += $(CUDA_LIBS)
libaml_la_SOURCES+=area/cuda.c
libaml_la_SOURCES+=dma/cuda.c
endif

#############################################
Expand Down
Loading