Skip to content

Commit

Permalink
Merge pull request #4839 from ye-luo/print-cmake-error
Browse files Browse the repository at this point in the history
Fix CI offload build failure and add checks upon CMake return failure
  • Loading branch information
prckent authored Nov 18, 2023
2 parents 7f3a6f9 + 3af77b6 commit d30ebaa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-github-actions-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
GH_JOBNAME: ${{matrix.jobname}}
GH_OS: Linux
strategy:
fail-fast: true
fail-fast: false
matrix:
jobname: [
GCC11-NoMPI-MKL-Real-Mixed, # mixed precision
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
GH_JOBNAME: ${{matrix.jobname}}
GH_OS: Linux
strategy:
fail-fast: true
fail-fast: false
matrix:
jobname: [
V100-Clang16-MPI-CUDA-AFQMC-Offload-Real-Mixed, # auxiliary field, offload
Expand Down
17 changes: 12 additions & 5 deletions tests/test_automation/github-actions/ci/run_step_ornl-sulfur-2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ case "$1" in

LLVM_DIR=$HOME/opt/spack/linux-rhel9-cascadelake/gcc-9.4.0/llvm-16.0.2-ltjkfjdu6p2cfcyw3zalz4x5sz5do3cr

echo "Set PATHs to cuda-12.1"
export PATH=/usr/local/cuda-12.1/bin:$PATH
echo "Set PATHs to cuda-11.2"
export PATH=$HOME/opt/cuda/11.2/bin:$PATH
export OMPI_CC=$LLVM_DIR/bin/clang
export OMPI_CXX=$LLVM_DIR/bin/clang++

Expand All @@ -71,12 +71,13 @@ case "$1" in
echo "OMPI_CC=$OMPI_CC" >> $GITHUB_ENV
echo "OMPI_CXX=$OMPI_CXX" >> $GITHUB_ENV

# Confirm that cuda 12.1 gets picked up by the compiler
# Confirm that cuda 11.2 gets picked up by the compiler
$OMPI_CXX -v

cmake -GNinja \
-DCMAKE_C_COMPILER=/usr/lib64/openmpi/bin/mpicc \
-DCMAKE_CXX_COMPILER=/usr/lib64/openmpi/bin/mpicxx \
-DCMAKE_EXE_LINKER_FLAGS="-L $LLVM_DIR/lib" \
-DMPIEXEC_EXECUTABLE=/usr/lib64/openmpi/bin/mpirun \
-DBOOST_ROOT=$BOOST_DIR \
-DBUILD_AFQMC=ON \
Expand All @@ -87,7 +88,7 @@ case "$1" in
-DQMC_MIXED_PRECISION=$IS_MIXED_PRECISION \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DQMC_DATA=$QMC_DATA_DIR \
${GITHUB_WORKSPACE}
${GITHUB_WORKSPACE} || cmake_exit_code=$?
;;

*"V100-GCC11-MPI-CUDA"*)
Expand All @@ -112,9 +113,15 @@ case "$1" in
-DQMC_MIXED_PRECISION=$IS_MIXED_PRECISION \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DQMC_DATA=$QMC_DATA_DIR \
${GITHUB_WORKSPACE}
${GITHUB_WORKSPACE} || cmake_exit_code=$?
;;
esac
if [ $cmake_exit_code -ne 0 ]; then
# for debugging purpose
if [ -f CMakeFiles/CMakeError.log ]; then cat CMakeFiles/CMakeError.log; fi
if [ -f CMakeFiles/CMakeOutput.log ]; then cat CMakeFiles/CMakeOutput.log; fi
fi
exit $cmake_exit_code
;;

build)
Expand Down

0 comments on commit d30ebaa

Please sign in to comment.