Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Generate Interface Blocks

Daniel_P_4
Beginner
1,558 Views
I have a project that is (apparently) building fine in either Debug or Release configurations. In Debug mode, under Fortran: Diagnostics, I have Generate Interface Blocks = NO.

If I set this to YES, the project does not build. I get Link errors complaining about undefined external symbols. With a clean compile, I get several of these. When I build it again, most of them go away, but there's one persistingremaining undefined symbol, which happens to be a subroutine. The subroutine is clearly in the project, and the routine has no argument list, so it can't be an argument mismatch.

I set Generate Interface Blocks = YES because in old VS6 with Compaq Fortran, the linker would throw errors when the argument list was not right or consistent. I no longer see this behavior in Intel Fortran under VS2005, and I was hoping the Generate Interface Blocks option was the path to getting this back. I miss the argument list checking.

Thanks in advance for your help,

Dan
0 Kudos
1 Solution
Steven_L_Intel1
Employee
1,558 Views
Oh, 10.1... In the past, using Check Routine Interfaces could cause a change in generated code. That was a bug and was fixed. I recommend using a current version (11.1). I do recommend using Check Routine Interfaces where you can.

View solution in original post

0 Kudos
7 Replies
Steven_L_Intel1
Employee
1,558 Views
I'm not familiar with an issue such as you describe. Can you attach a ZIP of a project that shows this problem?

Which version of the compiler are you using?
0 Kudos
bmchenry
New Contributor II
1,558 Views

That's an issue with 11.0.074
It was corrected in 11.1.038
so either rollback to prior to 11.0.074 or update to 11.1.038
here's the thread to prior issue:
http://software.intel.com/en-us/forums/showthread.php?t=65285
0 Kudos
Daniel_P_4
Beginner
1,558 Views
I'm not familiar with an issue such as you describe. Can you attach a ZIP of a project that shows this problem?

Which version of the compiler are you using?

I can't send the project. My neck would end up in a noose. It's considered highly proprietary. The project is fairly complex, and I doubt I could reproduce the problem with something smaller and sendable. I was expecting some link errors; in fact hoping for them to check argument alignment and consistency, but the routine I hang on has no argument list at all.

I was hoping it was something you'd be familiar with. If I stumble on an answer, I'll post about it.
0 Kudos
Steven_L_Intel1
Employee
1,558 Views
Note that unlike with the STDCALL convention used by CVF, the C convention IVF uses by default doesn't include the argument count, so there's less opportunity for a name mismatch. I'm surprised that generated interfaces has an effect on this. Which specific compiler version are you using?
0 Kudos
Daniel_P_4
Beginner
1,558 Views
Quoting - bmchenry

That's an issue with 11.0.074
It was corrected in 11.1.038
so either rollback to prior to 11.0.074 or update to 11.1.038
here's the thread to prior issue:
http://software.intel.com/en-us/forums/showthread.php?t=65285

I'm using 10.1.019

I read the referenced thread. I don't think this is my problem.

In a past life with VS6 & CVF, the linker checked program arguments and interfaces for me. I would get a link error if the argument list didn't match up. I don't get that behavior from IFORT & VS2005. I was playing with this option in an attempt to have these things checked.

I also just noticed that I have Check Routine Interfaces turned on too. I suppose I can turn that off, but that is what I'm trying to achieve - checking the interfaces.

Thanks for helping,

Dan
0 Kudos
Daniel_P_4
Beginner
1,558 Views
Note that unlike with the STDCALL convention used by CVF, the C convention IVF uses by default doesn't include the argument count, so there's less opportunity for a name mismatch. I'm surprised that generated interfaces has an effect on this. Which specific compiler version are you using?

I was playing with all this in an attempt to tighten/check the argument lists/interfaces.

I'm using 10.1.019

I also just realized the relevance of Check Routine Interface; I have that turned on. If I turn this off, I guess I'll generate the interfaces, but they won't be checked, and then I'll probably slip by the compiler.

Why would I want to generate program interfaces? To date, I do this when failing to do so causes some kind of ambiguity. I'm not big on module procedures and overloading or anything like that. My most common reason for including a program interface = there are optional arguments on the list. I'm sure there are other reasons, but unfortunately I'm a mechnical engineer, not a true programmer, and I'm not terribly sophisticated (pointers and recursion cause aneurisms as far as I'm concerned). I'm a compiler-user, yeah, that's the ticket.

I appreciate your help, really

Dan
0 Kudos
Steven_L_Intel1
Employee
1,559 Views
Oh, 10.1... In the past, using Check Routine Interfaces could cause a change in generated code. That was a bug and was fixed. I recommend using a current version (11.1). I do recommend using Check Routine Interfaces where you can.
0 Kudos
Reply