public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* fortran 90
@ 2002-01-20  7:41 Major A
  2002-01-20 11:52 ` Toon Moene
  0 siblings, 1 reply; 5+ messages in thread
From: Major A @ 2002-01-20  7:41 UTC (permalink / raw)
  To: gcc-help


Hi,

I'm new to this list, so please forgive me if I ask something already
discussed before.

I would like to compile a program written (to a large extent) by
others in fortran 90. It works fine with Compaq's compiler on an
alpha, but I would also like to compile it on an x86 machine. GNU
fortran, however, gives numerous error messages (regardless of whether
-ff90 is specified), the first few being

bandfit7.f: In program `MAIN__':
bandfit7.f:3: 
          real*8,allocatable,dimension(:)::  y,obj,dum,ftemp,bocc,f,g
                 ^
Invalid type-declaration attribute at (^) -- must be one of: DIMENSION(array-spe
c), EXTERNAL, INTRINSIC, PARAMETER, or SAVE
bandfit7.f:3: 
          real*8,allocatable,dimension(:)::  y,obj,dum,ftemp,bocc,f,g
                                       ^
Expression at (^) has incorrect data type or rank for its context
bandfit7.f:3: 
          real*8,allocatable,dimension(:)::  y,obj,dum,ftemp,bocc,f,g
                                        ^
Expression at (^) has incorrect data type or rank for its context
bandfit7.f:3: 
          real*8,allocatable,dimension(:)::  y,obj,dum,ftemp,bocc,f,g
          ^
Fortran 90 feature at (^) unsupported


Am I doing something wrong, or does g77 really not support dynamic
arrays? In that case, is there an alternative to g77 that I should
use?

Thanks a lot,

  Andras

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fortran 90
  2002-01-20  7:41 fortran 90 Major A
@ 2002-01-20 11:52 ` Toon Moene
  2002-01-21  2:36   ` Major A
  0 siblings, 1 reply; 5+ messages in thread
From: Toon Moene @ 2002-01-20 11:52 UTC (permalink / raw)
  To: Major A; +Cc: gcc-help

Major A wrote:

[ ... Error messages from g77 when using -ff90 ... ]

> Am I doing something wrong, or does g77 really not support dynamic
> arrays? In that case, is there an alternative to g77 that I should
> use?

g77 supports *some* Fortran 90 constructs if you specify -ff90 (this
flag exists mostly to make it possible for the compiler to discern these
Fortran 90 constructs from extensions borrowed from other compilers if
they conflict).  The compiler does *not* support the whole Fortran 90
language.

If you want a gratis Fortran 95 compiler for ix86 Linux, you could
download the Intel compiler for Linux (perhaps best to search with
Google for "intel fortran linux").

Hope this helps,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fortran 90
  2002-01-20 11:52 ` Toon Moene
@ 2002-01-21  2:36   ` Major A
  0 siblings, 0 replies; 5+ messages in thread
From: Major A @ 2002-01-21  2:36 UTC (permalink / raw)
  To: Toon Moene; +Cc: gcc-help


> g77 supports *some* Fortran 90 constructs if you specify -ff90 (this
> flag exists mostly to make it possible for the compiler to discern these
> Fortran 90 constructs from extensions borrowed from other compilers if
> they conflict).  The compiler does *not* support the whole Fortran 90
> language.
> 
> If you want a gratis Fortran 95 compiler for ix86 Linux, you could
> download the Intel compiler for Linux (perhaps best to search with
> Google for "intel fortran linux").

Oh, thanks a lot, I didn't know it was free now. It tells me that some
of the code uses non-standard extensions to f95, not even f90...

  Andras

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FORTRAN 90
  2000-09-21  9:24 FORTRAN 90 Michael Fothergill
@ 2000-09-22 11:24 ` Toon Moene
  0 siblings, 0 replies; 5+ messages in thread
From: Toon Moene @ 2000-09-22 11:24 UTC (permalink / raw)
  To: Michael Fothergill; +Cc: gcc-help

Michael Fothergill wrote:

> Does anyone know if gcc can be persuaded successfully to compile
> FORTRAN 90?

It can't, safe for the fact that all of FORTRAN 77 is valid Fortran 90.

> The documentation on the website suggests this is really on the TODO
> list for the compiler, but there is some kind of F90 option which
> makes the program recognize FORTRAN 90 like code....
> 
> Does anyone know how good it is?

-ff90 merely implies that in the case there is a choice between
interpreting a certain construct in the strict Fortran 90 way and in a
way provided as an extension, the first interpretation will be chosen.

> Also in the documentation you get with it (I am using Red Hat Linux on
> a new PC version 6.2) where does it actually tell you how to run the
> compiler especially with fairly sophisticated makefiles with biggish
> main and sub programs????
> 
> Most of the stuff I can find in the directories I installed e.g. gcc
> FAQ doesn't even tell you the simplest ways to use the compiler, it
> doesn't simply list the names of the different executables in
> usr/local/bin and tell you what they do...
> 
> I don't care if it is being developed  in a bazaar or cathedral format
> etc., I just want to know how to use it to compile a complicated
> algorithm with hundreds of subroutines doing a molecular dynamics
> calculation.

Well, you can just use it like any other compiler on a Unix-like system,
i.e.:

g77 -c foo.f

compiles a single source file to an object file.

g77 foo.f

compiles a single source file to an executable file, which can be run by
issuing the command:

./a.out

g77 -o foo foo.f

compiles the file into the executable foo, which is the same as a.out
above.

Hope this helps,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* FORTRAN 90
@ 2000-09-21  9:24 Michael Fothergill
  2000-09-22 11:24 ` Toon Moene
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Fothergill @ 2000-09-21  9:24 UTC (permalink / raw)
  To: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

Dear people;
 
Does anyone know if gcc can be persuaded 
successfully to compile FORTRAN 90?
 
The documentation on the website suggests this 
is really on the TODO list for the compiler, but there is some kind of F90 
option which makes the program recognize FORTRAN 90 like code....
 
Does anyone know how good it is?
 
Also in the documentation you get with it (I am 
using Red Hat Linux on a new PC version 6.2) where does it actually tell you how 
to run the compiler especially with fairly sophisticated makefiles with biggish 
main and sub programs????
 
Most of the stuff I can find in the directories I installed 
e.g. gcc FAQ doesn't even tell you the simplest ways to use the compiler, it 
doesn't simply list the names of the different executables in usr/local/bin and 
tell you what they do...
 
I don't care if it is being developed  in a bazaar or 
cathedral format etc., I just want to know how to use it to compile a 
complicated algorithm with hundreds of subroutines doing a molecular dynamics 
calculation.
 
Please help,
 
Michael Fothergill
 
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-01-21 10:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-20  7:41 fortran 90 Major A
2002-01-20 11:52 ` Toon Moene
2002-01-21  2:36   ` Major A
  -- strict thread matches above, loose matches on Subject: below --
2000-09-21  9:24 FORTRAN 90 Michael Fothergill
2000-09-22 11:24 ` Toon Moene

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).