Help: Presentation about Fortran

  • Follow


Hello,

I have to do a 15 min presentation for my Computational Astrophysics 
course. I have a lot of latitude in choosing the topic of the 
presentation, as long as it is related to computational methods.

Currently I have two candidate ideas:

1) I could explain the Bulirsch�Stoer algorithm with Richardson 
extrapolation, which we touched *very* briefly in class.

2) I could talk about modern Fortran, and try to convince people that it 
is actually a good language.


I was wondering if anyone had any thoughts to share on a Fortran 
presentation. The audience is a group of master students whose only 
previous knowledge is tweaking an ugly, 20-year-old Fortran 77 program 
without little documentation. Thus, they all "know" that Fortran is 
defunct and archaic. Same goes for the teacher btw.

Does anyone have any thoughts on this? Maybe even an idea or suggestion?

Cheers,
Daniel.
0
Reply Daniel 3/28/2011 3:04:46 PM

On Mar 28, 11:04=A0am, Daniel Carrera <dan...@gmail.com> wrote:
> Hello,
>
> I have to do a 15 min presentation for my Computational Astrophysics
> course. I have a lot of latitude in choosing the topic of the
> presentation, as long as it is related to computational methods.
>
> Currently I have two candidate ideas:
>
> 1) I could explain the Bulirsch Stoer algorithm with Richardson
> extrapolation, which we touched *very* briefly in class.
>
> 2) I could talk about modern Fortran, and try to convince people that it
> is actually a good language.
>
> I was wondering if anyone had any thoughts to share on a Fortran
> presentation. The audience is a group of master students whose only
> previous knowledge is tweaking an ugly, 20-year-old Fortran 77 program
> without little documentation. Thus, they all "know" that Fortran is
> defunct and archaic. Same goes for the teacher btw.
>
> Does anyone have any thoughts on this? Maybe even an idea or suggestion?

Have a look at Mike Metcalf's paper:

<http://journal.info.unlp.edu.ar/journal/journal30/papers/JCST-
Apr11-1.pdf>

agt
--
Freedom - no pane, all gaiGN!

Code Art Now
http://codeartnow.com
Email: a...@codeartnow.com
0
Reply viper 3/28/2011 3:33:06 PM


On Mar 28, 12:33=A0pm, viper-2 <a...@codeartnow.com> wrote:
> On Mar 28, 11:04=A0am, Daniel Carrera <dan...@gmail.com> wrote:
>
>
>
>
>
> > Hello,
>
> > I have to do a 15 min presentation for my Computational Astrophysics
> > course. I have a lot of latitude in choosing the topic of the
> > presentation, as long as it is related to computational methods.
>
> > Currently I have two candidate ideas:
>
> > 1) I could explain the Bulirsch Stoer algorithm with Richardson
> > extrapolation, which we touched *very* briefly in class.
>
> > 2) I could talk about modern Fortran, and try to convince people that i=
t
> > is actually a good language.
>
> > I was wondering if anyone had any thoughts to share on a Fortran
> > presentation. The audience is a group of master students whose only
> > previous knowledge is tweaking an ugly, 20-year-old Fortran 77 program
> > without little documentation. Thus, they all "know" that Fortran is
> > defunct and archaic. Same goes for the teacher btw.
>
> > Does anyone have any thoughts on this? Maybe even an idea or suggestion=
?
>
> Have a look at Mike Metcalf's paper:
>
> <http://journal.info.unlp.edu.ar/journal/journal30/papers/JCST-
> Apr11-1.pdf>
>
> agt
> --
> Freedom - no pane, all gaiGN!
>
> Code Art Nowhttp://codeartnow.com
> Email: a...@codeartnow.com

I agree :)

Also, you could take a look at the current status of gfortran Fortran
2003 and Fortran 2008 support,

http://gcc.gnu.org/onlinedocs/gfortran/Fortran-2003-status.html

http://gcc.gnu.org/wiki/GFortran

there are many useful new features already supported. The current
Wikipedia content on Fortran can also be used, I think. I've not
checked contents, but the list of lectures at

http://exodus.physics.ucla.edu/Fortran95/PSTIResearchLecSeries1.html

seems good, tough some out of date. You can also mention that OpenMP
is currently supported by all major Fortran compilers. Of course
OpenMP is not part of Fortran, but it can be used to parallelize
Fortran code or directly to write parallel code. Hmmmm.... just a
quick and mostly unchecked list.

Fernando.
0
Reply gmail 3/28/2011 4:26:44 PM

Daniel Carrera wrote:
> Hello,
> 
> I have to do a 15 min presentation for my Computational Astrophysics
> course. I have a lot of latitude in choosing the topic of the
> presentation, as long as it is related to computational methods.
> 
> Currently I have two candidate ideas:
> 
> 1) I could explain the Bulirsch�Stoer algorithm with Richardson
> extrapolation, which we touched *very* briefly in class.
> 
> 2) I could talk about modern Fortran, and try to convince people that it
> is actually a good language.

I have a couple of old presentations that I used to introduce folks in my building to the wonders of fortran95/2003:

http://www.lib.ncep.noaa.gov/itresources/presentations/fortran952003presentation.pdf
http://www.lib.ncep.noaa.gov/itresources/presentations/fortran952003pt2.pdf

The original ppt's have animations in them so if you see things overlaind in the above pdf's it's because my ppt->adobe
conversion didn't stick the animation in.

cheers,

paulv
0
Reply Paul 3/28/2011 7:50:59 PM

On Mar 29, 8:50=A0am, Paul van Delst <paul.vande...@noaa.gov> wrote:
> Daniel Carrera wrote:
> > Hello,
>
> > I have to do a 15 min presentation for my Computational Astrophysics
> > course. I have a lot of latitude in choosing the topic of the
> > presentation, as long as it is related to computational methods.
>
> > Currently I have two candidate ideas:
>
> > 1) I could explain the Bulirsch Stoer algorithm with Richardson
> > extrapolation, which we touched *very* briefly in class.
>
> > 2) I could talk about modern Fortran, and try to convince people that i=
t
> > is actually a good language.
>
> I have a couple of old presentations that I used to introduce folks in my=
 building to the wonders of fortran95/2003:
