sorry...problem with INCLUDE

Hi!

I realise there is a comment in the FAQ folder regarding the failure for pgf77/pgf90 to read INCLUDE files but I have tried the suggested remedies (and all combinations I can think of) to no avail.

I am getting a PGF90-S-0017-Unable to open include file: PIOGRID.EXT (get_write_map.f: 55). I have checked the syntax of get_write_map and it seems correct. I have checked the path and I seem to be able to find PIOGRID.EXT. I do not know how to check the maximum INCLUDE depth, which is restricted to 10.

This should be a relatively easy problem. Sigh :[

Thanks ahead of time.

David

Hi David,

Are you using Windows, Linux or MacOSX? What is the command line you’re using (particularly the “-I” flag)? Which version of the compilers?

My best guess is that you’re using Windows and trying to use a Cygwin Path with your “-I” flag. Pre 10.0 compilers don’t recognize Cygwin Paths and you need to use DOS Path names.

  • Mat

Hi Mat,

I posted a reply earlier today but it seems to have gone astray.

I am running Redhat Enterprise 4 linux (kernel 2.6.9-89). The command line is:

FFLAGS = $(FSTD) -I $(MPI) -I (IOAPI) -I.

with the paths for IOPI and MPI suitably defined. The script does start and compile the first three or four FOTRAN files but stops dead when it tries to read the INCLUDE file.

I am sure I am doing something really dumb here but I have exhausted everything I can think of that could be the problem.

Cheers, and thanks,

David

Hi David,

Unless it’s just at typo in in your post, “-I (IOAPI)” should be " -I$ (IOAPI)". This would cause this issue, especially if the include file is in the “IOAPI” directory.

  • Mat

Hi Mat,

Sorry, it was a typo in my reply. Both paths are prepended with a $.

Cheers,

David

ok, then the next step is to verify that PIOGRID.EXT is in the “(MPI)", "(IOAPI)”, or local directory and that you have read permissions.

  • Mat

Hi Mat!

There may be something going on with the permissions. When I chmod 777 PIOGRID.EXT linux complains that the file is not there, but I am able to change the permissions on the file through the file property gui in Redhat (which is what I did before). The reason for this is that the file is volatile. When I execute chmod 777 PIOGRID.EXE,v I can change the permissions. Now, when I go back to the script and run it with the INCLUDE now set to PIOGRID.EXE,v I get a series of error messages with starting with PGF90-S-0018-Illegal label field (./PIOGRID.EXT,v: 1), etc., ending with PGF90-F-0008-Error limit exceeded (./PIOGRID.EXT,v:53). If I simply rename PIOGRID.EXE,v to PIOGRID.EXE and change the INCLUDE back to PIOGRID.EXE I get the same series of error messages???

Thanks,

David

Hi David,

PGF90-S-0018-Illegal label field

What are the first few lines of the include file?
Are they C macro directives, like “#define”? If so, add “-Mpreprocess” to you command line.
Is the include file in free format? If so, add “-Mfree” to you command line.

Note the default for files ending in “.f” is Fixed format, no pre-processing. Upper case extension will by default use pre-processing. A “.f90” extension will default to Free format.

  • Mat

Hi Mat,

The first lines for the include file (PIOGRID.EXT) are for the cvs system, as are all of the files in the directory. They all start with the same lines:

head 1.1;
branch 1.1.1;
access ;
symbols CMAQv4_6:1.1.1.1 ASMD:1.1.1;
locks ; strict;
comment @# @;

etc…

I have been using the -Mfixed and -Mextend flag options for reading the files. The extention is .f (really .f,v). I have been able to succesfully read the FORTAN files (all .f,v files) and generate .o and .mod files from them. It is only the file with the INCLUDE statement that dies.

Cheers,

David

Hi David,

The compiler knows nothing about CVS files. So the fact that your source compiles leads me to believe that either they have been converted before compiling, or converted as part of your makefile rule.

How are you building CMAQ? If I remember right, you’re suppose to use a ‘bldit’ script which first does a ‘cvs export’ of the source into a build area. It’s this export step that I think you’re missing.

  • Mat