- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have some fortran code that is being called by a small C front end that reads in a text file and passes the data to a set of fortran subroutines that does forecasting. I have previously compiled this using the Intel ver 8 compiler on red hat linux but I have now moved to a suse 10 platform using the Intel ver. 10 compiler. I am using the same source code that compiles and runs with no issue on the redhat platform. I tried some of the suggestions to track the problem down using the stack trace and bounds checking but the traces come back with unknown as the subroutines.
I am currently using these params when compiling the fortran
-w90 -w95 -O3 -us -shared -DLINUX -g -traceback -check all -fp-stack-check -heap-arrays
Thanks for any help.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paige,
This sounds like an argument passing problem. If looking at the source code and compiler options do not show something obvious then I suggest placing a debug break point at the call from your C front-end to the Fortran code. Using the debugger and a small text editing window (or pen and paper) write down the values _and_ addresses of each variable passed. If a variable is a C string, also determine the number of bytes to NULL byte. Once you have this information, use your debugger to step into the Fortran code. Note, you may have to step over the subroutine hidden preamble that initializes the stack frame and array descriptors. If you have an innocuous statement like X=0.0 step to or over that statement prior to examining the subroutine's dummy arguments. Using the debugger, examine the dummy arguments for both values and addresses. If the problem is argument passing, then something should stand out and you will be able to correct it.
Jim Dempsey

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