>
> http://www.lib.ncep.noaa.gov/itresources/presentations/fortran952003p...h=
ttp://www.lib.ncep.noaa.gov/itresources/presentations/fortran952003p...
>
> The original ppt's have animations in them so if you see things overlaind=
 in the above pdf's it's because my ppt->adobe
> conversion didn't stick the animation in.
>
> cheers,
>
> paulv

I perpetrated a brief intro to f95 for f77 users:
http://researcharchive.vuw.ac.nz//handle/10063/411 (get the 102.7K
paper not the 245K form, which is administrivia unlikely to be
available outside my university)

-- John Harper
0
Reply john.harper (194) 3/28/2011 9:10:48 PM

On 03/28/2011 09:50 PM, Paul van Delst wrote:
> I have a couple of old presentations that I used to introduce folks in my building to the wonders of fortran95/2003:
>
> http://www.lib.ncep.noaa.gov/itresources/presentations/fortran952003presentation.pdf
> http://www.lib.ncep.noaa.gov/itresources/presentations/fortran952003pt2.pdf

Thanks. Much appreciated. I expect that my presentation will be aimed at 
a relatively low level, but looking at others will give me a lot of ideas.

Cheers,
Daniel.
0
Reply daniel8127 (276) 3/28/2011 9:18:14 PM

On 03/28/2011 11:10 PM, jfh wrote:
> I perpetrated a brief intro to f95 for f77 users:
> http://researcharchive.vuw.ac.nz//handle/10063/411 (get the 102.7K
> paper not the 245K form, which is administrivia unlikely to be
> available outside my university)
>
> -- John Harper

Thanks. That paper gave me some ideas.

Daniel.
0
Reply daniel8127 (276) 3/28/2011 9:25:26 PM

On Mon, 28 Mar 2011 08:33:06 -0700 (PDT), viper-2 <agt@codeartnow.com>
wrote:

>On Mar 28, 11:04�am, Daniel Carrera <dan...@gmail.com> wrote:
>> Hello,
>>
>> I have to do a 15 min presentation for my Computational Astrophysics
>> course. I have a lot of latitude in choosing the topic of the
>> presentation, as long as it is related to computational methods.
>>
>> Currently I have two candidate ideas:
>>
>> 1) I could explain the Bulirsch Stoer algorithm with Richardson
>> extrapolation, which we touched *very* briefly in class.
>>
>> 2) I could talk about modern Fortran, and try to convince people that it
>> is actually a good language.
>>
>> I was wondering if anyone had any thoughts to share on a Fortran
>> presentation. The audience is a group of master students whose only
>> previous knowledge is tweaking an ugly, 20-year-old Fortran 77 program
>> without little documentation. Thus, they all "know" that Fortran is
>> defunct and archaic. Same goes for the teacher btw.
>>
>> Does anyone have any thoughts on this? Maybe even an idea or suggestion?
>
>Have a look at Mike Metcalf's paper:
>
><http://journal.info.unlp.edu.ar/journal/journal30/papers/JCST-
>Apr11-1.pdf>
>
>agt

Jonas Juselius's page has a very nice Fortran talk presentation (with
an emphasis on modern fortran features) - perhaps you could use some
of his ideas, or contact the author and ask him to use his materials
in your talk.
(on the page scroll down, look for fortran, there it should be in the
first few rows - the link)


Luka Djigas
0
Reply i_dont_have (10) 3/28/2011 11:13:48 PM

On 03/29/2011 01:13 AM, Luka Djigas wrote:
> Jonas Juselius's page has a very nice Fortran talk presentation (with
> an emphasis on modern fortran features) - perhaps you could use some
> of his ideas, or contact the author and ask him to use his materials
> in your talk.
> (on the page scroll down, look for fortran, there it should be in the
> first few rows - the link)

Can you give me the URL?
0
Reply daniel8127 (276) 3/29/2011 7:44:35 AM

Does anyone know where I can get a simple (easy to read) list of 
features added / obseleted / deleted for each Fortran version from 90 
onward? I'm thinking of adding a few slides to convey that the language 
is evolving, so I'd like to have a list of changes.

Daniel.

On 03/28/2011 05:04 PM, Daniel Carrera wrote:
> Hello,
>
> I have to do a 15 min presentation for my Computational Astrophysics
> course. I have a lot of latitude in choosing the topic of the
> presentation, as long as it is related to computational methods.
>
> Currently I have two candidate ideas:
>
> 1) I could explain the Bulirsch�Stoer algorithm with Richardson
> extrapolation, which we touched *very* briefly in class.
>
> 2) I could talk about modern Fortran, and try to convince people that it
> is actually a good language.
>
>
> I was wondering if anyone had any thoughts to share on a Fortran
> presentation. The audience is a group of master students whose only
> previous knowledge is tweaking an ugly, 20-year-old Fortran 77 program
> without little documentation. Thus, they all "know" that Fortran is
> defunct and archaic. Same goes for the teacher btw.
>
> Does anyone have any thoughts on this? Maybe even an idea or suggestion?
>
> Cheers,
> Daniel.

0
Reply daniel8127 (276) 3/29/2011 2:33:29 PM

On 3/29/2011 9:33 AM, Daniel Carrera wrote:
> Does anyone know where I can get a simple (easy to read) list of
> features added / obseleted / deleted for each Fortran version from 90
> onward? I'm thinking of adding a few slides to convey that the language
> is evolving, so I'd like to have a list of changes.
....

Look at the Intel documentation; there's a summary at the beginning of it.

--
0
Reply none1568 (6642) 3/29/2011 2:42:44 PM

