diff --git a/.github/workflows/ci_nodbg.sh b/.github/workflows/ci_nodbg.sh new file mode 100644 index 000000000..25e2f4b6f --- /dev/null +++ b/.github/workflows/ci_nodbg.sh @@ -0,0 +1,61 @@ +#!/bin/bash -e + +COMPONENT=$1 +COMPILER=$2 + +[ -z "$COMPILER" ] && COMPILER=gcc@11 + +source /etc/profile +set +x +set -e +trap 'echo "# $BASH_COMMAND"' DEBUG +shopt -s expand_aliases + +module load $COMPILER + +cd src + +if [ "$COMPONENT" = "lmsensors" ]; then + wget https://github.com/groeck/lm-sensors/archive/V3-4-0.tar.gz + tar -zxf V3-4-0.tar.gz + cd lm-sensors-3-4-0 + make install PREFIX=../lm ETCDIR=../lm/etc + cd .. + export PAPI_LMSENSORS_ROOT=lm + export PAPI_LMSENSORS_INC=$PAPI_LMSENSORS_ROOT/include/sensors + export PAPI_LMSENSORS_LIB=$PAPI_LMSENSORS_ROOT/lib64 + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PAPI_LMSENSORS_ROOT/lib +fi + +if [ "$COMPONENT" = "cuda" ] || [ "$COMPONENT" = "nvml" ]; then + module load cuda + export PAPI_CUDA_ROOT=$ICL_CUDA_ROOT + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PAPI_CUDA_ROOT/extras/CUPTI/lib64 +fi + +if [ "$COMPONENT" = "rocm" ] || [ "$COMPONENT" = "rocm_smi" ]; then + export PAPI_ROCM_ROOT=`ls -d /opt/rocm-*` + export PAPI_ROCMSMI_ROOT=$PAPI_ROCM_ROOT/rocm_smi +fi + +if [ "$COMPONENT" = "infiniband_umad" ]; then + export PAPI_INFINIBAND_UMAD_ROOT=/usr +fi + +if [ "$COMPONENT" = "perf_event" ]; then + ./configure --enable-warnings +else + ./configure --enable-warnings --with-components=$COMPONENT +fi + +make -j4 + +utils/papi_component_avail + +# Make sure the $COMPONENT is active +utils/papi_component_avail | grep -A1000 'Active components' | grep -q "Name: $COMPONENT " + +if [ "$COMPONENT" != "cuda" ]; then + echo Testing + ./run_tests.sh +fi diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94e5790e3..4259c1e6a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,3 +62,36 @@ jobs: with: name: clang-analysis-output path: src/clang-analysis-output + papi_component_nodbg: + strategy: + matrix: + component: [perf_event, lmsensors, io, net, powercap, appio, coretemp, stealtime] + fail-fast: false + runs-on: cpu_intel + timeout-minutes: 60 + steps: + - uses: actions/checkout@v3 + - name: Test + run: .github/workflows/ci_nodbg.sh ${{matrix.component}} + papi_component_nvidia_nodbg: + strategy: + matrix: + component: [cuda, nvml] + fail-fast: false + runs-on: gpu_nvidia + timeout-minutes: 60 + steps: + - uses: actions/checkout@v3 + - name: Test + run: .github/workflows/ci_nodbg.sh ${{matrix.component}} + papi_component_amd_nodbg: + strategy: + matrix: + component: [rocm, rocm_smi] + fail-fast: false + runs-on: gpu_amd + timeout-minutes: 60 + steps: + - uses: actions/checkout@v3 + - name: Test + run: .github/workflows/ci_nodbg.sh ${{matrix.component}}