Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Local variables



Jan Theron wrote:

Dear Fortran users

I am compiling a 10,000 line F90 code with Absoft and have run into some problems. XLF works fine and handles the makefile without any errors.

The compilation involves preprocessing .F file with #include ***.h statements (using cpp), then compiles the .f files. However, the variables defined in the *.h files are not visible to the compiler; it treats any variables pre-defined in the *.h files as local variables in the *.f files and wants them to be re-declared. I even went as far as copying mpif.h, for example,, into multiple include paths to ensure that Absoft sees the file. Are there any flags I can use to overcome this problem?

Error messagges:
***********
REAL :: tstart,tend
^
cf90-1643 f90fe: WARNING DIST_GLOBAL, File = dist_global.f, Line = 32, Column = 16
local variable TSTART never referenced.

No problem here: The compiler is simply "warning" you that the local variable TSTART has been declared, but is never referenced. (The warning is in order to help the programmer catch cases of misspellings, especially if IMPLICIT NONE is /not/ in effect.)

***********
& MAPS,JMAP(IMAP),KMAP(IMAP),LMAP(IMAP),
^
cf90-232 f90fe: ERROR DRNBDY, File = drnbdy.f, Line = 260, Column = 34
IMPLICIT NONE is specified in the local scope, therefore an explicit type must be specified for function "JMAP".

This looks like it's a continuation line, so, in order to help here we will need to see the preceding lines. However, it appears that somehow the compiler is seeing JMAP(IMAP) as a function invocation, or some such. Perhaps, due to compiler flags (including implicit flags/default settings), the compiler isn't seeing this as a continuation line?

***********



F90 flags:
***********
-s -YEXT_NAMES=LCS -YEXT_SFX=_ -YDEALLOC=CACHE -altivec
***********

Thanks


Dr. Johannes N. Theron
...
_______________________________________________
fortran-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/fortran-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Local variables (From: "Jan Theron" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.