Skip to content

Commit

Permalink
Update test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gihanmudalige committed Feb 18, 2024
1 parent 4f54e1e commit 147da76
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 210 deletions.
8 changes: 2 additions & 6 deletions apps/c/CloverLeaf/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export SOURCE_AMD_HIP=source_amd_rocm-5.4.3_pythonenv
#export TELOS=TRUE
#export KOS=TRUE

#<<comment

if [[ -v TELOS || -v KOS ]]; then

#============================ Test with Intel Classic Compilers==========================================
Expand All @@ -23,8 +21,8 @@ source ../../scripts/$SOURCE_INTEL
#make -j -B
make clean
make
cd $OPS_INSTALL_PATH/../apps/c/CloverLeaf

cd $OPS_INSTALL_PATH/../apps/c/CloverLeaf
make clean
rm -f .generated
make IEEE=1 cloverleaf_dev_seq cloverleaf_dev_mpi cloverleaf_seq cloverleaf_tiled cloverleaf_openmp cloverleaf_mpi \
Expand Down Expand Up @@ -118,8 +116,6 @@ echo "All Intel classic complier based applications ---- PASSED"

fi

#comment

if [[ -v TELOS ]]; then

#============================ Test with Intel SYCL Compilers==========================================
Expand Down Expand Up @@ -224,7 +220,7 @@ rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -f clover.out

if [[ -v CUDA_INSTALL_PATH ]]; then
make IEEE=1 cloverleaf_cuda cloverleaf_mpi_cuda cloverleaf_mpi_cuda_tiled
make IEEE=1 cloverleaf_cuda cloverleaf_mpi_cuda cloverleaf_mpi_cuda_tiled
#cloverleaf_mpi_openacc_tiled cloverleaf_openacc cloverleaf_mpi_openacc \

echo '============> Running CUDA'
Expand Down
5 changes: 3 additions & 2 deletions apps/c/TeaLeaf/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ fi
echo "All Intel classic complier based applications ---- PASSED"



if [[ -v TELOS ]]; then

#============================ Test with Intel SYCL Compilers==========================================
Expand All @@ -141,7 +142,7 @@ rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm perf_out

echo '============> Running MPI+SYCL on CPU'
$MPI_INSTALL_PATH/bin/mpirun -np 20 ./tealeaf_mpi_sycl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=256 OPS_BLOCK_SIZE_Y=1 > perf_out
$MPI_INSTALL_PATH/bin/mpirun -np 8 ./tealeaf_mpi_sycl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=256 OPS_BLOCK_SIZE_Y=1 > perf_out
grep "Total Wall time" perf_out
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
Expand Down Expand Up @@ -207,7 +208,7 @@ rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -f tea.out

if [[ -v CUDA_INSTALL_PATH ]]; then
make IEEE=1 tealeaf_cuda tealeaf_mpi_cuda tealeaf_mpi_cuda_tiled
make IEEE=1 tealeaf_cuda tealeaf_mpi_cuda tealeaf_mpi_cuda_tiled
#tealeaf_openacc tealeaf_mpi_openacc tealeaf_mpi_openacc_tiled

echo '============> Running CUDA'
Expand Down
29 changes: 21 additions & 8 deletions apps/c/adi/test.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
#!/bin/bash
set -e
#<<COMMENT
cd $OPS_INSTALL_PATH/c

export SOURCE_INTEL=source_intel_2021.3_pythonenv

#export AMOS=TRUE
#export DMOS=TRUE
#export TELOS=TRUE
#export KOS=TRUE

if [[ -v TELOS || -v KOS ]]; then

#============================ Test with Intel Classic Compilers==========================================
echo "Testing Intel classic complier based applications ---- "

source ../../scripts/$SOURCE_INTEL

#<<COMMENT
#==== Build and copy Referance application from the TDMA Library ====
#build lib first
# TDMA_INSTALL_PATH=/path/to/tridsolver/scalar/build

