Skip to content

Commit 477a2a5

Browse files
committed
add test for 3/5 processors(odd number)
1 parent 556b6af commit 477a2a5

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

source/module_pw/test/test_gnu.sh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,30 @@ tail -n $tailn Makefile.gnu >>Makefile
4646
make > /dev/null 2>&1
4747

4848
if ((i==0)) ;then
49+
echo "Test for Serial Version:"
4950
./pw_test.exe
5051
elif ((i==1)) ;then
52+
echo "Test for Serial Version with single precision:"
5153
./pw_test.exe
5254
echo "valgrind test:(1 processors)"
5355
valgrind ./pw_test.exe >_tmp.txt 2>&1
5456
cat _tmp.txt|egrep "(ERROR SUMMARY)|(lost)";
5557
else
58+
if((i==2)) ;then
59+
echo "Test for MPI Version:"
60+
elif((i==3)) ;then
61+
echo "Test for MPI Version with single precision:"
62+
fi
5663
echo "1 processor:"
5764
./pw_test.exe
5865
sleep 1
59-
echo "2 processors:"
60-
mpirun -np 2 ./pw_test.exe >_tmp.txt 2>&1
66+
echo "3 processors:"
67+
mpirun -np 3 ./pw_test.exe >_tmp.txt 2>&1
68+
cat _tmp.txt|grep PASSED
69+
cat _tmp.txt|grep FAILED
70+
sleep 1
71+
echo "5 processors:"
72+
mpirun -np 5 ./pw_test.exe >_tmp.txt 2>&1
6173
cat _tmp.txt|grep PASSED
6274
cat _tmp.txt|grep FAILED
6375
sleep 1
@@ -71,8 +83,11 @@ if ((i==3)) ;then
7183
echo "valgrind test:(1 processors)"
7284
valgrind ./pw_test.exe >_tmp.txt 2>&1
7385
cat _tmp.txt|egrep "(ERROR SUMMARY)|(lost)";
74-
echo "valgrind test:(2 processors)"
75-
mpirun -np 2 valgrind ./pw_test.exe >_tmp.txt 2>&1
86+
echo "valgrind test:(3 processors)"
87+
mpirun -np 3 valgrind ./pw_test.exe >_tmp.txt 2>&1
88+
cat _tmp.txt|egrep "(ERROR SUMMARY)|(lost)";
89+
echo "valgrind test:(5 processors)"
90+
mpirun -np 5 valgrind ./pw_test.exe >_tmp.txt 2>&1
7691
cat _tmp.txt|egrep "(ERROR SUMMARY)|(lost)";
7792
echo "valgrind test:(8 processors)"
7893
mpirun -np 8 valgrind ./pw_test.exe >_tmp.txt 2>&1

0 commit comments

Comments
 (0)