Interface Block

I have the following interface block in my program which I need to compile on a Cray XT3.

INTERFACE TO INTEGER FUNCTION ATEXIT
& C,ALIAS:‘_atexit’
EXTERNAL FUN
END
EXTERNAL QUIT

However, pgf90 dies on the statement with the following error:

Statement may not appear in an INTERFACE BLOCK

How do i fix this, the complie works on Visual Fortran…

Hi,

Is this PGI Visual Fortran? Or some other Visual Fortran?

Hongyon

PGI Compiler on a linux box.

Hi,

You say it compile with Visual Fortran, which Visual Fortran? Is is PGI Visual Fortran?

I am sorry but I am not familiar with the code/syntax you posted here.

Can you post a code that you compile with PGI compiler and gives the error you mentioned? I copy your code and it does not even compile past the first line due to syntax error.

Hongyon

Hongyon,

The code is a snippet of a larger code, if you want I can email you the code; I’d rather not post the entire code here…if that’s ok with you…

You should have access to my email address, just remove erdc from the id. I’ll send you the code once I get your email, or if you post your email address here.

Thanks a bunch
G

Hi,

Please send e-mail to trs@pgroup.com and ask them to forward it to me.

Thank you,
Hongyon

I just sent the email you asked me to. There are 2 files in the attachment, one is a zip file with the code and the other is the makefile I am using.

Thanks

Hi,

I have received your source code. I only need a file that give you the error message you mentioned. They are not standard fortran code. I mean, I will need a preprocessed source.

Hongyon

The file efdc.for and hdmt.for have the interface block statement in it.

thanks for your help
G

Sorry I cannot look at it unless you provide a standard fortran code. I don’t even have include files to preprocess.

Please provide a short program that I can just use command: pgf90 -c abc.f90 to compile.

Hongyon