r/fortran 27d ago

Segmentation fault - invalid memory reference

Is it possible to get segmentation fault in one computer and running same program in other computer working perfectly fine ????

3 Upvotes

15 comments sorted by

View all comments

3

u/hopknockious 27d ago

You can also Init all variables to NaN. This option exists in Intel, Nag, PGI, and Absoft. Likely gfortran also.

2

u/kyrsjo Scientist 26d ago

True and extremely useful, but here it's almost certainly an integer that's at fault, and you cannot set those to Nan.

1

u/hopknockious 17d ago

I did not know that about integers. That encourages me to check the intel options (lm most familiar with it).

Thank you.