@@ -6,26 +6,34 @@ calculated_sha1=$(sha1sum test.txt | awk '{ print $1 }')
66[ " $calculated_sha1 " != " d94e03044bf06c7a42d07505b50fa58b4b30e49a" ] && exit 1
77
88# Uniformly charged sphere
9+ echo " Run with Ellipsoid space charge"
910mpirun -np 2 python examples/SpaceCharge/sc3D/sc_3d_drift_latt_uniform_sphere_bunch.py --SC ellipsoid| tee results.txt
1011python examples/SpaceCharge/sc3D/read_sc_numbers.py
1112[ $? != 0 ] && exit 1
1213
14+ echo " Run with FFT3D space charge"
1315mpirun -np 2 python examples/SpaceCharge/sc3D/sc_3d_drift_latt_uniform_sphere_bunch.py --SC fft3d| tee results.txt
1416python examples/SpaceCharge/sc3D/read_sc_numbers.py
1517[ $? != 0 ] && exit 1
1618
1719# this should fail as no space charge will give incorrect sphere size
20+ echo " Run with no space charge"
1821mpirun -np 2 python examples/SpaceCharge/sc3D/sc_3d_drift_latt_uniform_sphere_bunch.py --SC none| tee results.txt
1922python examples/SpaceCharge/sc3D/read_sc_numbers.py
2023[ $? == 0 ] && exit 1
2124
2225
2326# This tests that five nodes give the same result as one node
24- mpirun -np 1 python examples/SpaceCharge/sc3D/sc_3d_drift_latt_uniform_sphere_bunch.py | tee results.txt
25- calculated_sha1=$( sha1sum results.txt | awk ' { print $1 }' )
27+ echo " Run with 1 node."
28+ mpirun -np 1 python examples/SpaceCharge/sc3D/sc_3d_drift_latt_uniform_sphere_bunch.py | tee results1.txt
29+ calculated_sha1=$( sha1sum results1.txt | awk ' { print $1 }' )
2630
27- mpirun -np 5 python examples/SpaceCharge/sc3D/sc_3d_drift_latt_uniform_sphere_bunch.py | tee results.txt
28- calculated_sha5=$( sha1sum results.txt | awk ' { print $1 }' )
31+ echo " Run with 5 nodes."
32+ mpirun -np 5 python examples/SpaceCharge/sc3D/sc_3d_drift_latt_uniform_sphere_bunch.py | tee results5.txt
33+ calculated_sha5=$( sha1sum results5.txt | awk ' { print $1 }' )
34+
35+ echo " Diff between two runs."
36+ diff results1.txt results5.txt
2937
3038[ " $calculated_sha1 " != " $calculated_sha5 " ] && exit 1
3139
0 commit comments