# Build and copy Referance application from the TDMA Library
# build lib first
cd $TDMA_INSTALL_PATH/../build
rm -rf ./*
cmake .. -DCUDA_cublas_LIBRARY=/opt/cuda/10.2.89/lib64/libcublas.so -DCMAKE_BUILD_TYPE=Release -DBUILD_FOR_CPU=ON -DBUILD_FOR_GPU=ON -DBUILD_FOR_SN=ON -DBUILD_FOR_MPI=ON -DCMAKE_INSTALL_PREFIX=$TDMA_INSTALL_PATH/../
Expand All @@ -22,7 +32,6 @@ cd $OPS_INSTALL_PATH/c
make clean
make IEEE=1

#COMMENT

#now build application
cd $TDMA_INSTALL_PATH/../../apps/adi/build/
Expand All @@ -49,7 +58,7 @@ echo '============> Running Referance Solution adi_orig'
./adi_orig > perf_out
rm perf_out

#============================ Test adi with Intel Compilers==========================================================
#============== Run ops ADI application ========================

echo '============> Running DEV_SEQ'
./adi_dev_seq > perf_out
Expand Down Expand Up @@ -244,4 +253,8 @@ else
fi

rm -rf *.h5
echo "All applications PASSED : Exiting Test Script"
echo "All Intel classic complier based applications ---- PASSED"

fi

echo "---------- Exiting Test Script "
175 changes: 88 additions & 87 deletions apps/c/lowdim_test/test.sh
Original file line number Diff line number Diff line change
@@ -1,54 +1,30 @@
#!/bin/bash
set -e
cd ../../../ops/c
<<COMMENT
if [ -x "$(command -v enroot)" ]; then
cd -
enroot start --root --mount $OPS_INSTALL_PATH/../:/tmp/OPS --rw cuda112hip sh -c 'cd /tmp/OPS/apps/c/lowdim_test; ./test.sh'
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm perf_out
echo "All HIP complied applications PASSED"
fi

if [[ -v HIP_INSTALL_PATH ]]; then
source ../../scripts/$SOURCE_HIP
make -j -B
cd -
make clean
rm -f .generated
make lowdim_hip lowdim_mpi_hip -j
echo '============> Running HIP'
./lowdim_hip OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi;
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5
echo '============> Running MPI+HIP'
mpirun --allow-run-as-root -np 2 ./lowdim_mpi_hip OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi;
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5
echo "All HIP complied applications PASSED : Moving no to Intel Compiler Tests " > perf_out
exit 0
fi
COMMENT
export SOURCE_INTEL=source_intel_2021.3_pythonenv
export SOURCE_PGI=source_pgi_nvhpc_23_pythonenv
export SOURCE_INTEL_SYCL=source_intel_2021.3_sycl_pythonenv
export SOURCE_AMD_HIP=source_amd_rocm-5.4.3_pythonenv

#export AMOS=TRUE
#export DMOS=TRUE
#export TELOS=TRUE
#export KOS=TRUE

if [[ -v TELOS || -v KOS ]]; then

#============================ Test with Intel Classic Compilers==========================================
echo "Testing Intel classic complier based applications ---- "
cd $OPS_INSTALL_PATH/c
source ../../scripts/$SOURCE_INTEL
make -j -B
cd $OPS_INSTALL_PATH/../apps/c/lowdim_test
make clean
rm -f .generated
make IEEE=1 -j
make

cd $OPS_INSTALL_PATH/../apps/c/lowdim_test
make clean
make IEEE=1

#============================ Test lowdim with Intel Compilers ==========================================
echo '============> Running SEQ'
./lowdim_dev_mpi > perf_out
mv output.h5 output_seq.h5
Expand Down Expand Up @@ -88,6 +64,7 @@ grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5

if [[ -v CUDA_INSTALL_PATH ]]; then
echo '============> Running CUDA'
./lowdim_cuda OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
Expand All @@ -107,59 +84,71 @@ rm -rf perf_out output.h5
#echo '============> Running MPI+CUDA with GPU-Direct'
#MV2_USE_CUDA=1 $MPI_INSTALL_PATH/bin/mpirun -np 2 ./lowdim_mpi_cuda -gpudirect OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out


#grep "PASSED" perf_out
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
#rm -rf perf_out output.h5

echo '============> Running OpenCL on CPU'
./lowdim_opencl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=512 OPS_BLOCK_SIZE_Y=1 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi;
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5
fi

echo '============> Running OpenCL on GPU'
./lowdim_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
./lowdim_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
echo "All Intel classic complier based applications ---- PASSED"

fi

if [[ -v TELOS ]]; then

#============================ Test with Intel SYCL Compilers==========================================
echo "Testing Intel SYCL complier based applications ---- "
cd $OPS_INSTALL_PATH/c
source ../../scripts/$SOURCE_INTEL_SYCL

make clean
make
cd $OPS_INSTALL_PATH/../apps/c/lowdim_test

make clean
make IEEE=1 lowdim_sycl lowdim_mpi_sycl lowdim_mpi_sycl_tiled

echo '============> Running SYCL on CPU'
./lowdim_sycl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=512 OPS_BLOCK_SIZE_Y=1 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi;
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5

echo '============> Running MPI+OpenCL on CPU'
$MPI_INSTALL_PATH/bin/mpirun -np 20 ./lowdim_mpi_opencl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=256 OPS_BLOCK_SIZE_Y=1 > perf_out
$MPI_INSTALL_PATH/bin/mpirun -np 20 ./lowdim_mpi_opencl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=256 OPS_BLOCK_SIZE_Y=1 > perf_out
echo '============> Running MPI+SYCL on CPU'
$MPI_INSTALL_PATH/bin/mpirun -np 12 ./lowdim_mpi_sycl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=256 OPS_BLOCK_SIZE_Y=1 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi;
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5

echo '============> Running MPI+OpenCL on GPU'
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./lowdim_mpi_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./lowdim_mpi_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
echo '============> Running MPI+SYCL+Tiled on CPU'
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./lowdim_mpi_sycl_tiled OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi;
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5

echo "All Intel complied applications PASSED : Moving no to PGI Compiler Tests "
echo "All Intel SYCL complier based applications ---- PASSED"

fi

cd -
source ../../scripts/$SOURCE_PGI
if [[ -v TELOS ]]; then

#============================ Test with PGI Compilers==========================================
echo "Testing PGI/NVHPC complier based applications ---- "
cd $OPS_INSTALL_PATH/c
source ../../scripts/$SOURCE_PGI
make clean
make -j
cd -
#make -j
make
cd $OPS_INSTALL_PATH/../apps/c/lowdim_test
make clean
make -j
make IEEE=1

#============================ Test lowdim with PGI Compilers ==========================================
echo '============> Running OpenMP'
KMP_AFFINITY=compact OMP_NUM_THREADS=12 ./lowdim_openmp > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
Expand Down Expand Up @@ -192,6 +181,7 @@ grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5

if [[ -v CUDA_INSTALL_PATH ]]; then
echo '============> Running CUDA'
./lowdim_cuda OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
Expand Down Expand Up @@ -223,48 +213,59 @@ rm -rf perf_out output.h5
#grep "PASSED" perf_out
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
#rm -rf perf_out output.h5
fi

echo '============> Running OpenCL on GPU'
./lowdim_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
./lowdim_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
echo '============> Running OMPOFFLOAD'
./lowdim_ompoffload OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi;
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5

#echo '============> Running MPI+OpenCL on CPU'
#$MPI_INSTALL_PATH/bin/mpirun -np 20 ./lowdim_mpi_opencl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=256 OPS_BLOCK_SIZE_Y=1 > perf_out
#$MPI_INSTALL_PATH/bin/mpirun -np 20 ./lowdim_mpi_opencl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=256 OPS_BLOCK_SIZE_Y=1 > perf_out


#grep "PASSED" perf_out
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
#rm -rf perf_out output.h5

echo '============> Running MPI+OpenCL on GPU'
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./lowdim_mpi_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./lowdim_mpi_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
#COMMENT
echo '============> Running MPI+OMPOFFLOAD'
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./lowdim_mpi_ompoffload numawrap2 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi;
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5
echo "All PGI complied applications PASSED : Exiting Test Script "

echo "All PGI complier based applications ---- PASSED"

fi

if [[ -v AMOS ]]; then

echo "Testing AMD HIP complier based applications ---- "
cd $OPS_INSTALL_PATH/c
source ../../scripts/$SOURCE_AMD_HIP
make clean
make
cd $OPS_INSTALL_PATH/../apps/c/lowdim_test

make clean
make lowdim_hip lowdim_mpi_hip

echo '============> Running OpenACC'
./lowdim_openacc OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out
echo '============> Running HIP'
./lowdim_hip OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi;
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5
#COMMENT
echo '============> Running MPI+OpenACC'
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./lowdim_mpi_openacc numawrap2 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out

echo '============> Running MPI+HIP'
mpirun --allow-run-as-root -np 2 ./lowdim_mpi_hip OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out
#$HDF5_INSTALL_PATH/bin/h5diff output.h5 output_seq.h5
#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi;
grep "PASSED" perf_out
rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi
rm -rf perf_out output.h5
echo "All PGI complied applications PASSED : Exiting Test Script "

echo "All AMD HIP complier based applications ---- PASSED"

fi

echo "---------- Exiting Test Script "
Loading

0 comments on commit 147da76

Please sign in to comment.