Skip to content

Commit

Permalink
Merge pull request #57 from idigs/main
Browse files Browse the repository at this point in the history
breakout build scripts
  • Loading branch information
mbeidler3 authored Aug 29, 2024
2 parents 79269c6 + 1cf8cba commit 195e797
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: spack
name: agate
on: [ push, workflow_dispatch ]

jobs:
Expand Down
44 changes: 3 additions & 41 deletions .github/workflows/onyx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,7 @@ jobs:
steps:
- name: build korc
run: |
cd ./KORC
rm -f CMakeCache.txt
rm -rf CMakeFiles
rm -rf ./build_cpu && mkdir $_
cd ./build_cpu
cmake -DCMAKE_BUILD_TYPE:String=Debug \
-DUSE_PSPLINE=ON \
-DUSE_FIO=OFF \
../
make -j VERBOSE=1
./KORC/ci_stub/onyx_job_build_cpu.sh
job_setup_spack:
if: true
Expand Down Expand Up @@ -142,37 +132,9 @@ jobs:
#

steps:
- name: load nvhpc from environment module
run: |
module load nvhpc-hpcx/24.5
module list
- name: build korc
- name: run ci_stub/onyx_job_build_gpu.sh
run: |
module load nvhpc-hpcx/24.5
module list
. ./spack/share/spack/setup-env.sh
spack load hdf5 +fortran -mpi %nvhpc@24.5
cd ./KORC
rm -f CMakeCache.txt
rm -rf CMakeFiles
rm -rf ./build_gpu && mkdir $_
cd ./build_gpu
cmake \
-DCMAKE_BUILD_TYPE:String=Debug \
-DUSE_PSPLINE=ON \
-DUSE_ACC=ON \
-DUSE_FIO=OFF \
-DCMAKE_Fortran_FLAGS="-acc=gpu -gpu=deepcopy -c++libs" \
-DCMAKE_CXX_FLAGS="-std=c++11 -mp" \
-DCMAKE_C_FLAGS="-mp" \
../
make -j VERBOSE=1
#
# -gpu=cc80 indicates that target gpu is Nvidia A100
#

./KORC/ci_stub/onyx_job_build_gpu.sh
job_test_cpu:
if: true
Expand Down
13 changes: 13 additions & 0 deletions ci_stub/onyx_job_build_cpu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

cd ./KORC
rm -f CMakeCache.txt
rm -rf CMakeFiles
rm -rf ./build_cpu && mkdir $_
cd ./build_cpu
cmake -DCMAKE_BUILD_TYPE:String=Debug \
-DUSE_PSPLINE=ON \
-DUSE_FIO=OFF \
../
make -j VERBOSE=1

27 changes: 27 additions & 0 deletions ci_stub/onyx_job_build_gpu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# load nvhpc from environment module
module load nvhpc-hpcx/24.5
module list
. ./spack/share/spack/setup-env.sh
spack load hdf5 +fortran -mpi %nvhpc@24.5

cd ./KORC
rm -f CMakeCache.txt
rm -rf CMakeFiles
rm -rf ./build_gpu && mkdir $_
cd ./build_gpu
cmake \
-DCMAKE_BUILD_TYPE:String=Debug \
-DUSE_PSPLINE=ON \
-DUSE_ACC=ON \
-DUSE_FIO=OFF \
-DCMAKE_Fortran_FLAGS="-acc=gpu -gpu=deepcopy -c++libs" \
-DCMAKE_CXX_FLAGS="-std=c++11 -mp" \
-DCMAKE_C_FLAGS="-mp" \
../
make -j VERBOSE=1

#
# -gpu=cc80 indicates that target gpu is Nvidia A100
#
2 changes: 1 addition & 1 deletion test/egyro/korc_egyro.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ fi
#assumes binary directory ../KORC/build/bin was added to path
${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} $1 ./xkorc $INPUT_FILE $OUT_DIR/

h5diff -r -d 0.000001 $OUT_DIR/file_0.h5 ${CMAKE_SOURCE_DIR}/test/egyro/file_0.h5
h5diff -r -p 0.000008 $OUT_DIR/file_0.h5 ${CMAKE_SOURCE_DIR}/test/egyro/file_0.h5
2 changes: 1 addition & 1 deletion test/mars/korc_mars.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ fi

${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} $1 ./xkorc $INPUT_FILE $OUT_DIR/

h5diff -r -d 0.008 $OUT_DIR/file_0.h5 ${CMAKE_SOURCE_DIR}/test/mars/file_0_new_random.h5
h5diff -r -p 0.000008 $OUT_DIR/file_0.h5 ${CMAKE_SOURCE_DIR}/test/mars/file_0_new_random.h5

0 comments on commit 195e797

Please sign in to comment.