diff --git a/.github/scripts/run_build.sh b/.github/scripts/run_build.sh index 9da46e565..fac5f1ce5 100755 --- a/.github/scripts/run_build.sh +++ b/.github/scripts/run_build.sh @@ -75,7 +75,7 @@ if [ "${HIP}" == "true" ]; then echo echo "enabling HIP" echo - hip=(--with-hip HIPCC=g++ HIP_FLAGS="-O2 -g -std=c++17" HIP_PLATFORM=cpu HIP_INC=./external_libs/ROCm-HIP-CPU/include HIP_LIBS="-ltbb -lpthread -lstdc++") + hip=(--with-hip HIPCC=g++ HIP_FLAGS="-O2 -g -std=c++17" HIP_PLATFORM=cpu HIP_INC=./external_libs/ROCm-HIP-CPU/include HIP_LIBS="-ltbb -lpthread -lstdc++ -lmpi_cxx") else hip=() fi diff --git a/.github/scripts/run_install.sh b/.github/scripts/run_install.sh index 60e12b99f..e0bb0a9d2 100755 --- a/.github/scripts/run_install.sh +++ b/.github/scripts/run_install.sh @@ -159,7 +159,7 @@ if [ "${EMC_MODEL}" == "true" ]; then echo echo "current dir: `pwd`" cd DATA/IRIS_EMC/ - wget --tries=3 https://ds.iris.edu/files/products/emc/emc-files/Alaska.JointInversion-RF+Vph+HV-1.Berg.2020-nc4.nc + wget --quiet --tries=3 https://ds.iris.edu/files/products/emc/emc-files/Alaska.JointInversion-RF+Vph+HV-1.Berg.2020-nc4.nc # checks exit code if [[ $? -ne 0 ]]; then exit 1; fi ln -s Alaska.JointInversion-RF+Vph+HV-1.Berg.2020-nc4.nc model.nc diff --git a/.github/scripts/run_tests.sh b/.github/scripts/run_tests.sh index ed53be74d..8f742cfa3 100755 --- a/.github/scripts/run_tests.sh +++ b/.github/scripts/run_tests.sh @@ -44,16 +44,16 @@ my_kernel_test(){ RHO=`grep -E 'maximum value of rho[[:space:]]+kernel' $file_ref | cut -d = -f 2 | tr -d ' '` KAPPA=`grep -E 'maximum value of kappa[[:space:]]+kernel' $file_ref | cut -d = -f 2 | tr -d ' '` MU=`grep -E 'maximum value of mu[[:space:]]+kernel' $file_ref | cut -d = -f 2 | tr -d ' '` - KAPPAV=`grep -E 'maximum value of kappav[[:space:]]+kernel' $file_ref | cut -d = -f 2 | tr -d ' '` - MUV=`grep -E 'maximum value of muv[[:space:]]+kernel' $file_ref | cut -d = -f 2 | tr -d ' '` + ALPHAV=`grep -E 'maximum value of alphav[[:space:]]+kernel' $file_ref | cut -d = -f 2 | tr -d ' '` + BETAV=`grep -E 'maximum value of betav[[:space:]]+kernel' $file_ref | cut -d = -f 2 | tr -d ' '` # need at least rho & kappa (for acoustic kernels) if [ "$RHO" == "" ]; then - echo " missing reference kernel values: RHO=$RHO | KAPPA=$KAPPA KAPPAV=$KAPPAV | MU=$MU MUV=$MUV" + echo " missing reference kernel values: RHO=$RHO | KAPPA=$KAPPA MU=$MU | ALPHAV=$ALPHAV BETAV=$BETAV" echo exit 1 else - echo " reference kernel values: RHO=$RHO | KAPPA=$KAPPA KAPPAV=$KAPPAV | MU=$MU MUV=$MUV" + echo " reference kernel values: RHO=$RHO | KAPPA=$KAPPA MU=$MU | ALPHAV=$ALPHAV BETAV=$BETAV" fi # compares with test output - using a relative tolerance of 0.001 (1 promille) with respect to expected value # final test result @@ -72,13 +72,6 @@ my_kernel_test(){ echo "" | awk '{diff=ex-val;diff_abs=(diff >= 0)? diff:-diff;diff_rel=diff_abs/ex;print " value: expected = "ex" gotten = "val" - difference absolute = "diff_abs" relative = "diff_rel; if (diff_rel>0.001){print " failed"; exit 1;}else{print " good"; exit 0;} }' ex=$KAPPA val=$VAL if [[ $? -ne 0 ]]; then PASSED=1; fi fi - # checks kappav kernel value (if anisotropic kernels) - if [ "$KAPPAV" != "" ]; then - VAL=`grep -E 'maximum value of kappav[[:space:]]+kernel' $file_out | cut -d = -f 2 | tr -d ' '` - echo "kernel kappav: $VAL" - echo "" | awk '{diff=ex-val;diff_abs=(diff >= 0)? diff:-diff;diff_rel=diff_abs/ex;print " value: expected = "ex" gotten = "val" - difference absolute = "diff_abs" relative = "diff_rel; if (diff_rel>0.001){print " failed"; exit 1;}else{print " good"; exit 0;} }' ex=$KAPPAV val=$VAL - if [[ $? -ne 0 ]]; then PASSED=1; fi - fi # checks mu kernel value if [ "$MU" != "" ]; then VAL=`grep -E 'maximum value of mu[[:space:]]+kernel' $file_out | cut -d = -f 2 | tr -d ' '` @@ -86,11 +79,18 @@ my_kernel_test(){ echo "" | awk '{diff=ex-val;diff_abs=(diff >= 0)? diff:-diff;diff_rel=diff_abs/ex;print " value: expected = "ex" gotten = "val" - difference absolute = "diff_abs" relative = "diff_rel; if (diff_rel>0.001){print " failed"; exit 1;}else{print " good"; exit 0;} }' ex=$MU val=$VAL if [[ $? -ne 0 ]]; then PASSED=1; fi fi - # checks muv kernel value (if anisotropic kernels) - if [ "$MUV" != "" ]; then - VAL=`grep -E 'maximum value of muv[[:space:]]+kernel' $file_out | cut -d = -f 2 | tr -d ' '` - echo "kernel muv : $VAL" - echo "" | awk '{diff=ex-val;diff_abs=(diff >= 0)? diff:-diff;diff_rel=diff_abs/ex;print " value: expected = "ex" gotten = "val" - difference absolute = "diff_abs" relative = "diff_rel; if (diff_rel>0.001){print " failed"; exit 1;}else{print " good"; exit 0;} }' ex=$MUV val=$VAL + # checks alphav kernel value (if anisotropic kernels) + if [ "$ALPHAV" != "" ]; then + VAL=`grep -E 'maximum value of alphav[[:space:]]+kernel' $file_out | cut -d = -f 2 | tr -d ' '` + echo "kernel alphav: $VAL" + echo "" | awk '{diff=ex-val;diff_abs=(diff >= 0)? diff:-diff;diff_rel=diff_abs/ex;print " value: expected = "ex" gotten = "val" - difference absolute = "diff_abs" relative = "diff_rel; if (diff_rel>0.001){print " failed"; exit 1;}else{print " good"; exit 0;} }' ex=$ALPHAV val=$VAL + if [[ $? -ne 0 ]]; then PASSED=1; fi + fi + # checks betav kernel value (if anisotropic kernels) + if [ "$BETAV" != "" ]; then + VAL=`grep -E 'maximum value of betav[[:space:]]+kernel' $file_out | cut -d = -f 2 | tr -d ' '` + echo "kernel betav : $VAL" + echo "" | awk '{diff=ex-val;diff_abs=(diff >= 0)? diff:-diff;diff_rel=diff_abs/ex;print " value: expected = "ex" gotten = "val" - difference absolute = "diff_abs" relative = "diff_rel; if (diff_rel>0.001){print " failed"; exit 1;}else{print " good"; exit 0;} }' ex=$BETAV val=$VAL if [[ $? -ne 0 ]]; then PASSED=1; fi fi # overall pass diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1786944d7..442639fa0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -638,6 +638,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: true # needs submodule content in folder external_libs/ROCm-HIP-CPU/ - name: Install packages env: