Subject: Re: Fortran
To: None <mcmahill@mtl.mit.edu, jnelson@wiai.com>
From: Donald Lee <donlee_ppc@icompute.com>
List: port-macppc
Date: 02/28/2001 07:44:37
At 6:55 AM -0600 2/28/01, mcmahill@mtl.mit.edu wrote:
>On Tue, 27 Feb 2001 jimtnelson@earthlink.net wrote:
>
>> I have a seismic forward modeling program running fine on an i386
>> machine, but has a big problem with NaN's on my mac 7500.  I think i
>> have an alignment problem, but can't tell.  I would like to detect
>> floating point exceptions.  I tried looked for the fpu_control.h include
>> file described in "info g77", but can not find it.  Is there a provision
>> for floating point exception handling for g77 on macppc?  If so, where
>> do I find it?
>> 
>
>> More generally, g77 crashed on my during compiling with optimization set
>> to "O".  Are there big problems with g77 for macppc netbsd 1.5?
>
>I've not used g77 on macppc, but have found it somewhat buggy on some
>other non-i386 ports.  You might try the lang/f2c package.  That package
>includes a script 'f2c-f77' which does a pretty good job of acting just
>like a fortran compiler.  It should accept most of the same flags as g77.
>
>-Dan

I'd be cautious about f2c.

For serious FORTRAN codes, the translation may not be very good.

There are constructs and rules in FORTRAN that simply do not translate
into C very well.  These things being things like COMPLEX, and
some array and COMMON block subtleties.  You could spend a lot of time
debugging....

-dgl-