On 03/29/2011 04:42 PM, dpb wrote:
> On 3/29/2011 9:33 AM, Daniel Carrera wrote:
>> Does anyone know where I can get a simple (easy to read) list of
>> features added / obseleted / deleted for each Fortran version from 90
>> onward? I'm thinking of adding a few slides to convey that the language
>> is evolving, so I'd like to have a list of changes.
> ...
>
> Look at the Intel documentation; there's a summary at the beginning of it.

Where can I find that?
0
Reply daniel8127 (276) 3/29/2011 2:58:13 PM

"Daniel Carrera" <daniel@gmail.com> wrote in message 
news:imsqjn$ior$1@dont-email.me...
> Does anyone know where I can get a simple (easy to read) list of features 
> added / obseleted / deleted for each Fortran version from 90 onward? I'm 
> thinking of adding a few slides to convey that the language is evolving, 
> so I'd like to have a list of changes.
>
> Daniel.
>

You may also like to mention that it is often regarded as one of Fortran's 
strengths that old (correctly written) code will (mostly) compile/build/run 
unchanged with modern compilers. The caveats are for the really obscure 
features - like programming the lights on the mainframe operator's console 
:-)

Several times in the past few years I have had to modify C and C++ code 
after upgrading the compiler. :-(

Les 

0
Reply l.neilson8281 (36) 3/29/2011 3:19:52 PM

Hello,

I'm having trouble finding any features declared obsolete in Fortran 95, 
2003 and 2008. Did these standards add any features to the obsolete list?

Also, I'm having trouble finding features deleted from F2003 and F2008. 
Did these standards delete any old features?

Daniel.
0
Reply daniel8127 (276) 3/29/2011 3:20:11 PM

On Mar 29, 3:44=A0am, Daniel Carrera <dan...@gmail.com> wrote:
> On 03/29/2011 01:13 AM, Luka Djigas wrote:
>
> > Jonas Juselius's page has a very nice Fortran talk presentation (with
> > an emphasis on modern fortran features) - perhaps you could use some
> > of his ideas, or contact the author and ask him to use his materials
> > in your talk.
> > (on the page scroll down, look for fortran, there it should be in the
> > first few rows - the link)
>
> Can you give me the URL?

Try this one:
<http://www.jonas.iki.fi/>

Google is my friend!
;-)

agt
--
Freedom - no pane, all gaiGN!

Code Art Now
http://codeartnow.com
Email: a...@codeartnow.com
0
Reply agt (62) 3/29/2011 3:57:53 PM

On Mar 29, 5:20=A0pm, Daniel Carrera <dan...@gmail.com> wrote:
> Hello,
>
> I'm having trouble finding any features declared obsolete in Fortran 95,
> 2003 and 2008. Did these standards add any features to the obsolete list?
>
> Also, I'm having trouble finding features deleted from F2003 and F2008.
> Did these standards delete any old features?
>
> Daniel.

C Obsolescent features                                   419
C.1 Obsolescent in Fortran 95 . . . . . . . . . . . . . .419
C.1.1 Fixed source form . . . . . . . . . . . . . . . . .419
C.1.2 Computed go to . . . . . . . . . . . . . . . . . . 420
C.1.3 Character length specification character* . . . . .420
C.1.4 Data statements among executables . . . . . . . .  420
C.1.5 Statement functions . . . . . . . . . . . . . . .  421
C.1.6 Assumed character length of function results . . . 422
C.1.7 Arithmetic if statement . . . . . . . . . . . . . .422
C.1.8 Shared do-loop termination . . . . . . . . . . . . 423
C.1.9 Alternate return . . . . . . . . . . . . . . . . . 423
C.2 Feature obsolescent in Fortran 2008: Entry statement 424
C.3 Feature deleted in Fortran 2003: Carriage control . .426
C.4 Features deleted in Fortran 95 . . . . . . . . . . . 427

   Non-integer do indices
   Assigned go to and assigned formats
   Branching to an end if statement
   The pause statement A
   H edit descriptor

Regards,

Mike Metcalf
0
Reply michaelmetcalf (810) 3/29/2011 4:11:50 PM

On 03/29/2011 10:33 AM, Daniel Carrera wrote:
> Does anyone know where I can get a simple (easy to read) list of
> features added / obseleted / deleted for each Fortran version from 90
> onward? I'm thinking of adding a few slides to convey that the language
> is evolving, so I'd like to have a list of changes.
>
> Daniel.

There are some links from gfortran Wiki to some documents by John Reid 
that list new features of F2003 and F2008 that I use constantly as 
reference. The Gfortran Wiki itself should also give you some ideas of 
the new features of F2003 & F2008.

http://gcc.gnu.org/wiki/Fortran2003Status
http://gcc.gnu.org/wiki/Fortran2008Status

AC
0
Reply armeliusc (10) 3/29/2011 4:36:24 PM

http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/win/compiler_f/index.htm

-- 
Qolin

Email: my qname at domain dot com
Domain: qomputing
"Daniel Carrera" <daniel@gmail.com> wrote in message 
news:imss23$6t7$1@dont-email.me...
> On 03/29/2011 04:42 PM, dpb wrote:
>> On 3/29/2011 9:33 AM, Daniel Carrera wrote:
>>> Does anyone know where I can get a simple (easy to read) list of
>>> features added / obseleted / deleted for each Fortran version from 90
>>> onward? I'm thinking of adding a few slides to convey that the language
>>> is evolving, so I'd like to have a list of changes.
>> ...
>>
>> Look at the Intel documentation; there's a summary at the beginning of 
>> it.
>
> Where can I find that? 


0
Reply boss1 (30) 3/29/2011 5:02:59 PM

On Tue, 2011-03-29 at 16:33 +0200, Daniel Carrera wrote:
> Does anyone know where I can get a simple (easy to read) list of=20
> features added / obseleted / deleted for each Fortran version from 90=20
> onward? I'm thinking of adding a few slides to convey that the language=
=20
> is evolving, so I'd like to have a list of changes.
>=20
John Reid has two excellent (and brief) text on new features added on 95
and 2003. You may wish to check them

