Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tutorial, Compiler and Graphic/Diagram Library

3 views
Skip to first unread message

Florian Xaver

unread,
Nov 11, 2009, 4:21:23 AM11/11/09
to
Hi!

The code style of Fortran 95/2003/2008 is elegant so I have some
questions (Google haven't helped me a lot...):

*) What graphic-library are you using to plot diagrams? DISLIN? (should
work in as many operating systems as possible)

*) Which compiler? Would you use gfortran or g95?

*) Any good tutorial about Fortran 2003/2008? I found only old ones...


Thanks
Flo

rusi_pathan

unread,
Nov 11, 2009, 10:57:36 AM11/11/09
to
Dislin is good (others include GINO and PLplot but I havent used them
personally). Most people simply use other packages such as gnuplot/gmt/
paraview/tecplot etc.

For F2003 there are some notes by Reinhold Bader:

http://www.lrz-muenchen.de/services/software/programmierung/fortran90/f03_material/2008.html

Your best bet is to get these books:

http://books.google.com/books?id=HH51LbL2fy0C
http://highered.mcgraw-hill.com/sites/0073191574

The latter might be better if you're new to Fortran.

Compilers
---------
On x86 Linux you can use any of these:
gfortran (supports openmp)
g95 (no support for openmp but as co-arrays)
sunf95 (Sun Studio) is free and comes with other useful tools such as
IDE/debugger/analyze/math lib etc.
Intels ifort is free but only for non-commercial use.

2003 support is slowly being added to these but afaik currently only
IBM and Cray compilers fully support it but are $$$. You can find a
list of compilers at
http://www.polyhedron.com/Compsindex

The current version of ACM SIGPLAN Fortran Forum has info regarding
2003/2008 support. See the article "Compiler support for the Fortran
2003 and 2008 standards" by Ian D. Chivers, Jane Sleightholme, p.15-20

Richard Maine

unread,
Nov 11, 2009, 11:56:13 AM11/11/09
to
rusi_pathan <tabr...@gmail.com> wrote:

> 2003 support is slowly being added to these but afaik currently only
> IBM and Cray compilers fully support it but are $$$.

My data is slightly out of date, but the last version of the ACM sigplan
that I found in a quick glance (Aug 2009) still showed IBM as not having
done PDTs. As has been discussed here before, lots of people might find
that acceptable and there are probably good reasons for it not being
done yet. But it is too major a feature for its omission to allow an
unqualified claim of full support. I'd buy a qualification such as
"except for PDTs", but unless that data is out of date, I think "full"
needs such a qualification.

I'd note that the biggest cost element of those two compilers is not so
much the compilers themselves as the machines thay they run on.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain

Tobias Burnus

unread,
Nov 11, 2009, 12:28:23 PM11/11/09
to
On 11/11/2009 04:57 PM, rusi_pathan wrote:
>> *) Which compiler? Would you use gfortran or g95?
>> *) Any good tutorial about Fortran 2003/2008? I found only old ones...

> Compilers


> ---------
> On x86 Linux you can use any of these:

I want to add: It is good practice more than one compiler: It helps to
find bugs as they have different diagnostic capabilities. On the other
hand, if you want to use Fortran 2003/2008 features, your compiler
choices are limited. That's going to improve but finding a compiler for
your budget/system which supports all the Fortran 2003 feature you want
to use, can turn out to be surprisingly difficult [~6 years after the
standard has been released]. For Fortran 2008, you might be lucky that
the single feature you want to use is supported, but expecting more is
unrealistic.


> gfortran (supports openmp)
> g95 (no support for openmp but as co-arrays)
> sunf95 (Sun Studio) is free and comes with other useful tools such as
> IDE/debugger/analyze/math lib etc.
> Intels ifort is free but only for non-commercial use.

