- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry if this is a dumb question or it's posted at the wrong place.
I'm using Intel FORTRAN composer for windows to compile a FORTRAN program (in F77 format) for my research. If I do it in the command prompt window with "ifort abc.f -o abc.exe" command, it works fine (it gives warnings but I don't care). However, if I compile it in the IDE, it produces some errors. The most typical ones are "The type of the actual argument differs from the type of the dummy argument." I assume this is due to a compatibility issue?
I went to the project -> properties to change the compatibility settings (to include the F77 support), but it doesnt work. Can anyone tell me how I can make it work in IDE, which is easier to debug. Thanks very much.
I'm using Intel FORTRAN composer for windows to compile a FORTRAN program (in F77 format) for my research. If I do it in the command prompt window with "ifort abc.f -o abc.exe" command, it works fine (it gives warnings but I don't care). However, if I compile it in the IDE, it produces some errors. The most typical ones are "The type of the actual argument differs from the type of the dummy argument." I assume this is due to a compatibility issue?
I went to the project -> properties to change the compatibility settings (to include the F77 support), but it doesnt work. Can anyone tell me how I can make it work in IDE, which is easier to debug. Thanks very much.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Depending on the configuration chosen, the default options passed to the compiler are different between the IDE and the command line tools. See response #4 in this recent thread "Application builds with inconsistent Call statement".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is not a "compatibility" issue but rather an error in your code that is detected by additional diagnostic options enabled in a Visual Studio Debug configuration. In particular, it's the "Check routine interfaces" option under Diagnostics that is finding and complaining about this coding error. I assume there are other coding errors that are also found by this feature.
The compiler is noticing that you pass an actual argument of one type but receive it in the called procedure as a different type. This is not legal in Fortran and can lead to incorrect or unexpected results. I know that some old programs were written with such mismatches deliberately under the assumption that the compiler wouldn't know about it. Compilers have gotten smarter over the years and find more and more errors of this nature.
My recommendation would be to look at each of the error messages and investigate the code to see if the code is doing what you think it should be. If you need help understanding the error, show us the error message, the call and the declaration of the routine, with all declarations of arguments (and what is being passed.)
If you wish to "run with the blade guard removed", so to speak, you can set "Check routine interfaces" to "No" in the Visual Studio properties, but I don't recommend this.
The compiler is noticing that you pass an actual argument of one type but receive it in the called procedure as a different type. This is not legal in Fortran and can lead to incorrect or unexpected results. I know that some old programs were written with such mismatches deliberately under the assumption that the compiler wouldn't know about it. Compilers have gotten smarter over the years and find more and more errors of this nature.
My recommendation would be to look at each of the error messages and investigate the code to see if the code is doing what you think it should be. If you need help understanding the error, show us the error message, the call and the declaration of the routine, with all declarations of arguments (and what is being passed.)
If you wish to "run with the blade guard removed", so to speak, you can set "Check routine interfaces" to "No" in the Visual Studio properties, but I don't recommend this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
Thank you very much for your quick response. I tried to turn off the "Check routine interfaces" option and it works fine. But like you said, this doesn't really solve the problem. I'll try to correct it later and probably come back to you if it's difficult for me. Thanks again for your time.
Jason
Thank you very much for your quick response. I tried to turn off the "Check routine interfaces" option and it works fine. But like you said, this doesn't really solve the problem. I'll try to correct it later and probably come back to you if it's difficult for me. Thanks again for your time.
Jason

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