The failure comes from a disagreement between the answers. I attached below the outputs of the failing tests
$ ./run_tests.sh test_12c_modification_with_baryons
Running test on test_12c_modification_with_baryons # Baryons, single level, with modification
Testing output
Traceback (most recent call last):
File "compare.py", line 156, in <module>
default_comparisons()
File "compare.py", line 151, in default_comparisons
compare(pynbody.load(output_file[0]),pynbody.load(sys.argv[1]+"/reference_output"))
File "compare.py", line 26, in compare
npt.assert_almost_equal(f1['vel'],f2['vel'],decimal=compare_decimal)
File "/home/ccc/anaconda3/lib/python3.7/site-packages/numpy/testing/_private/utils.py", line 584, in assert_almost_equal
return assert_array_almost_equal(actual, desired, decimal, err_msg)
File "/home/ccc/anaconda3/lib/python3.7/site-packages/numpy/testing/_private/utils.py", line 1029, in assert_array_almost_equal
precision=decimal)
File "/home/ccc/anaconda3/lib/python3.7/site-packages/numpy/testing/_private/utils.py", line 841, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 4 decimals
Mismatch: 0.0797%
Max absolute difference: 0.00048828
Max relative difference: 0.01034109
x: SimArray([[ 13.8939, -58.7497, 12.8005],
[ 17.2224, -72.6177, 23.3705],
[ 20.9602, -81.5143, -14.5985],...
y: SimArray([[ 13.8939, -58.7497, 12.8005],
[ 17.2224, -72.6177, 23.3705],
[ 20.9602, -81.5143, -14.5985],...
--> TEST FAILED
The IC generator output follows
# GM ICs code, compiled Oct 9 2019 15:04:31
# git HEAD:4726988
# Runtime: 2019-10-09.15:11:49
Note: 4 FFTW Threads (determined by OpenMP) were initialised
Using post 2015 CAMB transfer function
Drawing random numbers...done
overdensity: calculated value = 0.00161546
BEFORE modifications chi^2 = 263093
Delta chi^2 from linear modifications = 11442.2
AFTER modifications chi^2 = 274535
Total delta chi^2 = 11442.2
Propagating modification to field 1
. BEFORE modifications chi^2 = 263093
AFTER modifications chi^2 = 274535
Total delta chi^2 = 11442.2
Operations applied to all fields. Writing to disk...
Write, ndm=262144, ngas=262144
+ AddGasMapper, DM first:
| + MassScaledGrid of side 64 address 0x55c0177f84f0 referencing Grid of side 64 address 0x55c0177b3a50; 1 cells marked
+ AddGasMapper, gas second:
| + MassScaledGrid of side 64 address 0x55c0177f85f0 referencing Grid of side 64 address 0x55c0177b3a50; 1 cells marked
+ AddGasMapper ends
Gadget output preliminary scan...
Particle type 0: 262144 particles
Min and max particle mass : 1.3484 1.3484
Particle type 1: 262144 particles
Min and max particle mass : 6.0595 6.0595
overdensity: calculated value = 1
Clearing modification list
$ ./run_tests.sh test_12d_modification_with_baryons_multilevel
Running test on test_12d_modification_with_baryons_multilevel # Baryons, single level, with modification
Testing output
Traceback (most recent call last):
File "compare.py", line 156, in <module>
default_comparisons()
File "compare.py", line 151, in default_comparisons
compare(pynbody.load(output_file[0]),pynbody.load(sys.argv[1]+"/reference_output"))
File "compare.py", line 26, in compare
npt.assert_almost_equal(f1['vel'],f2['vel'],decimal=compare_decimal)
File "/home/ccc/anaconda3/lib/python3.7/site-packages/numpy/testing/_private/utils.py", line 584, in assert_almost_equal
return assert_array_almost_equal(actual, desired, decimal, err_msg)
File "/home/ccc/anaconda3/lib/python3.7/site-packages/numpy/testing/_private/utils.py", line 1029, in assert_array_almost_equal
precision=decimal)
File "/home/ccc/anaconda3/lib/python3.7/site-packages/numpy/testing/_private/utils.py", line 841, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 4 decimals
Mismatch: 0.244%
Max absolute difference: 0.00024414
Max relative difference: 0.01499623
x: SimArray([[ 466.4706, 194.4837, 38.7908],
[ 468.8281, 194.5704, 12.4436],
[ 470.2868, 194.9073, -18.8642],...
y: SimArray([[ 466.4706, 194.4837, 38.7908],
[ 468.8281, 194.5704, 12.4436],
[ 470.2868, 194.9073, -18.8642],...
--> TEST FAILED
The IC generator output follows
# GM ICs code, compiled Oct 9 2019 15:04:31
# git HEAD:4726988
# Runtime: 2019-10-09.15:13:19
Note: 4 FFTW Threads (determined by OpenMP) were initialised
Using post 2015 CAMB transfer function
WARNING: Opening a zoom where flagged particles are within 3 pixels of the edge. This is prone to numerical errors.
Initialized a zoom region:
Subbox length = 21.3333 Mpc/h
n = 64
dx = 0.333333
Zoom factor = 3
Num particles = 2969
Low-left corner in parent grid = (22, 22, 22)
Low-left corner (h**-1 Mpc) = 22, 22, 22
Total particles = 419501
WARNING: maximum k in CAMB input file is insufficient
extrapolating using naive Meszaros solution
WARNING: maximum k in CAMB input file is insufficient
extrapolating using naive Meszaros solution
Initialized a zoom region:
Subbox length = 7.11111 Mpc/h
n = 64
dx = 0.111111
Zoom factor = 3
Num particles = 1791
Low-left corner in parent grid = (21, 21, 21)
Low-left corner (h**-1 Mpc) = 29, 29, 29
Total particles = 434261
Drawing random numbers...done
Drawing random numbers...done
Drawing random numbers...done
overdensity: calculated value = 0.00369876
BEFORE modifications chi^2 = 326922
Delta chi^2 from linear modifications = 6442.46
AFTER modifications chi^2 = 333005
Total delta chi^2 = 6083.32
Propagating modification to field 1
. BEFORE modifications chi^2 = 326922
AFTER modifications chi^2 = 333005
Total delta chi^2 = 6083.32
Operations applied to all fields. Writing to disk...Zeldovich approximation on successive levels...
Interpolating low-frequency information into zoom regions...
done.
Zeldovich approximation on successive levels...
Interpolating low-frequency information into zoom regions...
done.
Write, ndm=385904, ngas=48357
+ AddGasMapper, DM first:
| + TwoLevelParticleMapper, n_hr_per_lr=27, firstLevel2Particle=337547
| + , zoom.size=1791, zoomed.size=48357
| | + TwoLevelParticleMapper, n_hr_per_lr=27, firstLevel2Particle=259175
| | + , zoom.size=2969, zoomed.size=80163
| | | + Grid of side 64 address 0x56139986e660; 1 cells marked
| | + TwoLevelParticleMapper continues with high-res particles:
| | | + Grid of side 64 address 0x56139986f640; 1 cells marked
| | + TwoLevelParticleMapper ends
| + TwoLevelParticleMapper continues with high-res particles:
| | + MassScaledGrid of side 64 address 0x56139986f3e0 referencing Grid of side 64 address 0x561399cb8fd0; 27 cells marked
| + TwoLevelParticleMapper ends
+ AddGasMapper, gas second:
| + TwoLevelParticleMapper, n_hr_per_lr=27, firstLevel2Particle=0
| + , zoom.size=1791, zoomed.size=48357
| + low-res part will be skipped but notionally is:
| | + TwoLevelParticleMapper, n_hr_per_lr=27, firstLevel2Particle=259175
| | + , zoom.size=2969, zoomed.size=80163
| | | + Grid of side 64 address 0x56139986e660; 1 cells marked
| | + TwoLevelParticleMapper continues with high-res particles:
| | | + Grid of side 64 address 0x56139986f640; 1 cells marked
| | + TwoLevelParticleMapper ends
| + TwoLevelParticleMapper continues with high-res particles:
| | + MassScaledGrid of side 64 address 0x561399cb6df0 referencing Grid of side 64 address 0x561399cb8fd0; 27 cells marked
| + TwoLevelParticleMapper ends
+ AddGasMapper ends
Gadget output preliminary scan...
Particle type 0: 48357 particles
Min and max particle mass : 0.00184966 0.00184966
Particle type 1: 385904 particles
Min and max particle mass : 0.00831207 7.4079
Using variable-mass format
overdensity: calculated value = 0.903737
Clearing modification list
Writing to .//grid-0.txt.//grid-0.txt
Writing to .//grid-1.txt.//grid-1.txt
Writing to .//grid-2.txt.//grid-2.txt