- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the latest: Fortran Compiler XE 14.0.3.202
The program I am working on has started unexpectedly crashing when compiled in optimized release mode. However, when compiled in debug mode, there are no errors or warnings. I have spent a day debugging, and I was able to isolate the portion of the code where the problem occurs. This code is very unstable, and doing a trivial change can make the problem go away.
Attached is the source code, project, and output BuildLog files. When compiled in release mode, the program crashes with:
forrtl: severe (157): Program Exception - access violation
Roman
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm looking at this now. Seems that the optimizer has moved some code that references an omitted argument outside the if(present) test for that argument. Not nice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Escalated as issue DPD200359189. /Qopenmp is required to trigger the error. I will let you know here of any progress on the bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for looking at this. Initially, I was concerned that there was a bug in my fortran code. Until the compiler is fixed, do you know of a safe way of getting around this problem? I don't want to disable /Qopenmp since there is parallelization in some of the subroutines, and I am using pardiso from MKL. While debugging, I noticed that if in fwd_model.f90, I declare the 'is' variable with a SAVE attribute, it doesn't crash.
integer,save:: is
Do you think this would be safe for now, or would it move the problem somewhere else?
Roman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found that all sorts of small modifications made the error go away. A simple one would be to reduce the optimization level on fwd_model.f90 without changing the code. I would be hesitant about adding SAVE declarations on code that is executed in parallel regions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I looked at the attachment in Quote #1 and found:
beta_range.f90 call fwd_model( )
fwd_model.f90 subroutine fwd_model(dpred)
Although routine fwd_model is contained, isn't there an argument mismatch ?
I would have expected this to be wrong in Fortran 95.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
John, please look at the code again. In subroutine FWD_MODEL, the argument DPRED is declared OPTIONAL.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page