- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am compiling my code using fortran compiler 9.1.
I have a common declaration like:
COMMON /DATE /IM,ID,IY,IFP
Later in the code I do:
IFP=1
This compiles fine with no error but at runtime the program crashes when it reaches the above line.
This program use to work with compaq fortran compiler.
I do not want to convert all the common to modules.
Any suggestion will be highly appreciated.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's not enough information here. Where is the COMMON declaration? What is the error message? (Access violation?) Can you show a small but complete program that demonstrates the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am linking the fortran lib through C++ to Java.
A sample program is:
SUBROUTINE crops(STname, NCROP, PMAT, Ploc)
CHARACTER*256 Dir
CHARACTER*256 FileName, tmp
INCLUDE 'comsw1.inc'
COMMON /DATE/IM,ID,IY,IFP
c other initalizations
IFP=1
END
This compiles file with Intel compiler 9.1 but when I call the subroutine there is a runtime error and the program crashes. I checked at the crash is due to IFP=1.
I don't get any stack trace or specific error message .
I only get a JVM crash.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Still not enough information.
Try writing a Fortran program that calls this subroutine and see what it does. I tried an example myself and didn't see a problem. The contents of the include file might also be of interest.
I assume that in your real code there is more to the beginning of the subroutine - DLLEXPORT directives, perhaps?

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