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

Help: Compiling error

Intel_C_Intel
Employee
327 Views

Hi, All

I was trying to compile some fortran codes wirtten by others and had some annoying problems:

1. All source code files are with the extension ".f", all the comments start with "C"; however, Intel Fortran (in VS2005) can only recognize the comment symbol "C" in one file (this is written in f90), for other files, it reported errors.

2. After I modified the file extension from ".f" to ".for", now Intel Fortran can recognize all comment lines, but I had the following error messges:

Error1 Error: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element.

When I use PVF for the same code, I can compile and run without any extra setting and effort. Is there any suggestion about how to use Intel Fortran?

Thanks a lot

0 Kudos
1 Reply
Steven_L_Intel1
Employee
327 Views
I don't quite understand the first problem. IVF considers both .f and .for to be fixed-form source where a C in column 1 is a comment. A file type of .f90 means free-form source where a C in column 1 is not accepted. What exactly was the problem?

The second problem is an error in your code that the PGI compiler does not detect. You need to fix the code. It is not legal in Fortran to pass a scalar to an array.
0 Kudos
Reply