[comp.parallel] CM Fortran

ian@decwrl.dec.com (Ian L. Kaplan) (12/21/90)

In article <12324@hubcap.clemson.edu> john%ghostwheel.unm.edu@ariel.unm.edu (John Prentice) writes:
> On the CM2, the Fortran compiler
>detects parallelism by the use of Fortran Extended array syntax which
>is somewhat "automatic" I suppose (except that you have to put in this
>syntax specifically for the CM2, nobody else uses it.  When Fortran Extended
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>gets out, that will be another matter).
>
  The statement that CM Fortran is a dialect that no one else uses is
untrue.  MasPar Computer Corp uses the same dialect of Fortran.  The
array language extensions in CM and MasPar Fortran are taken from the
Fortran 90 standard.  This is currently an adopted ISO standard and
will (I hope) soon be an ANSI standard.  Alliant has supported a
version of the array language for a number of years.  I have also
heard that Cray will be bringing out a Fortran compiler with Fortan 90
extensions.  Computer vendors and industry coding practive usually
leads the standard.  People are not waiting for "Fortran Extended" to
be adopted before they use it.

                        Ian Kaplan
			ian@maspar.com
			argosy!ian@decwrl.dec.com
			
These words are mine, not MasPar's.

serafini@nas.nasa.gov (David B. Serafini) (12/22/90)

In article <12381@hubcap.clemson.edu> argosy!ian@decwrl.dec.com (Ian L. Kaplan) writes:
>  The statement that CM Fortran is a dialect that no one else uses is
>untrue.  [...]
>I have also
>heard that Cray will be bringing out a Fortran compiler with Fortan 90
>extensions.  

CFT77 has had a subset of the Fortran 90 array syntax for quite a while now,
at least a couple of years.  It hasn't caught on much, (to my knowledge)
probably because of the portability problems it creates.  The Cray Fortran
preprocessor, fpp, now can put out do-loop based code when given array code,
so portability is less of a concern now. 

>                        Ian Kaplan
>			ian@maspar.com
>			argosy!ian@decwrl.dec.com
>			
>These words are mine, not MasPar's.

David Serafini, Rose Engineering & Research at NASA/Ames Research Center
serafini@amelia.nas.nasa.gov      <standard disclaimers apply>

--
David B. Serafini			serafini@ralph.arc.nasa.gov
Rose Engineering and Research		or ...!ames!amelia!serafini
NASA/Ames Research Center  MS227-6	(415)604-6233	
Moffett Field, CA 94035			#include <std-disclaimer.h>

john%ghostwheel.unm.edu@ariel.unm.edu (John Prentice) (12/28/90)

In article <12398@hubcap.clemson.edu> serafini@amelia.nas.nasa.gov (David B. Serafini) writes:
>
>CFT77 has had a subset of the Fortran 90 array syntax for quite a while now,
>at least a couple of years.  It hasn't caught on much, (to my knowledge)
>probably because of the portability problems it creates.  The Cray Fortran
>preprocessor, fpp, now can put out do-loop based code when given array code,
>so portability is less of a concern now. 
>
This is rather interesting.  Does fpp generate a new do-loop for every
array construct or is it smart enough to combine operations the way
you would if you were writing in Fortran 77?  What is the effect on
the optimizer of all this?

John K. Prentice
john@unmfys.unm.edu

rcarter@nas.nasa.gov (Russell L. Carter) (01/03/91)

In article <12410@hubcap.clemson.edu> john%ghostwheel.unm.edu@ariel.unm.edu (John Prentice) writes:
>In article <12398@hubcap.clemson.edu> serafini@amelia.nas.nasa.gov (David B. Serafini) writes:
>>
>>CFT77 has had a subset of the Fortran 90 array syntax for quite a while now,
>>at least a couple of years.  It hasn't caught on much, (to my knowledge)
>>probably because of the portability problems it creates.  The Cray Fortran
>>preprocessor, fpp, now can put out do-loop based code when given array code,
>>so portability is less of a concern now. 
>>
>This is rather interesting.  Does fpp generate a new do-loop for every
>array construct or is it smart enough to combine operations the way
>you would if you were writing in Fortran 77?  What is the effect on
>the optimizer of all this?
>
>John K. Prentice
>john@unmfys.unm.edu

Well, let's look at some data. I converted the NAS Kernels, a popular
CFD benchmark (at least here at NAS) to array syntax, and ran
it on our YMP.  Here is what I get:

Using array syntax:

                THE NAS KERNEL BENCHMARK PROGRAM


 PROGRAM        ERROR          FP OPS       SECONDS      MFLOPS

 MXM          1.8085E-13     4.1943E+08      1.5879      264.15
 CFFT2D       3.2001E-12     4.9807E+08     11.1267       44.76
 CHOLSKY      1.8256E-10     2.2103E+08      4.9911       44.29
 BTRIX        6.0622E-12     3.2197E+08      4.5159       71.30
 GMTRY        1.0082E+00     2.2650E+08      3.5258       64.24
 EMIT         1.5609E-13     2.2604E+08      1.3055      173.15
 VPENTA       2.3541E-13     2.5943E+08      7.1281       36.40

 TOTAL        1.0082E+00     2.1725E+09     34.1810       63.56


And using plain vanilla fortran 77:


                THE NAS KERNEL BENCHMARK PROGRAM


 PROGRAM        ERROR          FP OPS       SECONDS      MFLOPS

 MXM          1.8085E-13     4.1943E+08      1.5705      267.06
 CFFT2D       3.2001E-12     4.9807E+08      7.0951       70.20
 CHOLSKY      1.8256E-10     2.2103E+08      2.6393       83.75
 BTRIX        6.0622E-12     3.2197E+08      2.3717      135.76
 GMTRY        6.5609E-13     2.2650E+08      2.0910      108.32
 EMIT         1.5609E-13     2.2604E+08      1.2987      174.05
 VPENTA       2.3541E-13     2.5943E+08      4.7900       54.16

 TOTAL        1.9305E-10     2.1725E+09     21.8563       99.40



The MFLOPS definitely decrease for this code when the DO loops
are expressed in the array section syntax.  We have smart users;
They HATE to go slower.  So few apparently use the array
syntax here at NAS, unless they want a code that can be run
with minimal changes on the CM.

russell
rcarter@wilbur.nas.nasa.gov