Skip to content
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

NaN with -ffast-math #174

Closed
mchamberland opened this issue Sep 6, 2016 · 8 comments
Closed

NaN with -ffast-math #174

mchamberland opened this issue Sep 6, 2016 · 8 comments
Assignees
Labels

Comments

@mchamberland
Copy link
Contributor

NaN (still) shows up when using -ffast-math with the Fortran compiler. This happens with gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC).

Sample input file for tutor7pp below.

With -ffast-math flag:

Medium 1 sige = 1.00000000362749373E-015 NaN monotone = T T

Medium 2 sige = 1.00000000362749373E-015 NaN monotone = T T

Without -ffast-math:

Medium 1 sige = 0.43671621424277174 0.43386623396694124 monotone = T T

Medium 2 sige = 0.24630246820211257 0.24325696800012028 monotone = T T

As far as I know, this does not produce any significant differences in the results of tutor7pp (or any other code), but I'm not entirely sure.

material.txt
media_bug.txt

@crcrewso
Copy link
Contributor

crcrewso commented Sep 8, 2016

May I ask, which input file were you using? Test1?

@mchamberland
Copy link
Contributor Author

The input file attached to the report: "media_bug.txt"

GitHub does not allow .egsinp extensions.

@crcrewso
Copy link
Contributor

crcrewso commented Sep 8, 2016

Ahhh sorry it threw me not being an egsinp.

@rtownson rtownson added the bug label Sep 9, 2016
@rtownson
Copy link
Collaborator

Is this still a problem on the current develop branch? I could not reproduce on centos. Thanks!

@crcrewso
Copy link
Contributor

crcrewso commented Jan 23, 2017 via email

@rtownson
Copy link
Collaborator

Good point - I was on gcc 4.8.5.

@Kawrakow
Copy link

Suggestion: discard the -ffast-math flag. Better (i.e., faster and less dangerous) outcomes with modern gcc versions are achieved using -march=native -mtune=native

@ftessier
Copy link
Member

Will do, thanks for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants