-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified default compilation mode to not use -ffast-math
It turns out that this was the reason certain summary statistics were varying by more than 0.1% when I was using 2 different machines with different compiler versions (gcc versions 9.4.0 vs 7.5.0). This was not completely obvious because Grackle itself was never compiled with these flags (although it took me longer to determine than it should have). As far as I can tell most of the differences arose in EnzoInitialGrackleTest. We were already making this change in the CMake PR (#139), anyways, so this shouldn't be controversial. As a result of this change, the following modifications were required for existing tests: - the expected values for the VL+CT dual_energy_cloud test needed to be updated. This change was previously discussed in the context of PR #139. - the final time for the PPML tests had to be updated for binaries compiled with single precision - the cosmology test had to be disabled for binaries compiled with single precision. As is described in Issue #154, it appears the `-ffast-math` had been suppressing an existing bug for this case (the test now crashes without the flag). Note that the test ran perfectly fine when compiled in double-precision. The double-precision results for the Grackle test also had to be updated (but the single-precision results were basically fine). Note that the tolerances for the double-precision results were calibrated so that the tests would pass if you used gcc versions 7.5.0 or 9.4.0 (they may need to be loosened more in the future). This commit also added the ability for the field_summary to accept different tolerances for different summary statistics (this is useful since we might want 0 tolerance for the location of a min/max while still applying a tolerance for the min/max itself). It also a runtime warnings raised by the script.
- Loading branch information
Showing
7 changed files
with
121 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# {"code unit definitions": {"code_length": [3.086e+16, "cm"], "code_mass": [4.9157019637146824e+25, "g"], "code_density": [1.6726219e-24, "g/cm**3"], "code_specific_energy": [956277.4378779504, "erg/g"], "code_time": [31557600000000.0, "s"], "code_magnetic": [4.483279099741026e-09, "G"], "code_temperature": [1.0, "K"], "code_pressure": [1.5994905850705492e-18, "dyn/cm**2"], "code_velocity": [977.8943899409335, "cm/s"], "code_metallicity": [1.0, "dimensionless"]}, "field units": {"pressure": "dimensionless", "temperature": "code_temperature", "cooling_time": "dimensionless"}} | ||
# | ||
# name,min,min_xloc,min_yloc,min_zloc,max,max_xloc,max_yloc,max_zloc,mean,standard_deviation | ||
pressure,1.520195901060065e+02,7.812500000000000e-02,1.718750000000000e-01,1.562500000000000e-02,2.753947492701502e+06,7.812500000000000e-02,2.343750000000000e-01,1.562500000000000e-02,6.675724774669249e+04,3.557197556605695e+05 | ||
temperature,3.549497639185964e+00,2.343750000000000e-01,1.718750000000000e-01,1.562500000000000e-02,6.376232820587005e+06,1.562500000000000e-02,2.343750000000000e-01,1.562500000000000e-02,2.417771901546382e+05,1.115430124658054e+06 | ||
cooling_time,-6.450617403727277e+04,1.562500000000000e-02,2.343750000000000e-01,1.562500000000000e-02,3.866436169424824e+03,1.093750000000000e-01,1.093750000000000e-01,1.562500000000000e-02,-1.578969463027807e+03,8.485129947191494e+03 | ||
pressure,1.520195900675427e+02,7.812500000000000e-02,1.718750000000000e-01,1.562500000000000e-02,2.753947492701290e+06,7.812500000000000e-02,2.343750000000000e-01,1.562500000000000e-02,6.660831661417476e+04,3.557307908963668e+05 | ||
temperature,3.330949646514823e+00,2.343750000000000e-01,1.718750000000000e-01,1.562500000000000e-02,6.376232820586985e+06,1.562500000000000e-02,2.343750000000000e-01,1.562500000000000e-02,2.417771759620777e+05,1.115430127734497e+06 | ||
cooling_time,-6.450617403727239e+04,1.562500000000000e-02,2.343750000000000e-01,1.562500000000000e-02,3.866436114544078e+03,1.093750000000000e-01,1.093750000000000e-01,1.562500000000000e-02,-1.576307136350389e+03,8.485636211531526e+03 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters