Skip to content

Commit d7a29a2

Browse files
committed
different MPI tests
1 parent 7295e9d commit d7a29a2

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/pip-tests-mpi.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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"
910
mpirun -np 2 python examples/SpaceCharge/sc3D/sc_3d_drift_latt_uniform_sphere_bunch.py --SC ellipsoid| tee results.txt
1011
python examples/SpaceCharge/sc3D/read_sc_numbers.py
1112
[ $? != 0 ] && exit 1
1213

14+
echo "Run with FFT3D space charge"
1315
mpirun -np 2 python examples/SpaceCharge/sc3D/sc_3d_drift_latt_uniform_sphere_bunch.py --SC fft3d| tee results.txt
1416
python 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"
1821
mpirun -np 2 python examples/SpaceCharge/sc3D/sc_3d_drift_latt_uniform_sphere_bunch.py --SC none| tee results.txt
1922
python 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

Comments
 (0)