0
Reply bnrj.rudra (343) 3/29/2011 5:31:49 PM

Thanks. I hadn't realized that the standard was freely available. I 
thought ISO standards usually cost money.


On 03/29/2011 06:11 PM, m_b_metcalf wrote:
> On Mar 29, 5:20 pm, Daniel Carrera<dan...@gmail.com>  wrote:
>> Hello,
>>
>> I'm having trouble finding any features declared obsolete in Fortran 95,
>> 2003 and 2008. Did these standards add any features to the obsolete list?
>>
>> Also, I'm having trouble finding features deleted from F2003 and F2008.
>> Did these standards delete any old features?
>>
>> Daniel.
>
> C Obsolescent features                                   419
> C.1 Obsolescent in Fortran 95 . . . . . . . . . . . . . .419
> C.1.1 Fixed source form . . . . . . . . . . . . . . . . .419
> C.1.2 Computed go to . . . . . . . . . . . . . . . . . . 420
> C.1.3 Character length specification character* . . . . .420
> C.1.4 Data statements among executables . . . . . . . .  420
> C.1.5 Statement functions . . . . . . . . . . . . . . .  421
> C.1.6 Assumed character length of function results . . . 422
> C.1.7 Arithmetic if statement . . . . . . . . . . . . . .422
> C.1.8 Shared do-loop termination . . . . . . . . . . . . 423
> C.1.9 Alternate return . . . . . . . . . . . . . . . . . 423
> C.2 Feature obsolescent in Fortran 2008: Entry statement 424
> C.3 Feature deleted in Fortran 2003: Carriage control . .426
> C.4 Features deleted in Fortran 95 . . . . . . . . . . . 427
>
>     Non-integer do indices
>     Assigned go to and assigned formats
>     Branching to an end if statement
>     The pause statement A
>     H edit descriptor
>
> Regards,
>
> Mike Metcalf

0
Reply daniel8127 (276) 3/29/2011 6:14:46 PM

On Mar 29, 8:14=A0pm, Daniel Carrera <dan...@gmail.com> wrote:
> Thanks. I hadn't realized that the standard was freely available. I
> thought ISO standards usually cost money.
>
> On 03/29/2011 06:11 PM, m_b_metcalf wrote:
>
>
>
> > On Mar 29, 5:20 pm, Daniel Carrera<dan...@gmail.com> =A0wrote:
> >> Hello,
>
> >> I'm having trouble finding any features declared obsolete in Fortran 9=
5,
> >> 2003 and 2008. Did these standards add any features to the obsolete li=
st?
>
> >> Also, I'm having trouble finding features deleted from F2003 and F2008=
..
> >> Did these standards delete any old features?
>
> >> Daniel.
>
> > C Obsolescent features =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 419
> > C.1 Obsolescent in Fortran 95 . . . . . . . . . . . . . .419
> > C.1.1 Fixed source form . . . . . . . . . . . . . . . . .419
> > C.1.2 Computed go to . . . . . . . . . . . . . . . . . . 420
> > C.1.3 Character length specification character* . . . . .420
> > C.1.4 Data statements among executables . . . . . . . . =A0420
> > C.1.5 Statement functions . . . . . . . . . . . . . . . =A0421
> > C.1.6 Assumed character length of function results . . . 422
> > C.1.7 Arithmetic if statement . . . . . . . . . . . . . .422
> > C.1.8 Shared do-loop termination . . . . . . . . . . . . 423
> > C.1.9 Alternate return . . . . . . . . . . . . . . . . . 423
> > C.2 Feature obsolescent in Fortran 2008: Entry statement 424
> > C.3 Feature deleted in Fortran 2003: Carriage control . .426
> > C.4 Features deleted in Fortran 95 . . . . . . . . . . . 427
>
> > =A0 =A0 Non-integer do indices
> > =A0 =A0 Assigned go to and assigned formats
> > =A0 =A0 Branching to an end if statement
> > =A0 =A0 The pause statement A
> > =A0 =A0 H edit descriptor
>
> > Regards,
>
> > Mike Metcalf- Hide quoted text -
>
> - Show quoted text -

But, that wasn't the standard :-)

Regards,

Mike Metcalf
0
Reply michaelmetcalf (810) 3/29/2011 6:29:14 PM

Daniel Carrera wrote:
> Thanks. I hadn't realized that the standard was freely available. I
> thought ISO standards usually cost money.

Well, the ISO standard is not freely available - but the FDIS (final 
draft international standard), which should be good enough for all purposes.

See: http://www.nag.co.uk/sc22wg5/links.html

(Deprecated are items written in smaller font size in the standard, 
besides those larger items explicitly mentioned.)


A nice list is also at http://gcc.gnu.org/wiki/GFortranStandards
which additionally links to the Fortran I standard ;-)


Nice introductions into F2003/F2008 are - as others have mentioned:

- The New Features of Fortran 2003 by John Reid
ftp://ftp.nag.co.uk/sc22wg5/N1601-N1650/N1648.pdf
(Something similar by NAG: http://nag.com/nagware/NP/doc/nag_f2003.pdf )

- The new features of Fortran 2008 by John Reid
ftp://ftp.nag.co.uk/sc22wg5/N1801-N1850/N1828.pdf

- Coarrays in the next Fortran Standard
ftp://ftp.nag.co.uk/sc22wg5/N1801-N1850/N1824.pdf

Tobias
0
Reply burnus (564) 3/29/2011 6:29:15 PM

Daniel Carrera <daniel@gmail.com> wrote:
> Thanks. I hadn't realized that the standard was freely available. I 
> thought ISO standards usually cost money.

They do.  Many that are available are the last draft before the
final version, but usually close enough.

-- glen
0
Reply gah (12258) 3/29/2011 7:36:36 PM

On Tue, 29 Mar 2011 08:57:53 -0700 (PDT), viper-2 <agt@codeartnow.com>
wrote:

>On Mar 29, 3:44�am, Daniel Carrera <dan...@gmail.com> wrote:
>> On 03/29/2011 01:13 AM, Luka Djigas wrote:
>>
>> > Jonas Juselius's page has a very nice Fortran talk presentation (with
>> > an emphasis on modern fortran features) - perhaps you could use some
>> > of his ideas, or contact the author and ask him to use his materials
>> > in your talk.
>> > (on the page scroll down, look for fortran, there it should be in the
>> > first few rows - the link)
>>
>> Can you give me the URL?

