Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

compilation errors

Deleted_U_Intel
Employee
494 Views

I am in the process of converting a program of mine written for Visual fortran 6.0 over to Visual Fortran 10.0. The program that I am converting over worked fine on my previous Visual Fortran Development Studio. However, in Visual Fortran 10.0, I am getting compilation errors that I don't understand. For example,

Error2 Error: There is a conflict between local interface block and external interface block. [PLOT]C:UsersJohn SullivanA_WorkVisual Studio 2005My ProjectswkareaHEVHEV_1.f901614

Error3 Error: The type of the actual argument differs from the type of the dummy argument. [RESULTS]C:UsersJohn SullivanA_WorkVisual Studio 2005My ProjectswkareaHEVHEV_1.f901614

Error4 Error: A non-optional actual argument must be present when invoking a procedure with an explicit interface. [RESULTS]C:UsersJohn SullivanA_WorkVisual Studio 2005My ProjectswkareaHEVHEV_1.f901614

Error5 Error: The storage extent of the dummy argument exceeds that of the actual argument. [RESULTS]C:UsersJohn SullivanA_WorkVisual Studio 2005My ProjectswkareaHEVHEV_1.f901614

My questions are:

1 RE: error 2: What is a local interface block vs. an external one? I am using an interface block in the main program.

2. Re: Error 3: RESULTS is declared everywhere as REAL*4

3. Re: Error 4: What is an optional vs. a non-optional arguement?

4: Re: Error 5: RESULTS is declared and dimensioned everywhere as REAL*4(n_cycles,10)

Thank you!

John

0 Kudos
5 Replies
Steven_L_Intel1
Employee
494 Views
John,

I'm not sure what error 2 is trying to tell you. It would be helpful if I could see the source.

Error 3 is complaining that at line 1614 in that source you are passing an argument to RESULTS that isn't the same type.

Error 4 is basically saying you are passing too few arguments at that call and that the missing argument is not declared OPTIONAL.

Error 5 says that RESULTS in the called routine is declared with a fixed dimension but that the array you are passing to it is smaller. This is not allowed by the standard and the Intel compiler picks up on that.
0 Kudos
Steven_L_Intel1
Employee
494 Views
Ideally, you would file an issue with Intel Premier Support and attach a ZIP of the source there. If the program is large, I'd encourage that. If you want to attach files here, use the Options tab while composing a reply.
0 Kudos
Steven_L_Intel1
Employee
494 Views
Well, this code doesn't demonstrate (that I can see) all of the errors you mentioned above, but...

First up is:

hev_1.f90(2582) : Error: The storage extent of the dummy argument exceeds that of the actual argument. [CARS_4_SALE]
CARS_4_SALE, BLUE_BOOK, BASE_VALUE, WORTH)
-----------------------------------------------------------^

CARS_4_SALE is dimensioned (n_options) where n_options is 30. It's the 8th argument to UTILITY_FUNCTION where the corresponding argument (also called CARS_4_SALE) is dimensioned (total_cars), defined as a complex expression I can't be bothered to compute, but it's probably larger than 30. My guess is that the choice of n_options in the caller's declaration is wrong. This error appears for another call to the function at line 2600.

Another error from this code is:

hev_1.f90(1382) : Error: There is a conflict between local interface block and
external interface block. [OWNERS]
SUBROUTINE miles_and_fuel(owners, cars, fuels, event_log, price_log, var_cost, &
--------------------------------^

I found out what this message means. It shows up if you compile with /gen-interface /warn:interface (which is the default for new projects in 10.0) if the generated interface for the actual routine doesn't match an explicit interface block in the source code. However, so far I am not spotting what the conflict is. I'm going to have to look at this some more.

0 Kudos
Steven_L_Intel1
Employee
494 Views
For now, turn off interface checking. In the project properties, Fortran > Diagnostics set Generate Interface Blocks and Check Routine Interfaces to No. That should get you going.
0 Kudos
Steven_L_Intel1
Employee
494 Views
Clean deletes all .obj and .mod files in the output directory. In your case, this also removes the generated .mod files that "Generate interface blocks" created. You should not have commented out the interface block - turning off interface checking is the workaround for you.

Full documentation is installed along with the product. In Visual Studio, click Help and then "Intel Fortran Compiler Documentation".
0 Kudos
Reply