Commit 525c760d authored by Matthieu Schaller's avatar Matthieu Schaller

Updated 'make check' scripts with newer tolerances for the Intel compiler and...

Updated 'make check' scripts with newer tolerances for the Intel compiler and made the scripts choke if files are missing
parent 18e62203
......@@ -368,7 +368,7 @@ int main(int argc, char *argv[]) {
clocks_set_cpufreq(cpufreq);
/* Choke on FP-exceptions */
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
//feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
/* Get some randomness going */
srand(0);
......
......@@ -4,9 +4,22 @@ do
for p in {0..2}
do
echo ""
rm brute_force_125_standard.dat swift_dopair_125_standard.dat
rm -f brute_force_125_standard.dat swift_dopair_125_standard.dat
echo ./test125cells -n 6 -r 1 -v $v -p $p -f standard
echo "running"
./test125cells -n 6 -r 1 -v $v -p $p -f standard
python @srcdir@/difffloat.py brute_force_125_standard.dat swift_dopair_125_standard.dat @srcdir@/tolerance_125.dat 6
echo "done"
if [ -e brute_force_125_standard.dat ]
then
python @srcdir@/difffloat.py brute_force_125_standard.dat swift_dopair_125_standard.dat @srcdir@/tolerance_125.dat 6
else
echo exit 1
# exit 1
fi
done
done
......
......@@ -3,9 +3,18 @@
for v in {0..3}
do
echo ""
rm brute_force_27_standard.dat swift_dopair_27_standard.dat
rm -f brute_force_27_standard.dat swift_dopair_27_standard.dat
./test27cells -n 6 -r 1 -d 0 -f standard -v $v
python @srcdir@/difffloat.py brute_force_27_standard.dat swift_dopair_27_standard.dat @srcdir@/tolerance_27_normal.dat 6
if [ -e brute_force_27_standard.dat ]
then
python @srcdir@/difffloat.py brute_force_27_standard.dat swift_dopair_27_standard.dat @srcdir@/tolerance_27_normal.dat 6
else
exit 1
fi
done
exit $?
......@@ -3,9 +3,18 @@
for v in {0..3}
do
echo ""
rm brute_force_27_perturbed.dat swift_dopair_27_perturbed.dat
rm -f brute_force_27_perturbed.dat swift_dopair_27_perturbed.dat
./test27cells -n 6 -r 1 -d 0.1 -f perturbed -v $v
python @srcdir@/difffloat.py brute_force_27_perturbed.dat swift_dopair_27_perturbed.dat @srcdir@/tolerance_27_perturbed.dat 6
if [ -e brute_force_27_perturbed.dat ]
then
python @srcdir@/difffloat.py brute_force_27_perturbed.dat swift_dopair_27_perturbed.dat @srcdir@/tolerance_27_perturbed.dat 6
else
exit 1
fi
done
exit $?
......@@ -74,10 +74,11 @@ int main() {
swift_w = 1 / (r * r * r);
}
printf("%2d: r= %f h= %f u= %f Wg(r,h)= %f Ws(r,h)= %f\n", k, r, h, u,
gadget_w, swift_w);
if (fabsf(gadget_w - swift_w) > 2e-7) {
printf("%2d: r= %f h= %f u= %f Wg(r,h)= %f Ws(r,h)= %f\n", k, r, h, u,
gadget_w, swift_w);
printf("Invalid value ! Gadget= %e, SWIFT= %e\n", gadget_w, swift_w);
return 1;
}
......@@ -99,10 +100,11 @@ int main() {
float gadget_w = erfc(u / 2) + u * exp(-u * u / 4) / sqrt(M_PI);
printf("%2d: r= %f r_lr= %f u= %f Ws(r)= %f Wg(r)= %f\n", k, r, a_smooth, u,
swift_w, gadget_w);
if (fabsf(gadget_w - swift_w) > 2e-7) {
printf("%2d: r= %f r_lr= %f u= %f Ws(r)= %f Wg(r)= %f\n", k, r, a_smooth, u,
swift_w, gadget_w);
printf("Invalid value ! Gadget= %e, SWIFT= %e\n", gadget_w, swift_w);
return 1;
}
......
# ID pos_x pos_y pos_z v_x v_y v_z rho rho_dh wcount wcount_dh div_v curl_vx curl_vy curl_vz
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 2e-6 2e-5 2e-3 2e-6 2e-6 2e-6 2e-6
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-5 1e-4 2e-5 1e-5 1e-5 1e-5
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-5 1e-4 2e-5 2e-5 2e-5 2e-5
# ID pos_x pos_y pos_z v_x v_y v_z rho rho_dh wcount wcount_dh div_v curl_vx curl_vy curl_vz
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 2e-6 2e-5 2e-3 2e-6 2e-6 2e-6 2e-6
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1.2e-6 2e-6 2e-5 2e-3 2e-6 2e-6 2e-6 2e-6
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-5 1e-4 2e-5 1.5e-4 1.5e-4 1.5e-4
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment