-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: tests should be built without -O0
Tests should make sure real use cases work as expected. Some tests might not working correctly if -O0 is used as optimization level in the compiler. For example, the ROCm runtime submits a kernel of 4 waves if the tests are built using -O0, which makes the tests fail.
- Loading branch information
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters