Skip to content

Commit 01cae00

Browse files
pxlxingliangFisherd99
authored andcommitted
Test: check if abacus end normally in CI test (deepmodeling#5634)
* Test: check if abacus end normally in CI test * comment out 312_NO_GO_wfc_get_wf --------- Co-authored-by: root <pxlxingliang>
1 parent 8bdaa0f commit 01cae00

File tree

2 files changed

+30
-20
lines changed

2 files changed

+30
-20
lines changed

tests/integrate/Autotest.sh

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,35 @@ for dir in $testdir; do
256256
mpirun -np $np $abacus > log.txt
257257
fi
258258

259+
# if ABACUS failed, print out the error message
260+
if [ $? -ne 0 ]; then
261+
echo -e "\e[0;31m[ERROR ]\e[0m $dir failed."
262+
let failed++
263+
failed_case_list+=$dir'\n'
264+
case_status+=$dir' 0\n'
265+
cat log.txt
266+
else
267+
# check the output
268+
test -d OUT.autotest || (echo "No 'OUT.autotest' dir presented. Some errors may happened in ABACUS." && exit 1)
269+
if test -z $g
270+
then
271+
bash -e ../../integrate/tools/catch_properties.sh result.out
272+
if [ $? -ne 0 ]; then
273+
echo -e "\e[0;31m [ERROR ] Fatal Error in catch_properties.sh \e[0m"
274+
let fatal++
275+
fatal_case_list+=$dir'\n'
276+
else
277+
my_threshold=$(get_threshold $threshold_file "threshold" $threshold)
278+
my_force_threshold=$(get_threshold $threshold_file "force_threshold" $force_threshold)
279+
my_stress_threshold=$(get_threshold $threshold_file "stress_threshold" $stress_threshold)
280+
my_fatal_threshold=$(get_threshold $threshold_file "fatal_threshold" $fatal_threshold)
281+
check_out result.out $my_threshold $my_force_threshold $my_stress_threshold $my_fatal_threshold
282+
fi
283+
else
284+
../tools/catch_properties.sh result.ref
285+
fi
286+
fi
287+
259288
if [ "$sanitize" == true ]; then
260289
echo -e "## Test case ${dir}\n" >> ${report}
261290
for diagnostic in asan.*; do
@@ -265,25 +294,6 @@ for dir in $testdir; do
265294
echo -e "\`\`\`\n" >> ${report}
266295
done
267296
fi
268-
#$abacus > log.txt
269-
test -d OUT.autotest || (echo "No 'OUT.autotest' dir presented. Some errors may happened in ABACUS." && exit 1)
270-
if test -z $g
271-
then
272-
bash -e ../../integrate/tools/catch_properties.sh result.out
273-
if [ $? -ne 0 ]; then
274-
echo -e "\e[0;31m [ERROR ] Fatal Error in catch_properties.sh \e[0m"
275-
let fatal++
276-
fatal_case_list+=$dir'\n'
277-
else
278-
my_threshold=$(get_threshold $threshold_file "threshold" $threshold)
279-
my_force_threshold=$(get_threshold $threshold_file "force_threshold" $force_threshold)
280-
my_stress_threshold=$(get_threshold $threshold_file "stress_threshold" $stress_threshold)
281-
my_fatal_threshold=$(get_threshold $threshold_file "fatal_threshold" $fatal_threshold)
282-
check_out result.out $my_threshold $my_force_threshold $my_stress_threshold $my_fatal_threshold
283-
fi
284-
else
285-
../tools/catch_properties.sh result.ref
286-
fi
287297
}
288298
echo ""
289299
cd ../

tests/integrate/CASES_CPU.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
311_NO_GO_elec_minus
225225
311_NO_GO_S2_elec_minus
226226
312_NO_GO_wfc_file
227-
312_NO_GO_wfc_get_wf
227+
#312_NO_GO_wfc_get_wf
228228
312_NO_GO_wfc_get_pchg
229229
312_NO_GO_wfc_out
230230
313_NO_GO_mulliken

0 commit comments

Comments
 (0)