Re: derived type or structure

From: David Ham (D.A.Ham_at_CiTG.TUDelft.nl)
Date: 10/23/03


Date: 23 Oct 2003 15:54:23 +0200

leup <leup@falsemail.com> writes:

> hi everybody !
>
> well, i've to make a program that would work under windows(dos),unix and
> solaris, so i have some portability problems...
>
> i would want to use some STRUCTURE or TYPE definition but, i don't know if
> it will be a portability issue or not.. considering the fact that it use :
>
> - compaq visual fortran under windows so.. good for type or structure no ?
>
> - gnu fortran (g77) under linux/unix environment.. not good for type and
> structure, isn't it ?
>
> - ..??.. under sun solaris (i don't know the name but i'm pretty sure that
> it's good for TYPE and STRUCTURE)
>
> well... what do you think ? can i use TYPE, or STRUCTURE, and if not, how
> to round the problem ?

OK, the first thing you might want to know is that TYPE is the f90
(and onwards) standard way to do this. STRUCTURE isn't. If you're
really concerned about portability, then you want to use TYPE if you
can.

* g77 isn't going to help either way. AFAIK it doesn't support any
 form of derived data type.

* CVF is an F95 compiler so it can certainly do TYPE

* AFAIK, the Fortran compiler on Solaris has been at least f90 for
 ages (even if you're invoking it as f77).

* Most proprietary unix machines in use in a scientific context
 probably have an f90 compiler on them. Unfortunately "unix" isn't
 enough to answer whether this is true in a particular case. If you
 need to know specifically, please specify which Unix on which
 platform.

* For Linux the story depends on what hardware running Linux on. On
 x86 (including AMD and the like) there are a bunch of f95
 compilers. Of these, the Intel Fortran Compiler is gratis for
 non-commercial use. There is a g95 project which is free (speech)
 software (in fact there are two but the details are not that
 important) but they are not at release stage yet. For Linux on
 non-x86 machines the situation is variable. Please ask further if
 you need this.

* Another option about which I know very little is the F compiler
 which supports a subset of f95 (basically the "modern" stuff
 including type). It is available for a bunch of platforms and AFAIK
 it's gratis.

HTH

David



Relevant Pages

  • Re: Netscape 7 issues.
    ... noone gives a damn about portability and bloat. ... There is certainly a culture amoungst Linux users that if it works on ... A Dec Alpha running Tru64 - using HP's compiler. ... Finding this bug on AIX, while not on the above 11 systems, was ...
    (comp.sys.sun.admin)
  • Re: Porting to Solaris
    ... > Probably the most time-efficient thing to do is to find a Linux box (no ... why bother with porting to linux if the main target is Solaris. ... more difficult to install Solaris on a PC than it is to install Linux. ... Linux can't match Solaris concerning portability and compability to ...
    (comp.unix.programmer)
  • Re: Compilation problem with __thread
    ... i want to port an application to Solaris that is using the __thread ... variable specification on Linux on windows). ... It seems to exist only for Linux Intel/AMD. ... compiler i'm using which is nothing more then a huge C preprocessor. ...
    (comp.unix.solaris)
  • Compilation problem with __thread
    ... i want to port an application to Solaris that is using the __thread ... variable specification on Linux on windows). ... It seems to exist only for Linux Intel/AMD. ... compiler i'm using which is nothing more then a huge C preprocessor. ...
    (comp.unix.solaris)
  • Re: getting memory mapped IO to work on linux
    ... on solaris and based my memory mapped pieces of code on that....it ... worked ok on solaris/aix and this is my first try on linux. ... unix do they need to put in a compiler directive to compile/not compile ... specific code like is necessary for windows/unix portable software? ...
    (comp.os.linux.development.system)