-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathtestInteractions.sh.in
56 lines (50 loc) · 1.79 KB
/
testInteractions.sh.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
echo ""
rm -f test_nonsym_density_serial.dat test_nonsym_density_1_vec.dat test_nonsym_density_2_vec.dat test_nonsym_force_1_vec.dat test_nonsym_force_2_vec.dat
echo "Running ./testInteractions"
./testInteractions
if [ $? != 0 ]; then
echo "testInteractions is redundant when vectorisation is disabled"
else
if [ -e test_nonsym_density_serial.dat ]
then
if python3 @srcdir@/difffloat.py test_nonsym_density_serial.dat test_nonsym_density_1_vec.dat @srcdir@/tolerance_testInteractions.dat
then
echo "Calculating density using 1 vector accuracy test passed"
else
echo "Calculating density using 1 vector accuracy test failed"
exit 1
fi
if python3 @srcdir@/difffloat.py test_nonsym_density_serial.dat test_nonsym_density_2_vec.dat @srcdir@/tolerance_testInteractions.dat
then
echo "Calculating density using 2 vectors accuracy test passed"
else
echo "Calculating density using 2 vectors accuracy test failed"
exit 1
fi
else
echo "Error Missing density test output file"
exit 1
fi
if [ -e test_nonsym_force_serial.dat ]
then
if python3 @srcdir@/difffloat.py test_nonsym_force_serial.dat test_nonsym_force_1_vec.dat @srcdir@/tolerance_testInteractions.dat
then
echo "Calculating force using 1 vector accuracy test passed"
else
echo "Calculating force using 1 vector accuracy test failed"
exit 1
fi
if python3 @srcdir@/difffloat.py test_nonsym_force_serial.dat test_nonsym_force_2_vec.dat @srcdir@/tolerance_testInteractions.dat
then
echo "Calculating force using 2 vectors accuracy test passed"
else
echo "Calculating force using 2 vectors accuracy test failed"
exit 1
fi
else
echo "Error Missing force test output file"
exit 1
fi
fi
echo "------------"