From 147da76519620a83c53b1c7d876fa54395b2bdab Mon Sep 17 00:00:00 2001 From: "g.mudalige@warwick.ac.uk" Date: Mon, 12 Feb 2024 19:12:50 +0000 Subject: [PATCH] Update test scripts --- apps/c/CloverLeaf/test.sh | 8 +- apps/c/TeaLeaf/test.sh | 5 +- apps/c/adi/test.sh | 29 ++- apps/c/lowdim_test/test.sh | 175 +++++++++--------- apps/c/mb_shsgc/Max_datatransfer/test.sh | 214 +++++++++++------------ 5 files changed, 221 insertions(+), 210 deletions(-) diff --git a/apps/c/CloverLeaf/test.sh b/apps/c/CloverLeaf/test.sh index eeeac0321..f803e5bfc 100755 --- a/apps/c/CloverLeaf/test.sh +++ b/apps/c/CloverLeaf/test.sh @@ -12,8 +12,6 @@ export SOURCE_AMD_HIP=source_amd_rocm-5.4.3_pythonenv #export TELOS=TRUE #export KOS=TRUE -#< Running CUDA' diff --git a/apps/c/TeaLeaf/test.sh b/apps/c/TeaLeaf/test.sh index 0188d2d04..2813e8c4c 100755 --- a/apps/c/TeaLeaf/test.sh +++ b/apps/c/TeaLeaf/test.sh @@ -118,6 +118,7 @@ fi echo "All Intel classic complier based applications ---- PASSED" + if [[ -v TELOS ]]; then #============================ Test with Intel SYCL Compilers========================================== @@ -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 @@ -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' diff --git a/apps/c/adi/test.sh b/apps/c/adi/test.sh index 1497ae848..abd77eca3 100755 --- a/apps/c/adi/test.sh +++ b/apps/c/adi/test.sh @@ -1,14 +1,24 @@ #!/bin/bash set -e -#< 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 @@ -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 " diff --git a/apps/c/lowdim_test/test.sh b/apps/c/lowdim_test/test.sh index add68b90e..1bca6952b 100755 --- a/apps/c/lowdim_test/test.sh +++ b/apps/c/lowdim_test/test.sh @@ -1,54 +1,30 @@ #!/bin/bash set -e cd ../../../ops/c -< 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 @@ -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 @@ -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 @@ -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 @@ -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 " \ No newline at end of file diff --git a/apps/c/mb_shsgc/Max_datatransfer/test.sh b/apps/c/mb_shsgc/Max_datatransfer/test.sh index f205f7c94..045b4c293 100755 --- a/apps/c/mb_shsgc/Max_datatransfer/test.sh +++ b/apps/c/mb_shsgc/Max_datatransfer/test.sh @@ -1,59 +1,29 @@ #!/bin/bash set -e cd $OPS_INSTALL_PATH/c -#f [ -x "$(command -v enroot)" ]; then -# ----- -# Fails to compile with NVCC -# ----- -# cd - -# enroot start --root --mount $OPS_INSTALL_PATH/../:/tmp/OPS --rw cuda112hip sh -c 'cd /tmp/OPS/apps/c/mb_shsgc/Max_datatransfer; ./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" -#i - -< Running HIP' - ./shsgc_hip OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out - grep "Pre shock error is:" perf_out - grep "Post shock error is:" perf_out - grep "Post shock Error is" perf_out - grep "Total Wall time" perf_out - grep -e "acceptable" -e "correct" perf_out - rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi - rm perf_out - - echo '============> Running MPI+HIP' - mpirun --allow-run-as-root -np 2 ./shsgc_mpi_hip OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out - grep "Pre shock error is:" perf_out - grep "Post shock error is:" perf_out - grep "Post shock Error is" perf_out - grep "Total Wall time" perf_out - grep -e "acceptable" -e "correct" perf_out - rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi - rm perf_out - 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/mb_shsgc/Max_datatransfer make clean -rm -f .generated -make IEEE=1 -j +make +cd $OPS_INSTALL_PATH/../apps/c/mb_shsgc/Max_datatransfer +make clean +make IEEE=1 #============================ Test SHSGC with Intel Compilers========================================================== @@ -97,6 +67,7 @@ grep -e "acceptable" -e "correct" perf_out rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi rm perf_out +if [[ -v CUDA_INSTALL_PATH ]]; then echo '============> Running CUDA' ./shsgc_cuda OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out grep "Pre shock error is:" perf_out @@ -126,22 +97,31 @@ rm perf_out #grep -e "acceptable" -e "correct" perf_out #rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi #rm perf_out +fi -< Running OpenCL on CPU' -./shsgc_opencl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=512 OPS_BLOCK_SIZE_Y=1 > perf_out -grep "Pre shock error is:" perf_out -grep "Post shock error is:" perf_out -grep "Post shock Error is" perf_out -grep "Total Wall time" perf_out -grep -e "acceptable" -e "correct" perf_out -rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi -rm perf_out -COMMENT +#cleanup +rm rhoin1.* x1.* rhoout1.* rhoin1 rhoout1 x1 + +echo "All Intel classic complier based applications ---- PASSED" + +fi -echo '============> Running OpenCL on GPU' -./shsgc_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out -./shsgc_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out + +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/mb_shsgc/Max_datatransfer + +make clean +#make IEEE=1 -j +make IEEE=1 shsgc_sycl shsgc_mpi_sycl shsgc_mpi_sycl_tiled + +echo '============> Running SYCL on CPU' +./shsgc_sycl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out grep "Pre shock error is:" perf_out grep "Post shock error is:" perf_out grep "Post shock Error is" perf_out @@ -150,10 +130,8 @@ grep -e "acceptable" -e "correct" perf_out rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi rm perf_out -< Running MPI+OpenCL on CPU' -$MPI_INSTALL_PATH/bin/mpirun -np 20 ./shsgc_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 ./shsgc_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 ./shsgc_mpi_sycl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=256 OPS_BLOCK_SIZE_Y=1 > perf_out grep "Pre shock error is:" perf_out grep "Post shock error is:" perf_out grep "Post shock Error is" perf_out @@ -161,11 +139,9 @@ grep "Total Wall time" perf_out grep -e "acceptable" -e "correct" perf_out rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi rm perf_out -COMMENT -echo '============> Running MPI+OpenCL on GPU' -$MPI_INSTALL_PATH/bin/mpirun -np 2 ./shsgc_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 ./shsgc_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 ./shsgc_mpi_sycl_tiled OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out grep "Pre shock error is:" perf_out grep "Post shock error is:" perf_out grep "Post shock Error is" perf_out @@ -177,16 +153,24 @@ rm perf_out #cleanup rm rhoin1.* x1.* rhoout1.* rhoin1 rhoout1 x1 -cd - -source ../../scripts/$SOURCE_PGI +echo "All Intel SYCL complier based applications ---- PASSED" +fi + + +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 -cd - -make clean +#make -j make +cd $OPS_INSTALL_PATH/../apps/c/mb_shsgc/Max_datatransfer +make clean +make IEEE=1 -#============================ Test SHSGC with PGI Compilers========================================================== echo '============> Running OpenMP' KMP_AFFINITY=compact OMP_NUM_THREADS=10 ./shsgc_openmp > perf_out grep "Pre shock error is:" perf_out @@ -227,6 +211,7 @@ grep -e "acceptable" -e "correct" perf_out rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi rm perf_out +if [[ -v CUDA_INSTALL_PATH ]]; then echo '============> Running CUDA' ./shsgc_cuda OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out grep "Pre shock error is:" perf_out @@ -246,6 +231,17 @@ grep "Total Wall time" perf_out grep -e "acceptable" -e "correct" perf_out rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi rm perf_out + +echo '============> Running MPI+CUDA+Tiled' +$MPI_INSTALL_PATH/bin/mpirun -np 2 ./shsgc_mpi_cuda_tiled OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out +grep "Pre shock error is:" perf_out +grep "Post shock error is:" perf_out +grep "Post shock Error is" perf_out +grep "Total Wall time" perf_out +grep -e "acceptable" -e "correct" perf_out +rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi +rm perf_out + #echo '============> Running MPI+CUDA with GPU-Direct' #MV2_USE_CUDA=1 $MPI_INSTALL_PATH/bin/mpirun -np 2 ./shsgc_mpi_cuda -gpudirect OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out #grep "Pre shock error is:" perf_out @@ -256,19 +252,10 @@ rm perf_out #rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi #rm perf_out -#echo '============> Running OpenCL on CPU' -#./shsgc_opencl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=512 OPS_BLOCK_SIZE_Y=1 > perf_out -#grep "Pre shock error is:" perf_out -#grep "Post shock error is:" perf_out -#grep "Post shock Error is" perf_out -#grep "Total Wall time" perf_out -#grep -e "acceptable" -e "correct" perf_out -#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi -#rm perf_out +fi -echo '============> Running OpenCL on GPU' -./shsgc_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out -./shsgc_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out +echo '============> Running OMPOFFLOAD' +./shsgc_offload OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out grep "Pre shock error is:" perf_out grep "Post shock error is:" perf_out grep "Post shock Error is" perf_out @@ -277,29 +264,37 @@ grep -e "acceptable" -e "correct" perf_out rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi rm perf_out -#echo '============> Running MPI+OpenCL on CPU' -#$MPI_INSTALL_PATH/bin/mpirun -np 20 ./shsgc_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 ./shsgc_mpi_opencl OPS_CL_DEVICE=0 OPS_BLOCK_SIZE_X=256 OPS_BLOCK_SIZE_Y=1 > perf_out -#grep "Pre shock error is:" perf_out -#grep "Post shock error is:" perf_out -#grep "Post shock Error is" perf_out -#grep "Total Wall time" perf_out -#grep -e "acceptable" -e "correct" perf_out -#rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi -#rm perf_out - -echo '============> Running MPI+OpenCL on GPU' -$MPI_INSTALL_PATH/bin/mpirun -np 2 ./shsgc_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 ./shsgc_mpi_opencl OPS_CL_DEVICE=1 OPS_BLOCK_SIZE_X=32 OPS_BLOCK_SIZE_Y=4 > perf_out +echo '============> Running MPI+OMPOFFLOAD' +$MPI_INSTALL_PATH/bin/mpirun -np 2 ./shsgc_mpi_offload OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out grep "Pre shock error is:" perf_out grep "Post shock error is:" perf_out grep "Post shock Error is" perf_out grep "Total Wall time" perf_out grep -e "acceptable" -e "correct" perf_out rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi +rm perf_out + +#cleanup +rm rhoin1.* x1.* rhoout1.* rhoin1 rhoout1 x1 + +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/mb_shsgc/Max_datatransfer +make clean +make IEEE=1 shsgc_hip shsgc_mpi_hip -echo '============> Running OpenACC' -./shsgc_openacc OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out +echo '============> Running HIP' +./shsgc_hip OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out grep "Pre shock error is:" perf_out grep "Post shock error is:" perf_out grep "Post shock Error is" perf_out @@ -308,8 +303,8 @@ grep -e "acceptable" -e "correct" perf_out rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi rm perf_out -echo '============> Running MPI+OpenACC' -$MPI_INSTALL_PATH/bin/mpirun -np 2 ./shsgc_mpi_openacc OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out +echo '============> Running MPI+HIP' +mpirun --allow-run-as-root -np 2 ./shsgc_mpi_hip OPS_BLOCK_SIZE_X=64 OPS_BLOCK_SIZE_Y=4 > perf_out grep "Pre shock error is:" perf_out grep "Post shock error is:" perf_out grep "Post shock Error is" perf_out @@ -318,6 +313,11 @@ grep -e "acceptable" -e "correct" perf_out rc=$?; if [[ $rc != 0 ]]; then echo "TEST FAILED";exit $rc; fi rm perf_out +echo "All AMD HIP complier based applications ---- PASSED" + #cleanup rm rhoin1.* x1.* rhoout1.* rhoin1 rhoout1 x1 -echo "All PGI Tests Passed. Exiting test script" + +fi + +echo "---------- Exiting Test Script "