Whoops, sorry about that :/

Luka
0
Reply i_dont_have (10) 3/29/2011 8:16:17 PM

Tobias Burnus <burnus@net-b.de> wrote:

> (Deprecated are items written in smaller font size in the standard, 
> besides those larger items explicitly mentioned.)

Unless things changed since I was last following them, there are no
officially deprecated features. There were some in early drafts of f90,
but they all got taken out (I think mostly because they were too
controversial), along with the whole concept. One might even say that
the concept of deprecation was deprecated. :-)

I think you mean "obsolescent."

As originally written in the early f90 drafts, deprecation was perhaps a
stage before obsolescence. Deprecated features were ones likely to be
considered for obsolescence in a future standard, and obsolescent
features were ones likely to be considered as future candidates for
deletion.

-- 
Richard Maine
email: last name at domain . net
domain: summer-triangle
0
Reply nospam47 (9742) 3/30/2011 2:48:55 AM

On Mar 29, 1:04=A0am, Daniel Carrera <dan...@gmail.com> wrote:
> Hello,
>
> I have to do a 15 min presentation for my Computational Astrophysics
> course. I have a lot of latitude in choosing the topic of the
> presentation, as long as it is related to computational methods.
>
> Currently I have two candidate ideas:
>
> 1) I could explain the Bulirsch Stoer algorithm with Richardson
> extrapolation, which we touched *very* briefly in class.
>
> 2) I could talk about modern Fortran, and try to convince people that it
> is actually a good language.
>
> I was wondering if anyone had any thoughts to share on a Fortran
> presentation. The audience is a group of master students whose only
> previous knowledge is tweaking an ugly, 20-year-old Fortran 77 program
> without little documentation. Thus, they all "know" that Fortran is
> defunct and archaic. Same goes for the teacher btw.
>
> Does anyone have any thoughts on this? Maybe even an idea or suggestion?
>
> Cheers,
> Daniel.

My (expected by old readers) comment is thet the "ugly, 20-year-old
Fortran 77 program"
would actually be a better introduction to Fortran programming, for
novices, since it has fewer rules and is closer to the algebraic
notation that fledgling Astrophysicists scribble on their white boards
in their offices.
(Nuclear Physicist)

P.S. Follow Dr John Harper's suggestions.
0
Reply tbwright (1098) 3/30/2011 3:09:41 AM

On 29.03.2011. 9:44, Daniel Carrera wrote:
> On 03/29/2011 01:13 AM, Luka Djigas wrote:
>> Jonas Juselius's page has a very nice Fortran talk presentation
 >
> Can you give me the URL?

Know about this one?

http://lmgtfy.com/?q=Jonas+Juselius

;)

-- 
Jugoslav
http://www.xeffort.com
0
Reply jdujic (694) 3/30/2011 6:28:27 AM

On 03/30/2011 05:09 AM, Terence wrote:
> My (expected by old readers) comment is thet the "ugly, 20-year-old
> Fortran 77 program"
> would actually be a better introduction to Fortran programming, for
> novices, since it has fewer rules and is closer to the algebraic
> notation that fledgling Astrophysicists scribble on their white boards
> in their offices.
> (Nuclear Physicist)


I disagree. Strongly. I think everyone in my class would too. F77 is 
*not* closer to the notation I've seen anyone use. It is awkward syntax 
that looks horrible and just gets in the way of understanding. 
Seriously, what is so natural about this?

         DO 100 n=1,nsteps*2

         IF(val.GE.0.1) THEN
         WRITE(ulog,130,REC=1)
         ELSE
             ...
         ENDIF

  100    CONTINUE
  130    FORMAT(' ... ')



This is not the notation I've seen anyone scribble in a white board. If 
I scribble on a white board, I'm more likely say something like:


for i = 1,10
     if (val > 0.1)
         write (ulog,...)
     else
         ...
     end
end

This pseudo-code is not too far from correct Fortran 90.

I honestly cannot imagine what it is that Astrophysicists are supposed 
to scribble on their white boards that makes F77 so easier to understand 
than modern Fortran.

Daniel.
0
Reply daniel8127 (276) 3/30/2011 10:25:38 AM

Daniel Carrera <daniel@gmail.com> wrote:

> On 03/30/2011 05:09 AM, Terence wrote:
> > My (expected by old readers) comment is thet the "ugly, 20-year-old
> > Fortran 77 program"
> > would actually be a better introduction to Fortran programming, for
> > novices, since it has fewer rules and is closer to the algebraic
> > notation that fledgling Astrophysicists scribble on their white boards
> > in their offices.
> > (Nuclear Physicist)
>  
> I disagree. Strongly. I think everyone in my class would too. F77 is 
> *not* closer to the notation I've seen anyone use. It is awkward syntax
> that looks horrible and just gets in the way of understanding. 
....
> I honestly cannot imagine what it is that Astrophysicists are supposed
> to scribble on their white boards that makes F77 so easier to understand
> than modern Fortran.

I think the main factor you overlook is that after you have been steeped
in using it for half a century, it seems easier to understand. I am
completely convinced that is the main factor. One gets to thinking of,
for example, the quirks of storage association as intuitively obvious.
I'm guessing the bit about using it for 50 years probably doesn't
describe many of your students. I also used f77 (and earlier) for over 2
decades and got pretty used to it. But then I moved on.

-- 
Richard Maine
email: last name at domain . net
domain: summer-triangle
0
Reply nospam47 (9742) 3/30/2011 4:25:56 PM

