From: Lynn McGuire on
Is there some way that I can verify our argument call
counts and argument types ? We are locked into a F77
compiler because of some zero initialization problems
that we have not been able to find. We have 650,000
lines of f77 code in about 5,000 files with probably
6,000 subroutines and functions.

Thanks,
Lynn
From: Steve Lionel on
On 2/2/2010 1:10 PM, Lynn McGuire wrote:
> Is there some way that I can verify our argument call
> counts and argument types ? We are locked into a F77
> compiler because of some zero initialization problems
> that we have not been able to find. We have 650,000
> lines of f77 code in about 5,000 files with probably
> 6,000 subroutines and functions.

No, you are not "locked into a F77 compiler". Many current F95/F03
compilers have options to give you the zero-initialization and assumed
SAVE semantics that some old compilers offered.

Intel Fortran has a "generated interface checking" option. You compile
your sources with -warn interface (/warn:interface on Windows) and it
automatically generates interface blocks and modules for subroutines and
functions and checks calls against them, warning you of mismatches. For
best success, I suggest two builds, leaving the generated .mod files in
place after the first build, because a call to a routine that has not
yet been compiled can't be checked.

For compatibility with the "F77" compiler you may have used before, add
the -Qzero and -Qsave (/Qzero and /Qsave) options.


--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
http://software.intel.com/en-us/forums/
Intel Software Development Products Support
http://software.intel.com/sites/support/
My Fortran blog
http://www.intel.com/software/drfortran
From: Lynn McGuire on
> No, you are not "locked into a F77 compiler". Many current F95/F03
> compilers have options to give you the zero-initialization and assumed
> SAVE semantics that some old compilers offered.

Nope. I have specifically tried IVF and still have problems
with zero initialization. I dont know what the specific
problem was (it could have been certain arrays not getting
zero initialized - it has been well over a year since I tried).

Our code works with the Open Watcom F77 compiler on Win32 and
the F77 generic unix compiler just fine. And the old Vax VMS
F77 compiler, the old Apollo Domain F77 compiler, the old ...
(we supported 12 platforms at one point).

> Intel Fortran has a "generated interface checking" option. You compile
> your sources with -warn interface (/warn:interface on Windows) and it
> automatically generates interface blocks and modules for subroutines and
> functions and checks calls against them, warning you of mismatches. For
> best success, I suggest two builds, leaving the generated .mod files in
> place after the first build, because a call to a routine that has not
> yet been compiled can't be checked.

I have not tried this. I may do this but the setup is very
painful with 5,000 files, 4 EXE files and 3 DLLs.

> For compatibility with the "F77" compiler you may have used before, add
> the -Qzero and -Qsave (/Qzero and /Qsave) options.

Nope, does not work for us. You and I have discussed this
before.

Thanks,
Lynn
From: Gordon Sande on
On 2010-02-02 14:36:30 -0400, Lynn McGuire <lmc(a)winsim.com> said:

>> No, you are not "locked into a F77 compiler". Many current F95/F03
>> compilers have options to give you the zero-initialization and assumed
>> SAVE semantics that some old compilers offered.
>
> Nope. I have specifically tried IVF and still have problems
> with zero initialization. I dont know what the specific
> problem was (it could have been certain arrays not getting
> zero initialized - it has been well over a year since I tried).
>
> Our code works with the Open Watcom F77 compiler on Win32 and
> the F77 generic unix compiler just fine. And the old Vax VMS
> F77 compiler, the old Apollo Domain F77 compiler, the old ...
> (we supported 12 platforms at one point).
>
>> Intel Fortran has a "generated interface checking" option. You compile
>> your sources with -warn interface (/warn:interface on Windows) and it
>> automatically generates interface blocks and modules for subroutines and
>> functions and checks calls against them, warning you of mismatches. For
>> best success, I suggest two builds, leaving the generated .mod files in
>> place after the first build, because a call to a routine that has not
>> yet been compiled can't be checked.
>
> I have not tried this. I may do this but the setup is very
> painful with 5,000 files, 4 EXE files and 3 DLLs.
>
>> For compatibility with the "F77" compiler you may have used before, add
>> the -Qzero and -Qsave (/Qzero and /Qsave) options.
>
> Nope, does not work for us. You and I have discussed this
> before.
>
> Thanks,
> Lynn

Have you tried the Salford FTN77? It is a Fortran 77 debugging compiler
that offers strong checking including undefined variable checking.

Clear the undefined variables by setting things to zero manually and
at the end there will be no zero initialization issues.

Your choice of which is worse. Porting to FTN77 and using good debugging
or sticking with what you have got and trying to find the problem that
you have not been able to find inspite of considerable effort. There are
other compilers (FTN90, NAG, Lahey/Fujitsu for example) that are Fortran
90 (and thus Fortran 77 as well) that have a different set of extensions
as well as good debugging. I am presuming that the reason you a "locked in"
is because of a past choice of extensions. Again you get to choose between
living with the extensions and lousy debugging or clearing the extensions and
having access to good debugging. Once your have no bugs and no extensions
you should be able to use any production (optimizing) compiler you want.

The cynic in me keeps hearing "I don't have time to do it right but I have
lots of time to redo it several times". Sorry! Of course it sort of keeps
working as you redo it. The price for multiple compiler licenses must
be trivial
compared to the apparent cost of staff that is currently be spent. I know,
different line items in the budget.







From: Harald Anlauf on
On Feb 2, 7:10 pm, Lynn McGuire <l...(a)winsim.com> wrote:
> Is there some way that I can verify our argument call
> counts and argument types ?  We are locked into a F77
> compiler because of some zero initialization problems
> that we have not been able to find.  We have 650,000
> lines of f77 code in about 5,000 files with probably
> 6,000 subroutines and functions.

Have you tried ftnchek? If your code is standard F77, it
should help you to diagnose problems with dummy arguments,
inconsistent common blocks and similar problems.

It may still be difficult to figure out whether your code
suffers from array bounds violations and just happens to
"work" only with a particular compiler.

Harald
 |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8
Prev: managing identities
Next: Call Tree Generator