On x86-64 there is also Open64 (main site is open64.net, but the builds
at http://developer.amd.com/cpu/open64 are newer); Fortran 2003 is
essentially unsupported, but that could be improve in the foreseeable
future (months to one year).


> 2003 support is slowly being added to these but afaik currently only
> IBM and Cray compilers fully support it but are $$$.

For x86(-64) the NAG compiler (���) could also be a choice as it has
also relatively complete Fortran 2003 support. (IBM is $$$$ but only (?)
runs on PowerPC; I have not seen quotes for the Cray compiler.)

In terms of F2003 I would do the following ranking of the compilers
mentioned above: IBM's and Cray's (allegedly complete), NAG's has a
large F2003 coverage; Intel's and (a bit behind) gfortran make good
progress. g95 has a couple of Fortran 2003 features, but the development
seems to be stalled (but it has coarrays). SUN's also has a couple of
Fortran 2003 features. While Open64 has to my knowledge no 2003 features.

The Fortran 2008 support is very limited. As the standard is not even
officially ratified, that's not really a surprise. Cray and g95 support
coarrays. gfortran supports the new edit descriptors, NEWUNIT= and
(most) new mathematics intrinsics. The support in other compilers is
similarly scattered. For instance, "ERF" is supported by almost all
compilers - even those which only support Fortran 77, while no compiler
seems to offer submodules.

Thus my compiler recommendation - assuming the use of several Fortran
2003 features and a x86(-64) platform - is: NAG 5.2 + ifort 11.1 +
gfortran 4.5 (or Fortran-dev branch) -- and expect unimplemented
features and some compiler bugs. If you don't want to buy NAG, ifort +
gfortran. If you cannot use ifort (non-commercial license), I would
suggest gfortran + g95 and/or sunf95.

If you are mostly using Fortran 95, any of the compilers mentioned above
is a good choice. As Open64, g95 and gfortran are free and opensource
and Sun Studio is free (on Linux and Solaris), you could simply install
all of them and have a look which one you like most. For instance, I
like NAG for the compile- and runtime diagnostics, but as it has hardly
any vendor extensions, generates relatively slow code and has no OpenMP,
it is not suited for all my uses. On the other hand Open64 is very fast
(faster than ifort on my AMD), but has little diagnostic support an no
Fortran 2003.


> The current version of ACM SIGPLAN Fortran Forum has info regarding
> 2003/2008 support. See the article "Compiler support for the Fortran
> 2003 and 2008 standards" by Ian D. Chivers, Jane Sleightholme, p.15-20

An older version (only F2003 coverage) is available at
http://www.fortranplus.co.uk/resources/fortran_2003_compiler_support.pdf
the latest one (newer and F2003+F2008 coverage) is available at
http://portal.acm.org/toc.cfm?id=1570522&idx=J286 (subscription
required, might be offered by e.g. by your university).

Tobias

Disclaimer: I participate in the gfortran development and use
essentially only gfortran + ifort for my programs, though I sometimes
fire up the NAG 5.1 (not 5.2 :-( ) compiler for better diagnostics. Sun,
Open64, Pathscale and g95 are also installed on my system, but only
rarely used.

rusi_pathan

unread,
Nov 11, 2009, 5:15:23 PM11/11/09
to
On Nov 11, 11:56 am, nos...@see.signature (Richard Maine) wrote:
You're right (as always). According to the article PDTs are not
supported by IBMs compiler.

Reinhold Bader

unread,
Nov 12, 2009, 3:53:43 AM11/12/09
to
rusi_pathan schrieb:
[...]

Note that these are dated; a more recent version (with corrections made through availability of more
advanced compilers) can be obtained from
http://www.lrz-muenchen.de/services/software/programmierung/fortran90/f03_material/2009/2009.html
(contact me for access information).


Regards
Reinhold

Steven Correll

unread,
Nov 12, 2009, 11:44:27 AM11/12/09
to
On Nov 11, 10:28 am, Tobias Burnus <bur...@net-b.de> wrote:
> On the other hand Open64 is very fast
> (faster than ifort on my AMD), but has little diagnostic support an no
> Fortran 2003.

Actually, the Pathscale product based on Open64 does support some
Fortran 2003 features, and if the code hasn't found its way into every
Open64 repository, it could be added thanks to the GPL. The following
list of supported features uses section numbers keyed to Reid's "The
New Features of Fortran 2003", which is ISO/IEC JTC1/SC22/WG5 document
N1579:

TR 15580 IEEE arithmetic

TR 15581 Allocatable components

1539-2 Varying character strings

2.9 Enumerations

3.8 Pointer INTENT

3.9 VOLATILE attribute

3.10 IMPORT statement

3.11 Intrinsic modules

3.12 (partial) Access to the computing environment (iso_fortran_env,
get_command_argument etc)

3.14 Lengths of names and statements

3.15 Binary, octal, and hex constants

3.16 (partial) Array constructor syntax (using "[]")

3.18 Complex constants

3.20 Controlling IEEE underflow

3.21 Another IEEE class value

4.11 Intrinsic function for newline character

4.13 Comma after a P edit descriptor

5.0 Interoperability with C

Florian Xaver

unread,
Nov 17, 2009, 3:52:06 AM11/17/09
to
To all who have answerd: Thank you!

To Reinhold: Please could you send me the access?

Am 12.11.09 09:53, schrieb Reinhold Bader:

0 new messages