On Mar 30, 6:25=A0pm, nos...@see.signature (Richard Maine) wrote:
> I think the main factor you overlook is that after you have been steeped
> in using it for half a century, it seems easier to understand. I am
> completely convinced that is the main factor. One gets to thinking of,
> for example, the quirks of storage association as intuitively obvious.
> I'm guessing the bit about using it for 50 years probably doesn't
> describe many of your students. I also used f77 (and earlier) for over 2
> decades and got pretty used to it. But then I moved on.


Indeed. I have been using Fortran for only a few months, and my class
mates have about 4 hours of experience, all of which consists of
trying to modify a non-trivial F77 program that the teacher handed
down without any kind of tutorial on how F77 works or how the
particular program works. And when students struggle he (and the
students) say "oh Fortran is so crappy". You can imagine how I feel
about that.

It was frustrating. He first gave us a short Matlab program which he
spent some time explaining, and when students struggle, it's the
student's fault. Then he gives us a much larger F77 program, no
explanations, and when students struggle it's Fortran's fault. Can you
say "biased"?

So you can see why I feel motivated to use my 15min presentation to
talk about modern Fortran and try to correct the grave injustice that
has been done to it. :)

Daniel.
0
Reply dcarrera (192) 3/30/2011 6:02:32 PM

On Mar 30, 8:25=A0pm, Daniel Carrera <dan...@gmail.com> wrote:
> On 03/30/2011 05:09 AM, Terence wrote:
>
> > My (expected by old readers) comment is thet the "ugly, 20-year-old
> > Fortran 77 program"
> > would actually be a better introduction to Fortran programming, for
> > novices, since it has fewer rules and is closer to the algebraic
> > notation that fledgling Astrophysicists scribble on their white boards
> > in their offices.
> > (Nuclear Physicist)
>
> I disagree. Strongly. I think everyone in my class would too. F77 is
> *not* closer to the notation I've seen anyone use. It is awkward syntax
> that looks horrible and just gets in the way of understanding.
> Seriously, what is so natural about this?
>
> =A0 =A0 =A0 =A0 =A0DO 100 n=3D1,nsteps*2
>
> =A0 =A0 =A0 =A0 =A0IF(val.GE.0.1) THEN
> =A0 =A0 =A0 =A0 =A0WRITE(ulog,130,REC=3D1)
> =A0 =A0 =A0 =A0 =A0ELSE
> =A0 =A0 =A0 =A0 =A0 =A0 =A0...
> =A0 =A0 =A0 =A0 =A0ENDIF
>
> =A0 100 =A0 =A0CONTINUE
> =A0 130 =A0 =A0FORMAT(' ... ')
>
> This is not the notation I've seen anyone scribble in a white board. If
> I scribble on a white board, I'm more likely say something like:
>
> for i =3D 1,10
> =A0 =A0 =A0if (val > 0.1)
> =A0 =A0 =A0 =A0 =A0write (ulog,...)
> =A0 =A0 =A0else
> =A0 =A0 =A0 =A0 =A0...
> =A0 =A0 =A0end
> end
>
> This pseudo-code is not too far from correct Fortran 90.
>
> I honestly cannot imagine what it is that Astrophysicists are supposed
> to scribble on their white boards that makes F77 so easier to understand
> than modern Fortran.
>
> Daniel.

I protest that you were not being fair with your two examples.

F77 code is usually indented as you show in your "modern" version,
even if fixed format is used and the indentations are at poition 7 or
beyond.
..
And just as your "modern" version opts to not use a format statement,
so can F77.

And you explicitly use a random access method for unit 'ulog' in the
"F77" version, but do not mention the record number in your "modern"
version. In practice I would not be using a file format that requires
both a record number and a format statement EVER, in F77; that would
be FORMATTED DIRECT, which is highly unsuitable for efficient
programming (See past consensus on this point).

When writing records in random access mode, write out a constructed
record with no cr-lf other than those explicitly stored in the record
where desired. This ALSO allows the choice of LF, CR, CR-LF or other
signals.

This is what I might write in F77
     DO 100 I=3D1,10
       IF (val.GE.0.1) WRITE(ulog,REC=3D1)
         ELSE
           ....             ...
       ENDIF
  100 CONTINUE


And your F90/95 version (which I suspect is not correct) but with
matching uppercase for comparison:-

      FOR I =3D 1,10
        IF (val > 0.1)
          WRITE(ulog,REC=3D1)
        ELSE
         ...
        END
      END

So I have a clear indication of the scope of the DO loop in F77, but
have to count ENDs in F90/95.

0
Reply tbwright (1098) 3/30/2011 11:47:47 PM

On Mar 31, 2:25=A0am, nos...@see.signature (Richard Maine) wrote:
> Daniel Carrera <dan...@gmail.com> wrote:
> > On 03/30/2011 05:09 AM, Terence wrote:
> > > My (expected by old readers) comment is thet the "ugly, 20-year-old
> > > Fortran 77 program"
> > > would actually be a better introduction to Fortran programming, for
> > > novices, since it has fewer rules and is closer to the algebraic
> > > notation that fledgling Astrophysicists scribble on their white board=
s
> > > in their offices.
> > > (Nuclear Physicist)
>
> > I disagree. Strongly. I think everyone in my class would too. F77 is
> > *not* closer to the notation I've seen anyone use. It is awkward syntax
> > that looks horrible and just gets in the way of understanding.
> ...
> > I honestly cannot imagine what it is that Astrophysicists are supposed
> > to scribble on their white boards that makes F77 so easier to understan=
d
> > than modern Fortran.
>
> I think the main factor you overlook is that after you have been steeped
> in using it for half a century, it seems easier to understand. I am
> completely convinced that is the main factor. One gets to thinking of,
> for example, the quirks of storage association as intuitively obvious.
> I'm guessing the bit about using it for 50 years probably doesn't
> describe many of your students. I also used f77 (and earlier) for over 2
> decades and got pretty used to it. But then I moved on.
>
> --
> Richard Maine
> email: last name at domain . net
> domain: summer-triangle

