For Programmers: Free Programming Magazines  


Home > Archive > Fortran > July 2004 > [Question:]Difference between PGF90 and Compaq Visual Fortran 6.6









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [Question:]Difference between PGF90 and Compaq Visual Fortran 6.6
andy

2004-07-28, 9:06 pm

Hi Guys:
I have a question about running the same program (written by
Fortran 77)in different platform using different compiler. In Linux
platform, I run my program compiled by PGF77 and in Windows 2k
platform, I run my program compiled by Compaq Visual Fortran 6.6; in
Sun Solaris 8 platform, I run my program compiled by Sun Fortran 95
compiler. The results caculated by Compaq 6.6 and Sun Fortran 95 are
the same, but the output by PGI compiler is different. I try to use
GNU f77 and IBM ifc to compile my problem. However, neither of them
works. So, I suspect the reliability of PGI compiler and the fortran
compiler under Linux platform. Is there any suggestion to fix this
problem? Thanks in advance!
beliavsky@aol.com

2004-07-28, 9:06 pm


andylcx@hotmail.com (andy) wrote:
>Hi Guys:
> I have a question about running the same program (written by
>Fortran 77)in different platform using different compiler. In Linux
>platform, I run my program compiled by PGF77 and in Windows 2k
>platform, I run my program compiled by Compaq Visual Fortran 6.6; in
>Sun Solaris 8 platform, I run my program compiled by Sun Fortran 95
>compiler. The results caculated by Compaq 6.6 and Sun Fortran 95 are
>the same, but the output by PGI compiler is different. I try to use
>GNU f77 and IBM ifc to compile my problem. However, neither of them
>works. So, I suspect the reliability of PGI compiler and the fortran
>compiler under Linux platform. Is there any suggestion to fix this
>problem? Thanks in advance!


It appears that at least three compilers are not giving you the expected
results with your program. This may indicate that your program does not strictly
conform to the Fortran 77 standard.

I recommend compiling with standards-conformance options and debugging options
(such as checks for out-of-bound array elements or uninitialized variables)
turned on.

You can get a free trial of the Lahey Fortran 95 compiler, and I believe
the Salford Fortran 77 compiler is free for noncommercial use. They are both
good for debugging. You can check your source with the Lahey compiler online
at http://www.lahey.com/check.htm .

When I programmed in F77 the free Ftnchek program helped me find bugs --
see http://www.dsm.fordham.edu/~ftnchek/ .




----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Tim Prince

2004-07-28, 9:06 pm


"beliavsky@aol.com" <beliavsky@127.0.0.1:7501> wrote in message
news:4102c838_1@127.0.0.1...
>
> andylcx@hotmail.com (andy) wrote:
>
> It appears that at least three compilers are not giving you the expected
> results with your program. This may indicate that your program does not

strictly
> conform to the Fortran 77 standard.
>
> I recommend compiling with standards-conformance options and debugging

options
> (such as checks for out-of-bound array elements or uninitialized

variables)
> turned on.

Those comments are supported by the fact that only the compilers which use
static variables initialized to zero by default are working for you. The
other compilers have options to emulate that behavior, as a work-around, as
well as options to help you diagnose the problems in your source. Compilers
tend not to guess which extensions you consider to be reliable as defaults.
Fortran 77 provided facilities like SAVE, in addition to DATA, which was
there before, so that you had no need to depend on peculiarities of
individual compilers.
You seem to be mixed up about the names of past Intel and IBM compilers.


Catherine Rees Lay

2004-07-29, 8:57 am

In article <16c9ae76.0407241202.443f2e99@posting.google.com>, andy
<andylcx@hotmail.com> writes
>Hi Guys:
> I have a question about running the same program (written by
>Fortran 77)in different platform using different compiler. In Linux
>platform, I run my program compiled by PGF77 and in Windows 2k
>platform, I run my program compiled by Compaq Visual Fortran 6.6; in
>Sun Solaris 8 platform, I run my program compiled by Sun Fortran 95
>compiler. The results caculated by Compaq 6.6 and Sun Fortran 95 are
>the same, but the output by PGI compiler is different. I try to use
>GNU f77 and IBM ifc to compile my problem. However, neither of them
>works. So, I suspect the reliability of PGI compiler and the fortran
>compiler under Linux platform. Is there any suggestion to fix this
>problem? Thanks in advance!


It sounds as though your program isn't as standard f77 as you think it
is, if you have 2 f77 compilers which can't even compile it. At this
point, all bets are off. If I had a program which 2 different compilers
couldn't compile, I'd suspect a bug in my program, not the reliability
of a 3rd compiler. What error messages do you get from the 2 compilers
which reject the code?

If that doesn't help. I suggest you turn all the checking options on all
of your compilers on and start fixing any errors they report. Strong
candidates include a reference to an array element outside the bounds of
the array and using a variable which has never been initialised.

HTH,

Catherine.
--
Catherine Rees Lay
To email me, use my first name in front of the "at".
Nicolas Lardjane

2004-07-30, 3:57 pm

andylcx@hotmail.com (andy) wrote in message news:<16c9ae76.0407241202.443f2e99@posting.google.com>...
> Hi Guys:
> I have a question about running the same program (written by
> Fortran 77)in different platform using different compiler. In Linux
> platform, I run my program compiled by PGF77 and in Windows 2k
> platform, I run my program compiled by Compaq Visual Fortran 6.6; in
> Sun Solaris 8 platform, I run my program compiled by Sun Fortran 95
> compiler. The results caculated by Compaq 6.6 and Sun Fortran 95 are
> the same, but the output by PGI compiler is different. I try to use
> GNU f77 and IBM ifc to compile my problem. However, neither of them
> works. So, I suspect the reliability of PGI compiler and the fortran
> compiler under Linux platform. Is there any suggestion to fix this
> problem? Thanks in advance!


By default pgf77 use extended precision (cf man pgf90) did you try
using the -pc 64 flag ?
NL.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com