Add rush_larsen gpu omp fortran run
@@ -34,14 +34,19 @@ AOMPHIP=${AOMPHIP:-$AOMP}
# Use function to set and test AOMP_GPU
setaompgpu
-RUN_OPTIONS=${RUN_OPTIONS:-"openmp hip"}
+RUN_OPTIONS=${RUN_OPTIONS:-"openmp hip fomp"}
# OMP options
omp_cxx="$AOMP/bin/clang++"
-omp_flags="-O3 -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=$AOMP_GPU -DOMP -DOMP_TARGET_GPU"
+omp_flags="-O3 -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=$AOMP_GPU -DOMP -DOMP_TARGET_GPU -fopenmp-target-ignore-env-vars"
omp_dir="tests/rush_larsen/rush_larsen_gpu_omp"
omp_exec="rush_larsen_gpu_omp"
+fomp_f90="$AOMP/bin/flang"
+fomp_flags="-O3 -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=$AOMP_GPU -DOMP -DOMP_TARGET_GPU -g"
+fomp_dir="tests/rush_larsen/rush_larsen_gpu_omp_fort"
+fomp_exec="rush_larsen_gpu_omp_fort"
+
# HIP Options
hip_cxx="$AOMPHIP/bin/hipcc"
hip_flags="-D__HIP_PLATFORM_AMD__ -I${AOMPHIP}/include -O3 --cuda-gpu-arch=${AOMP_GPU} --rocm-path=${AOMPHIP} -x hip"
@@ -73,6 +78,13 @@ for option in $RUN_OPTIONS; do
if [ $? -ne 1 ]; then
./$hip_exec 100 10 2>&1 | tee -a $goulash_home/results.txt
fi
+ elif [ "$option" == "fomp" ]; then
+ cd $goulash_home/$fomp_dir
+ make clean
+ make FC="$fomp_f90" FCFLAGS="$fomp_flags" COMPILERID='-DCOMPILERID=\"amd\"'
+ if [ $? -ne 1 ]; then
+ ./$fomp_exec 100 10 2>&1 | tee -a $goulash_home/results.txt
+ fi
else
echo "ERROR: Option not recognized: $option."
exit 1