Fair comment, but as readers know, I have written a conplete suite of
subroutines in F90/95, that provide a full-screen text and form
interface, and offer this source and interface freely to all
interested.
(This does NOT include graphics modes but does allow freedom of text
colour and backgrounds, and on-screen edit and delete of text). I CAN
program in F90/95, but CHOOSE not to, because programming in F77 is so
much faster and economically profitable.
0
Reply tbwright (1098) 3/30/2011 11:55:42 PM

On 03/31/2011 01:47 AM, Terence wrote:
> I protest that you were not being fair with your two examples.
>
> F77 code is usually indented as you show in your "modern" version,
> even if fixed format is used and the indentations are at poition 7 or
> beyond.

Capital letters and fixed format are part of F77. I understand that 
other things like lack of indentation and the format statement are not 
required by F77. But let's take a step back: Your comment was that you 
expected the "ugly, 20 year-old F77 program" to be a better intro to 
Fortran. The code I posted, with all the issues you pointed out, was 
copy-pasted from the ugly 20 year-old program in question. If you feel 
that what I posted is not proper F77 code, then you must agree that the 
specific program in question is not proper F77 code.


> And you explicitly use a random access method for unit 'ulog' in the
> "F77" version, but do not mention the record number in your "modern"
> version.

(1) I used "..." to imply that more instructions follow.

(2) The second version was not modern Fortran but pseudo-code. Remember 
that we were talking about what one scribbles on a white board.

I did argue that modern Fortran is closer to the pesudo-code. I can see 
that part of that is just coding style, but I still think that the free 
form syntax and "DO - END DO" loops are enough to declare Fortran 95 
closer to the pseudo-code.


> In practice I would not be using a file format that requires
> both a record number and a format statement EVER, in F77; that would
> be FORMATTED DIRECT, which is highly unsuitable for efficient
> programming (See past consensus on this point).

Thanks for explaining that. I now dislike F77 a little less. But then 
you must agree that the program they gave us is a very poor example of 
F77 because it is *FULL* of formats + record numbers.

In fact, what I posted looks better than the original, because in the 
original the format statements are a few screens down inside a 400-line 
function.


> And your F90/95 version (which I suspect is not correct) but with
> matching uppercase for comparison:-

But being able to write code WITHOUT SHOUTING is one of the features of 
F90/95. I don't think it is fair to remove it "for comparison".

What I wrote was pseudo-code. Since you were talking about scribbling on 
a white board, wrote what I would scribble on a white board. Then I 
pointed out that correct F90/95 is not too far from the scribbled 
pseudo-code.


>
>        FOR I = 1,10
>          IF (val>  0.1)
>            WRITE(ulog,REC=1)
>          ELSE
>           ...
>          END
>        END
>
> So I have a clear indication of the scope of the DO loop in F77, but
> have to count ENDs in F90/95.

No, you do not. Correct F90/95 would look like this (in upper case):

DO I = 1,10
     IF (val > 0.1)
         ....
     ELSE
         ....
     END IF
END DO


In this way, I think F90/95 is more scalable than scribbled pseudo code 
on a white board, but that's not surprising. When I scribble on a white 
board I'm just... scribbling... It is not mean to be precise or scalable.

Daniel.
0
Reply daniel8127 (276) 3/31/2011 7:09:40 AM

Daniel Carrera <daniel@gmail.com> wrote:

[Terrence wrote]
> > have to count ENDs in F90/95.
> 
> No, you do not. Correct F90/95 would look like this (in upper case):
> 
> DO I = 1,10
>      IF (val > 0.1)
>          ....
>      ELSE
>          ....
>      END IF
> END DO

That's one option, but my own code would look something more like

  whatever_loop :: do I = 1 , 10
     ...
  end do whatever_loop

where "whatever" is replaced by some short but descriptive name.

Needing to count ENDs is exactly the opposite of the f90 situation. I
explicitly tag the END DO (as Daniel notes, it has to be END DO - a
plain END is not valid), and if I get something wrong - for example, if
I failed to end some inner loop first - the compiler will nicely bitch
at me.

I also know for certain that when I'm looking at the "end do
whatever_loop" statement that it is the end of a do loop that was tagged
with whatever_loop. when I look at "100 CONTINUE" I have no such
knowledge. That could be almost anything. It might be the end of one do
loop, of multiple nested ones, or it might not have anything to do with
loops at all.

-- 
Richard Maine
email: last name at domain . net
domain: summer-triangle
0
Reply nospam47 (9742) 3/31/2011 7:32:19 AM

Daniel Carrera wrote:
> On 03/31/2011 01:47 AM, Terence wrote:
>> I protest that you were not being fair with your two examples.
>>
>> F77 code is usually indented as you show in your "modern" version,
>> even if fixed format is used and the indentations are at poition 7 or
>> beyond.
> 
> Capital letters and fixed format are part of F77. I understand that 
> other things like lack of indentation and the format statement are not 
> required by F77. But let's take a step back: Your comment was that you 
> expected the "ugly, 20 year-old F77 program" to be a better intro to 
> Fortran. The code I posted, with all the issues you pointed out, was 
> copy-pasted from the ugly 20 year-old program in question. If you feel 
> that what I posted is not proper F77 code, then you must agree that the 
> specific program in question is not proper F77 code.

Both are "correct", in that they both work.  Or at least they both fit 
within the set of extension almost-universally-available...  F77 code 
may be all capitals, but it is not required to be so.  It may be written 
without indenting, but it is not required to be so.  One can write ugly 
code in brand spanking new Fortran, and one can write clean, "pretty" 
code in F77 (I know, I do it every day).

