-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Floating-point exception when concatenating IAEA phase space files with addphsp #423
Comments
Slightly more informative backtrace:
Edit: and that’s as far as I get because my debugger refuses to print any variables. |
A bit more of testing: the error does not occur when creating a fresh debug configuration of EGSnrc with all optimizations turned off. But I can't figure out exactly with which combination of optimization flags the error shows up. |
I think I isolated the problem to, what else, the |
Update the default gcc optimization configuration to use -march=native instead of -ffast-math. The latter causes various floating-point exceptions on newer cpus and compilers. If the programs are run on a different cpu, then one should use the corresponding -march option for that architecture instead of "native", or else use the less aggressive -mtune=native if the compiling and running cpus are in the same family.
Update the default gcc optimization configuration to -mtune=native instead of -ffast-math. The latter causes various floating-point exceptions on newer cpus and compilers. Note that if everything is compiled and run on identical cpu, then the more aggressive -march=native option should be considered during configuration.
Update the default gcc optimization configuration to -mtune=native instead of -ffast-math. The latter causes various floating-point exceptions on newer cpus and compilers. Note that if everything is compiled and run on identical cpu, then the more aggressive -march=native option should be considered during configuration.
Very happy to see the change from march to mtune!!! As this code currently works on Arm32 as well I'm hesitant to suggest we go so far as to include an -march=nocona as that's the oldest x86_64 architecture, but for reasonable people should we consider it. |
Update the default gcc optimization configuration to -mtune=native instead of -ffast-math. The latter causes various floating-point exceptions on newer cpus and compilers. Note that if everything is compiled and run on identical cpu, then the more aggressive -march=native option should be considered during configuration. Also add a test in the Fortran compiler version check to catch the gfortran version string.
Update the default gcc optimization configuration to -mtune=native instead of -ffast-math. The latter causes various floating-point exceptions on newer cpus and compilers. Note that if everything is compiled and run on identical cpu, then the more aggressive -march=native option should be considered during configuration. Also add a test in the Fortran compiler version check to catch the gfortran version string, and fix a duplicate echo for the default fortran debugger flag.
Update the default gcc optimization configuration to -mtune=native instead of -ffast-math. The latter causes various floating-point exceptions on newer cpus and compilers. Note that if everything is compiled and run on identical cpu, then the more aggressive -march=native option should be considered during configuration. Change the default optimization level to -O2 instead of -O3. There have been cases where upgrading to a newer compiler revealed bugs under -O3, and more aggressive optimization does not always lead to increased performance. The -O2 option is a better default, and another level can be selected at configuration time. Also add a test in the Fortran compiler version check to catch the gfortran version string, and fix a duplicate echo for the default fortran debugger flag.
Update the default gcc optimization configuration to -mtune=native instead of -ffast-math. The latter causes various floating-point exceptions on newer cpus and compilers. Note that if everything is compiled and run on identical cpu, then the more aggressive -march=native option should be considered during configuration. Change the default optimization level to -O2 instead of -O3. There have been cases where upgrading to a newer compiler revealed bugs under -O3, and more aggressive optimization does not always lead to increased performance. The -O2 option is a better default, and another level can be selected at configuration time. Also add a test in the Fortran compiler version check to catch the gfortran version string, and fix a duplicate echo for the default fortran debugger flag.
I get a floating-point exception (IEEE_INVALID_FLAG) when concatenating IAEA phase space files. I re-compiled
addphsp
with the-ffpe-trap=invalid
flag and no optimization to produce the backtrace below:I'm not sure if I can provide anything more than that since those are the Varian phase space files which I'm not allowed to share. Let me know if I can help debug.
The text was updated successfully, but these errors were encountered: