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: fortran-dev digest, Vol 1 #295 - 2 msgs



Dear David and Tim

I don't believe that fiddling with the code is the solution; the entire program compiles beautifully with XLF. There must be a flag in Absoft that I'm missing!

Jan



Dr. Johannes N. Theron
Theron Engineering Solutions
4316 Rebel Circle
Cottonwood, AZ 86326
Phone: (928) 274-2905
email@hidden

Adjunct Professor
Department of Mechanical Engineering
College of Engineering and Technology
Northern Arizona University
P.O. Box 15600
Flagstaff, AZ 86011
email@hidden
(928) 523-6985




----Original Message Follows----
From: email@hidden
Reply-To: email@hidden
To: email@hidden
Subject: fortran-dev digest, Vol 1 #295 - 2 msgs
Date: Fri, 18 Jun 2004 22:00:41 -0700

Send fortran-dev mailing list submissions to
email@hidden

To subscribe or unsubscribe via the World Wide Web, visit
http://www.lists.apple.com/mailman/listinfo/fortran-dev
or, via email, send a message with subject or body 'help' to
email@hidden

You can reach the person managing the list at
email@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of fortran-dev digest..."


Today's Topics:

1. Re: Local variables (David W. Halliday)
2. Re: Local variables (Tim Ramsey)

--__--__--

Message: 1
Date: Fri, 18 Jun 2004 14:36:10 -0500
From: "David W. Halliday" <email@hidden>
Organization: TNRCC
To: email@hidden
CC: Jan Theron <email@hidden>
Subject: 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
> ...

--__--__--

Message: 2
To: email@hidden
Subject: Re: Local variables
From: email@hidden (Tim Ramsey)
Date: Fri, 18 Jun 2004 19:31:41 -0500

David W. Halliday wrote:
>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?
>

The times when I have seen this error in the context you describe, there
was a function of the same name that had already been linked in. I don't
remember the details but it could happen with certain intrinsics or if
you inadvertently have created more than one thing using that name.
Regardless, the simplest fix was always to rename my function/variable to dodge
the conflict. Conversely, if you rename the item and the error goes away,
you know there is a name conflict and can do whatever fix you like for
the permanent solution.


>> ***********
>>
>>
>>
>> F90 flags:
>> ***********
>> -s -YEXT_NAMES=LCS -YEXT_SFX=_ -YDEALLOC=CACHE -altivec
>> ***********
>>
>> Thanks
>>
>>
>> Dr. Johannes N. Theron
>> ...

--

Tim

Intellectuals solve problems: geniuses prevent them. -Albert Einstein,
physicist, Nobel laureate (1879-1955)


--__--__--

_______________________________________________
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.



End of fortran-dev Digest

_________________________________________________________________
Get fast, reliable Internet access with MSN 9 Dial-up  now 3 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/
_______________________________________________
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.




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.