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

I have got many errors when I compile my code. please help

sniper_528
Beginner
652 Views
Hi there,
I have a problem to compile a program using Visual Fortan Compiler 11.
here is the codes:
I wonder if somebody compile it and let me know my problem.
Thanks a lot.
0 Kudos
7 Replies
mecej4
Honored Contributor III
652 Views
Please describe the problem.

http://www.shahabfar.com/dragon.rar : no such file found.
0 Kudos
sniper_528
Beginner
652 Views
lots of this error
error #6633: The type of the actual argument differs from the type of the dummy argument.
would you please take a look at source code.
0 Kudos
John4
Valued Contributor I
652 Views

As the error suggests, the type of the variables you're using when invoking one or more of your procedures is different from what the procedures expect.

The link you provided is broken. Try attaching the file directly to this thread ---see this for details.

0 Kudos
sniper_528
Beginner
652 Views
thanks John,
here is the source code.
someone said me I should use the Compact Fortran compiler. but I think the Intel compiler has its capabilities.
he also said:

Use the following Compact FORTRAN compiler option

/assume:byterecl

since this compiler assumes by default that for direct access file the number of record of 4 bites is provided in the FORTRAN instruction:

OPEN(1,FILE='xxx',ACCESS='DIRECT',RECL=LRECL)

while in DRAGON the default is to assume that LRECL provides the number of bytes.

Remove the following default compilation option

/check:bounds

to remove the limits on arrays.

0 Kudos
Lorri_M_Intel
Employee
652 Views
Hi -

I looked at your code, and several of the failures are actual mismatches.

For example, the line:
CALL LCMGET(IPLIB,'DEPLETE-RATE',RBASE(IRR))

generates an error because the third argument to LCMGET is an integer, and you are passing a real.

You see the error because the DEBUG configuration does interface checking by default.

You can turn that off using Properties->Fortran->Diagnostics, Generate Interface Checking to No.

I see the program uses a lot ofCOMMON andEQUIVALENCE, so it's likely that the code will run OK, even with the argument mismatches.

-- Lorri

0 Kudos
sniper_528
Beginner
652 Views
Hi Lorri,
Thanks for your help.
I turned offProperties->Fortran->Diagnostics, Check Routine Interfaces and it has been compile with no error.
0 Kudos
mecej4
Honored Contributor III
652 Views
Turning off "check routine interfaces" as a means of forcing the compiler to complete with no detected errors is short-sighted.

Your code has errors. The compiler tried to help you. You chose to shrug off that help.

Now the EXE file that you produced is buggy. It may not run, or it may give wrong results, and you may not detect the error in the results. Once in a blue-moon, it may even give correct results. Do you want to keep such a program?
0 Kudos
Reply