@@ -9,6 +9,8 @@ nt=$OMP_NUM_THREADS # number of OpenMP threads, default is $OMP_NUM_THREADS
99threshold=0.0000001
1010force_threshold=0.0001
1111stress_threshold=0.001
12+ # descriptor mean threshold
13+ descriptor_threshold=0.00001
1214# check accuracy
1315ca=8
1416# specify the test cases file
@@ -55,6 +57,7 @@ echo "Number of threads: $nt"
5557echo " Test accuracy totenergy: $threshold eV"
5658echo " Test accuracy force: $force_threshold "
5759echo " Test accuracy stress: $stress_threshold "
60+ echo " Test accuracy descriptor mean: $descriptor_threshold "
5861echo " Check accuaracy: $ca "
5962echo " Test cases file: $cases_file "
6063echo " Test cases regex: $case "
@@ -84,6 +87,7 @@ check_out(){
8487 force_thr=$3
8588 stress_thr=$4
8689 fatal_thr=$5
90+ descriptor_thr=$6
8791
8892 # ------------------------------------------------------
8993 # outfile = result.out
@@ -139,7 +143,11 @@ check_out(){
139143 fatal_case_list+=$dir ' \n'
140144 break
141145 else
142- if [ $( check_deviation_pass $deviation $thr ) = 0 ]; then
146+ compare_thr=$thr
147+ if [[ $key == ml_desc_mean_* ]]; then
148+ compare_thr=$descriptor_thr
149+ fi
150+ if [ $( check_deviation_pass $deviation $compare_thr ) = 0 ]; then
143151 if [ $key == " totalforceref" ]; then
144152 if [ $( check_deviation_pass $deviation $force_thr ) = 0 ]; then
145153 echo -e " [WARNING ] " \
@@ -251,11 +259,15 @@ for dir in $testdir; do
251259 TIMEFORMAT=' [----------] Time elapsed: %R seconds'
252260 # parallel test
253261 time {
262+ run_np=$np
254263 if [ " $case " = " 282_NO_RPA" ]; then
255- mpirun -np 1 $abacus > log.txt
256- else
257- mpirun -np $np $abacus > log.txt
264+ run_np=1
265+ fi
266+ if grep -qE ' ^[[:space:]]*of_ml_gene_data[[:space:]]+1([[:space:]]|$)' INPUT; then
267+ # of_ml_gene_data supports single-rank only.
268+ run_np=1
258269 fi
270+ mpirun -np $run_np $abacus > log.txt
259271
260272 # if ABACUS failed, print out the error message
261273 if [ $? -ne 0 ]; then
@@ -279,7 +291,7 @@ for dir in $testdir; do
279291 my_force_threshold=$( get_threshold $threshold_file " force_threshold" $force_threshold )
280292 my_stress_threshold=$( get_threshold $threshold_file " stress_threshold" $stress_threshold )
281293 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
294+ check_out result.out $my_threshold $my_force_threshold $my_stress_threshold $my_fatal_threshold $descriptor_threshold
283295 fi
284296 else
285297 bash -e ../../integrate/tools/catch_properties.sh result.ref
0 commit comments