>> And you explicitly use a random access method for unit 'ulog' in the
>> "F77" version, but do not mention the record number in your "modern"
>> version.
> 
> (1) I used "..." to imply that more instructions follow.
> 
> (2) The second version was not modern Fortran but pseudo-code. Remember 
> that we were talking about what one scribbles on a white board.
> 
> I did argue that modern Fortran is closer to the pesudo-code. I can see 
> that part of that is just coding style, but I still think that the free 
> form syntax and "DO - END DO" loops are enough to declare Fortran 95 
> closer to the pseudo-code.

END - ENDIF, DO - END DO are part of the above referenced extensions... 
  Free format is nice, but not a necessity to write clean and 
understandable code.

(snip)

> But being able to write code WITHOUT SHOUTING is one of the features of 
> F90/95. I don't think it is fair to remove it "for comparison".

Capitalizing code hardly counts as shouting, we're not talking about an 
email or a chat session here...  Capitalizing in one's code is nothing 
more or less than a style choice, and you will find endless arguments 
about that subject.  Me, I usually leave key words in uppercase, and 
lowercase the rest.  Others do differently.

> What I wrote was pseudo-code. Since you were talking about scribbling on 
> a white board, wrote what I would scribble on a white board. Then I 
> pointed out that correct F90/95 is not too far from the scribbled 
> pseudo-code.

Again with the "correct" term being used for "a style choice"...

>>
>>        FOR I = 1,10
>>          IF (val>  0.1)
>>            WRITE(ulog,REC=1)
>>          ELSE
>>           ...
>>          END
>>        END
>>
>> So I have a clear indication of the scope of the DO loop in F77, but
>> have to count ENDs in F90/95.
> 
> No, you do not. Correct F90/95 would look like this (in upper case):

And again...

> DO I = 1,10
>     IF (val > 0.1)
>         ....
>     ELSE
>         ....
>     END IF
> END DO
> 
> 
> In this way, I think F90/95 is more scalable than scribbled pseudo code 
> on a white board, but that's not surprising. When I scribble on a white 
> board I'm just... scribbling... It is not mean to be precise or scalable.
> 
> Daniel.

There are many valid differences to argue about between F77 and 
F90/95/03.  This however, is just stylistic...  I write in F77 because 
(for various reasons) my organization has chosen to keep our code that 
way.  There are things I would *love* to be able to use, but it's not 
going to happen for a long time.  For your presentation, you should 
focus on the sorts of things you can do *functionally* in modern 
Fortran, not on the relatively minor distinctions being argued here.

Just because your instructor provided a really crappy piece of code as 
your example, does not mean *all* Fortran 77 code is like that...

Jim
0
Reply RoxnDox (7) 3/31/2011 9:08:08 PM

On 03/31/2011 11:08 PM, Jim Cornwall wrote:
> Both are "correct", in that they both work. Or at least they both fit
> within the set of extension almost-universally-available... F77 code may
> be all capitals, but it is not required to be so.


In general I don't think it's fair to invoke extensions to the language 
and call it F77. To me F77 means F77. If you start adding extensions, 
then what you are writing is no longer F77. Otherwise you start down a 
slippery slope where you basically call anything you want F77.

I say that if your "F77" program requires features that are not part of 
the ANSI F77 standard, but are part of the Fortran 90, then your program 
is no longer F77, it is Fortran 90.


> One can write ugly
> code in brand spanking new Fortran, and one can write clean, "pretty"
> code in F77 (I know, I do it every day).

I'm curious. Can you show me an example of F77 code that you consider 
pretty?


>> I did argue that modern Fortran is closer to the pesudo-code. I can
>> see that part of that is just coding style, but I still think that the
>> free form syntax and "DO - END DO" loops are enough to declare Fortran
>> 95 closer to the pseudo-code.
>
> END - ENDIF, DO - END DO are part of the above referenced extensions...

Thus, they are not F77. Why not just admit it and say that they are 
Fortran 90? I don't understand how it can make sense to keep calling 
your code "F77" when you are using features that are not part of the F77 
standard but are part of the F90 standard. Why don't you say that you 
write F90 programs but choose to use the features you like? Isn't that 
what everyone does anyway?


>> What I wrote was pseudo-code. Since you were talking about scribbling
>> on a white board, wrote what I would scribble on a white board. Then I
>> pointed out that correct F90/95 is not too far from the scribbled
>> pseudo-code.
>
> Again with the "correct" term being used for "a style choice"...


No. Read again. I didn't say that upper case is incorrect F90. When I 
say correct / incorrect I am talking about what is permitted by the 
spec. I was saying that the sample pseudo-code is not very far from 
something that would be correct (i.e. valid) Fortran 90 code.



>>> So I have a clear indication of the scope of the DO loop in F77, but
>>> have to count ENDs in F90/95.
>>
>> No, you do not. Correct F90/95 would look like this (in upper case):
>
> And again...

Again... "correct" means "valid", as in, "compliant with the spec". 
Nothing more. It is not a judgement call. To take the pseudo-code I 
wrote and convert it into correct/valid/compliant Fortran 90 code the 
least work you can do is to change the "for" to a "do" and fix the two 
"end" lines.


> There are many valid differences to argue about between F77 and
> F90/95/03. This however, is just stylistic... I write in F77 because
> (for various reasons) my organization has chosen to keep our code that
> way. There are things I would *love* to be able to use, but it's not
> going to happen for a long time. For your presentation, you should focus
> on the sorts of things you can do *functionally* in modern Fortran, not
> on the relatively minor distinctions being argued here.

Rest assured that my presentation does not spend a single minute talking 
about fixed vs free form code or capitalization. I only have 15min.


> Just because your instructor provided a really crappy piece of code as
> your example, does not mean *all* Fortran 77 code is like that...

I am willing to believe that. In the strictest sense, I never said that 
general F77 code is like that program. Though you correctly inferred 
that I don't think highly of F77's fixed-form syntax.


Daniel.
0
Reply daniel8127 (276) 3/31/2011 10:21:11 PM

35 Replies
219 Views

(page loaded in 0.417 seconds)

Similiar Articles:









7/27/2012 7:16:45 PM


Reply: