- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm upgrading our codebase from ivf9.1 to ivf11.1
A few of our apps write errors to unit 6. This failes when compiled with ivf11.1
I have one DLL wich passes error strings to the calling app wich failes when it tries to sent an errorstring.
It also failes on the open statment, which is:
open(6,file='con',carriagecontrol='list')
I did find one post about accessing the console and it suggested that it was fixed in the latest compiler build.
So I upgraded to ivf11.1.046 but that one failes in the runtime library dll (see other post)
Is this something that will be fixed? or do I have to chance my code.
A few of our apps write errors to unit 6. This failes when compiled with ivf11.1
I have one DLL wich passes error strings to the calling app wich failes when it tries to sent an errorstring.
It also failes on the open statment, which is:
open(6,file='con',carriagecontrol='list')
I did find one post about accessing the console and it suggested that it was fixed in the latest compiler build.
So I upgraded to ivf11.1.046 but that one failes in the runtime library dll (see other post)
Is this something that will be fixed? or do I have to chance my code.
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Michel
I'm upgrading our codebase from ivf9.1 to ivf11.1
A few of our apps write errors to unit 6. This failes when compiled with ivf11.1
I have one DLL wich passes error strings to the calling app wich failes when it tries to sent an errorstring.
It also failes on the open statment, which is:
open(6,file='con',carriagecontrol='list')
I did find one post about accessing the console and it suggested that it was fixed in the latest compiler build.
So I upgraded to ivf11.1.046 but that one failes in the runtime library dll (see other post)
Is this something that will be fixed? or do I have to chance my code.
A few of our apps write errors to unit 6. This failes when compiled with ivf11.1
I have one DLL wich passes error strings to the calling app wich failes when it tries to sent an errorstring.
It also failes on the open statment, which is:
open(6,file='con',carriagecontrol='list')
I did find one post about accessing the console and it suggested that it was fixed in the latest compiler build.
So I upgraded to ivf11.1.046 but that one failes in the runtime library dll (see other post)
Is this something that will be fixed? or do I have to chance my code.
Sorry forget the following open a unit 6 should work.
Frank
Hello,
as far as i know unit 6 is the preconnected towards the screen. I am not sure if it is allowed to open a file unit with the number 6.
May be there was no checking for this in ivf 9 .
Frank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tropfen
Sorry forget the following open a unit 6 should work.
Frank
Hello,
as far as i know unit 6 is the preconnected towards the screen. I am not sure if it is allowed to open a file unit with the number 6.
May be there was no checking for this in ivf 9 .
Frank
We are doing this since DEC/HP fortran and it was never a problem.
And I really don't want to go trough 9k source files to change this...
Michel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Michel
We are doing this since DEC/HP fortran and it was never a problem.
And I really don't want to go trough 9k source files to change this...
Michel.
open(6,file='con',carriagecontrol='list')
WRITE(6,'(A100)') 'Hello, world!'
compiles and runs ok for me using IVF 11.1.035
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know of any problem, unless there is no console window available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
I don't know of any problem, unless there is no console window available.
There is a console window open where we write some tracing data to.
I traced it back to the call to for_rtl_finish_() This call gives an error on unit 6.
When I do not call this function the dll app does not crash on unload.
The main DLLis c code withch uses fortran functions.
Michel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is _rtl_finish()? I don't recognize it. Can you provide us with a test case? Is the executable linked to the Fortran DLL libraries?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
What is _rtl_finish()? I don't recognize it. Can you provide us with a test case? Is the executable linked to the Fortran DLL libraries?
If you call a fortran app from c you have to initialize the fortran environment, and when you want to close your app you have to close the fortran app before you end your main c app.
You then call _for_rtl_finish() from c. (this is a standard fortran library call)
Since the c app is a DLL wich calls fortran routines we make a call to _for_rtl_finish() before the DLL unloads.
If our app is compiled with ivf9 then several files stays opened and/or locked until this call.
Now it seems that compiled with ivf11 and omitting this call all files are closed when the DLL unloads.
So this behaviour has changed.
Michel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I am informed that you are calling for_rtl_finish. Fine. If you have a C DLL called from Fortran, both the C and Fortran code must be linked to the DLL form of the Fortran (and C) run-time libraries (and the same form, debug or non-debug). If you end up with two copies of the Fortran (or C) run-time library in the address space, trouble will follow.

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