- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to call a fortran dll (VS 2005, IVF 10) from a C++ program (VS 2005, Console app.)
The fortran subroutine involves several iterations. When called from the C++ application, the iterations do not converge due to floating point number differences, but when the fortran dll is called from a fortran code, (hardcoding the inputs), the subroutine works fine.
Is there a compiler switch/setting that I should tweak ?
Thank you
-VA
I am trying to call a fortran dll (VS 2005, IVF 10) from a C++ program (VS 2005, Console app.)
The fortran subroutine involves several iterations. When called from the C++ application, the iterations do not converge due to floating point number differences, but when the fortran dll is called from a fortran code, (hardcoding the inputs), the subroutine works fine.
Is there a compiler switch/setting that I should tweak ?
Thank you
-VA
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fortran calls by reference, C++ calls by value. Make sure the C++ call to the Fortran DLL is passing "&YourREALvariable" (by reference)and not "YourREALvariable" (by value).
Jim Dempsey
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