From 7aac093475e987e739e4f4bfe6e2f340f5a882ff Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Nov 2024 10:31:21 +0800 Subject: [PATCH 1/2] Test: check if abacus end normally in CI test --- tests/integrate/Autotest.sh | 48 ++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/tests/integrate/Autotest.sh b/tests/integrate/Autotest.sh index 34cd66bb29..674199f96a 100755 --- a/tests/integrate/Autotest.sh +++ b/tests/integrate/Autotest.sh @@ -256,6 +256,35 @@ for dir in $testdir; do mpirun -np $np $abacus > log.txt fi + # if ABACUS failed, print out the error message + if [ $? -ne 0 ]; then + echo -e "\e[0;31m[ERROR ]\e[0m $dir failed." + let failed++ + failed_case_list+=$dir'\n' + case_status+=$dir' 0\n' + cat log.txt + else + # check the output + test -d OUT.autotest || (echo "No 'OUT.autotest' dir presented. Some errors may happened in ABACUS." && exit 1) + if test -z $g + then + bash -e ../../integrate/tools/catch_properties.sh result.out + if [ $? -ne 0 ]; then + echo -e "\e[0;31m [ERROR ] Fatal Error in catch_properties.sh \e[0m" + let fatal++ + fatal_case_list+=$dir'\n' + else + my_threshold=$(get_threshold $threshold_file "threshold" $threshold) + my_force_threshold=$(get_threshold $threshold_file "force_threshold" $force_threshold) + my_stress_threshold=$(get_threshold $threshold_file "stress_threshold" $stress_threshold) + my_fatal_threshold=$(get_threshold $threshold_file "fatal_threshold" $fatal_threshold) + check_out result.out $my_threshold $my_force_threshold $my_stress_threshold $my_fatal_threshold + fi + else + ../tools/catch_properties.sh result.ref + fi + fi + if [ "$sanitize" == true ]; then echo -e "## Test case ${dir}\n" >> ${report} for diagnostic in asan.*; do @@ -265,25 +294,6 @@ for dir in $testdir; do echo -e "\`\`\`\n" >> ${report} done fi - #$abacus > log.txt - test -d OUT.autotest || (echo "No 'OUT.autotest' dir presented. Some errors may happened in ABACUS." && exit 1) - if test -z $g - then - bash -e ../../integrate/tools/catch_properties.sh result.out - if [ $? -ne 0 ]; then - echo -e "\e[0;31m [ERROR ] Fatal Error in catch_properties.sh \e[0m" - let fatal++ - fatal_case_list+=$dir'\n' - else - my_threshold=$(get_threshold $threshold_file "threshold" $threshold) - my_force_threshold=$(get_threshold $threshold_file "force_threshold" $force_threshold) - my_stress_threshold=$(get_threshold $threshold_file "stress_threshold" $stress_threshold) - my_fatal_threshold=$(get_threshold $threshold_file "fatal_threshold" $fatal_threshold) - check_out result.out $my_threshold $my_force_threshold $my_stress_threshold $my_fatal_threshold - fi - else - ../tools/catch_properties.sh result.ref - fi } echo "" cd ../ From 5de416aac79a4c1cfbce6dab39efeeb410bb07ce Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Nov 2024 11:23:17 +0800 Subject: [PATCH 2/2] comment out 312_NO_GO_wfc_get_wf --- tests/integrate/CASES_CPU.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integrate/CASES_CPU.txt b/tests/integrate/CASES_CPU.txt index 1881752d3a..85b29a681b 100644 --- a/tests/integrate/CASES_CPU.txt +++ b/tests/integrate/CASES_CPU.txt @@ -224,7 +224,7 @@ 311_NO_GO_elec_minus 311_NO_GO_S2_elec_minus 312_NO_GO_wfc_file -312_NO_GO_wfc_get_wf +#312_NO_GO_wfc_get_wf 312_NO_GO_wfc_get_pchg 312_NO_GO_wfc_out 313_NO_GO_mulliken