For Programmers: Free Programming Magazines  


Home > Archive > Fortran > June 2004 > porting from solaris/sparc to linux/intel









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 porting from solaris/sparc to linux/intel
Giraudon Cyril

2004-06-25, 7:44 pm

Hello,

I 've writen a software on solaris/sparc in fortran77. I'd like to use it
on a linux/intel box. But the code diverge, i'need big numbers (i.e.
1e70).

Is there any way to double ( precision / length ) without rewriting the
code ?

Thanks a lot.

Cyril.
Richard Maine

2004-06-25, 7:44 pm

Giraudon Cyril <giraudon@ifrance.com> writes:

> Is there any way to double ( precision / length ) without rewriting the
> code ?


The usual and standard way to specify double precision is to write it
in the code. You didn't quite say explicitly, but I gather from the
question that you are probably using a compiler switch on the Sun to
automatically change the kinds of default reals.

Such switches are outside the bounds of the standard and vary widely
among compilers. I recommend against using them. My recommendation
is to fix the code. But if you do want to use a compiler switch
instead of fixing the code, such things depend on the particular
compiler you are using. There are *LOTS* of Fortran compilers
available for Linux. You didn't say much about which one you are
using. Some of them have such switches; some of them don't.

If you happen to be using g77, as a not entirely random guess on my
part (mostly because I'd guess that you would have said what one you
were using if you were using some other one), that's one of the ones
that doesn't - at least last time I checked; I suppose it could have
changed since then. That probably forces you to choose between fixing
the code and getting a different compiler - your choice.

--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
Robert Corbett

2004-06-25, 7:44 pm

Giraudon Cyril <giraudon@ifrance.com> wrote in message news:<pan.2004.06.21.22.45.20.887393@ifrance.com>...
> Hello,
>
> I 've writen a software on solaris/sparc in fortran77. I'd like to use it
> on a linux/intel box. But the code diverge, i'need big numbers (i.e.
> 1e70).
>
> Is there any way to double ( precision / length ) without rewriting the
> code ?
>
> Thanks a lot.
>
> Cyril.


You can find a program on netlib that transforms Fortran codes that use
single-precision into codes that use double-precision.

Since single-precision on SPARC has the same range as single-precision
on Intel, why don't you have the same problem on SPARC as on Intel?

Sincerely,
Bob Corbett
Sponsored Links







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

Copyright 2008 codecomments.com