Discussion:
[Beowulf] Fortran is Awesome
Paul Edmon
2018-11-28 15:01:55 UTC
Permalink
Fortran is and remains an awesome language.  More people should use it:

https://wordsandbuttons.online/fortran_is_still_a_thing.html

-Paul Edmon-

_______________________________________________
Beowulf mailing list, ***@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://w
Stu Midgley
2018-11-28 16:29:56 UTC
Permalink
I agree 100% . You can't beat bash and fortran.
Post by Paul Edmon
https://wordsandbuttons.online/fortran_is_still_a_thing.html
-Paul Edmon-
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
***@gmail.com
Peter St. John
2018-11-28 16:36:34 UTC
Permalink
Maybe I'm being too serious but in the old days, Fortran was the most
mature, maintained compiler and the libraries were great, then later, C had
better compilers but the libraries were still great. Now, I think the only
good thing about Fortran is that it's pretty easy to learn?

Peter
Post by Stu Midgley
I agree 100% . You can't beat bash and fortran.
Post by Paul Edmon
https://wordsandbuttons.online/fortran_is_still_a_thing.html
-Paul Edmon-
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
Paul Edmon
2018-11-28 16:50:38 UTC
Permalink
It's still the case the for intense numerical analysis Fortran is best
even though the gap between it and C has diminished.  Being a
computational astrophysicist by training I can speak from experience
that Fortran is superior to C for doing serious numerical work at
scale.  What Fortran does well it does very well, and it still does very
well.

Once C has native arrays and orders them properly, then we can talk :).

-Paul Edmon-
Post by Peter St. John
Maybe I'm being too serious but in the old days, Fortran was the most
mature, maintained compiler and the libraries were great, then later,
C had better compilers but the libraries were still great. Now, I
think the only good thing about Fortran is that it's pretty easy to
learn?
Peter
I agree 100% .  You can't beat bash and fortran.
Fortran is and remains an awesome language.  More people
https://wordsandbuttons.online/fortran_is_still_a_thing.html
-Paul Edmon-
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
Robert G. Brown
2018-11-28 17:17:08 UTC
Permalink
Post by Paul Edmon
Once C has native arrays and orders them properly, then we can talk :).
Yeah, like this. That's really the big difference, isn't it? Although
one can argue about just what "properly" really means... other than "in
the same order that Fortran orders them" ;-)

rgb
Post by Paul Edmon
-Paul Edmon-
Maybe I'm being too serious but in the old days, Fortran was the
most mature, maintained compiler and the libraries were great,
then later, C had better compilers but the libraries were still
great. Now, I think the only good thing about Fortran is that
it's pretty easy to learn?
Peter
I agree 100% .?You can't beat bash and fortran.
On Wed, Nov 28, 2018 at 9:02 AM Paul Edmon
Fortran is and remains an awesome language.? More
https://wordsandbuttons.online/fortran_is_still_a_thing.html
-Paul Edmon-
_______________________________________________
by Penguin Computing
To change your subscription (digest mode or
unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
Computing
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:***@phy.duke.edu


_______________________________________________
Beowulf mailing list, ***@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mai
Paul Edmon
2018-11-28 18:15:01 UTC
Permalink
Very true. I would never use Fortran for an OS.  From what I understand
compiler writers still prefer Fortran as its easier to vectorize.  Thus
if you want best vector performance from your code Fortran is it, mainly
due to the easy of writing a compiler that can do so.

In the end use the tool that's best for the job.  That's the moral of
the story.

-Paul Edmon-
Post by Paul Edmon
Once C has native arrays and orders them properly, then we can talk :).
Yeah, like this.  That's really the big difference, isn't it? Although
one can argue about just what "properly" really means... other than "in
the same order that Fortran orders them" ;-)
   rgb
Post by Paul Edmon
-Paul Edmon-
      Maybe I'm being too serious but in the old days, Fortran was the
      most mature, maintained compiler and the libraries were great,
      then later, C had better compilers but the libraries were still
      great. Now, I think the only good thing about Fortran is that
      it's pretty easy to learn?
Peter
      I agree 100% .?You can't beat bash and fortran.
On Wed, Nov 28, 2018 at 9:02 AM Paul Edmon
      Fortran is and remains an awesome language.? More
https://wordsandbuttons.online/fortran_is_still_a_thing.html
      -Paul Edmon-
      _______________________________________________
      by Penguin Computing
      To change your subscription (digest mode or
      unsubscribe) visit
      http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
_______________________________________________
Beowulf mailing list, ***@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://www.b
Nathan Moore
2018-11-29 15:09:33 UTC
Permalink
I've probably mentioned this before. If a student only has one programming
course, teaching fortran feels like malpractice, however, this book is
awesome!

Classical Fortran, Kupferschmid

https://www.crcpress.com/Classical-Fortran-Programming-for-Engineering-and-Scientific-Applications/Kupferschmid/p/book/9781138116436

Nathan
Very true. I would never use Fortran for an OS. From what I understand
compiler writers still prefer Fortran as its easier to vectorize. Thus
if you want best vector performance from your code Fortran is it, mainly
due to the easy of writing a compiler that can do so.
In the end use the tool that's best for the job. That's the moral of
the story.
-Paul Edmon-
Post by Paul Edmon
Once C has native arrays and orders them properly, then we can talk :).
Yeah, like this. That's really the big difference, isn't it? Although
one can argue about just what "properly" really means... other than "in
the same order that Fortran orders them" ;-)
rgb
Post by Paul Edmon
-Paul Edmon-
Maybe I'm being too serious but in the old days, Fortran was the
most mature, maintained compiler and the libraries were great,
then later, C had better compilers but the libraries were still
great. Now, I think the only good thing about Fortran is that
it's pretty easy to learn?
Peter
I agree 100% .?You can't beat bash and fortran.
On Wed, Nov 28, 2018 at 9:02 AM Paul Edmon
Fortran is and remains an awesome language.? More
https://wordsandbuttons.online/fortran_is_still_a_thing.html
-Paul Edmon-
_______________________________________________
by Penguin Computing
To change your subscription (digest mode or
unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
- - - - - - - - - - - - - - - - - - - - -
Nathan Moore
Mississippi River and 44th Parallel
- - - - - - - - - - - - - - - - - - - - -
Paul Edmon
2018-11-29 15:15:51 UTC
Permalink
Not necessarily.  I learned Fortran as part of my Numerical Methods for
Physicists in grad school.  We had the option of using C or Fortran. 
Fortran has proved much more useful to learn than C and I've picked up C
on the side.  In many cases programming is a matter of logical
structured thinking, if you can get that the rest is learning syntax for
different languages.

For people doing numerical methods, Fortran is way superior in terms of
usability than C.  That said I would never teach Fortran in a Computer
Science class, but in a Numerical Methods for Scientists I would go with
Fortran.

-Paul Edmon-
I've probably mentioned this before.  If a student only has one
programming course, teaching fortran feels like malpractice, however,
this book is awesome!
Classical Fortran, Kupferschmid
https://www.crcpress.com/Classical-Fortran-Programming-for-Engineering-and-Scientific-Applications/Kupferschmid/p/book/9781138116436
Nathan
Very true. I would never use Fortran for an OS.  From what I
understand
compiler writers still prefer Fortran as its easier to vectorize. 
Thus
if you want best vector performance from your code Fortran is it, mainly
due to the easy of writing a compiler that can do so.
In the end use the tool that's best for the job.  That's the moral of
the story.
-Paul Edmon-
Post by Paul Edmon
Once C has native arrays and orders them properly, then we can
talk :).
Yeah, like this.  That's really the big difference, isn't it?
Although
one can argue about just what "properly" really means... other
than "in
the same order that Fortran orders them" ;-)
   rgb
Post by Paul Edmon
-Paul Edmon-
      Maybe I'm being too serious but in the old days, Fortran
was the
Post by Paul Edmon
      most mature, maintained compiler and the libraries were
great,
Post by Paul Edmon
      then later, C had better compilers but the libraries were
still
Post by Paul Edmon
      great. Now, I think the only good thing about Fortran is that
      it's pretty easy to learn?
Peter
      I agree 100% .?You can't beat bash and fortran.
On Wed, Nov 28, 2018 at 9:02 AM Paul Edmon
      Fortran is and remains an awesome language.? More
https://wordsandbuttons.online/fortran_is_still_a_thing.html
      -Paul Edmon-
      _______________________________________________
      by Penguin Computing
      To change your subscription (digest mode or
      unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
Computing
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
- - - - - - -   - - - - - - -   - - - - - - -
Nathan Moore
Mississippi River and 44th Parallel
- - - - - - -   - - - - - - -   - - - - - - -
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
Robert G. Brown
2018-11-30 17:35:21 UTC
Permalink
Not necessarily.? I learned Fortran as part of my Numerical Methods for
Physicists in grad school.? We had the option of using C or Fortran.? Fortran
has proved much more useful to learn than C and I've picked up C on the side.?
In many cases programming is a matter of logical structured thinking, if you
can get that the rest is learning syntax for different languages.
For people doing numerical methods, Fortran is way superior in terms of
usability than C.? That said I would never teach Fortran in a Computer Science
class, but in a Numerical Methods for Scientists I would go with Fortran.
That's similar to my own experience, actually -- I learned PL/1 (gasp, I
know:-) in my first programming course, used it in my second course
(writing an assembler emulator and compiler emulator in PL/1 was
entertaining), and the only other course I took in programming of any
sort was Numerical Methods, and Learned Fortran IV (and how to do e.g.
quadrature and lots more) in that course. For a long while all of my
actual programming was in F-IV as that's what the IBM 360/370 would run
and it let me use at least some of the stuff from our textbook as well
as a couple of other big books filled with F-IV numerical code, but in
the end I wrote a ton myself. I literally filled a box with cards
writing a complicated angular momentum coupling code for nuclear
scattering experiments -- two ways, one of them a short form derived by
my employer, one of them brute force -- to verify that his derivation
was correct within a single phase error.

BUT, F-IV's I/O sucked. Really. Hollerith? The branching sucked. The
line requirements (designed for first cards, then TTY lines) sucked.
The character data handling in general sucked. Its conditionals were
comparatively primitive. I continued using it across getting into grad
school and writing my dissertation and programming my dissertation, but
somewhere in the mid-late 80's I started really using PCs big time, as
they got to where I could actually run SOME stuff on them instead of
expensive, expensive mainframes or the department's expensive, expensive
mini. I got deSmet C for myself, taught myself C, and realized that
fortran -- even F77 -- was miserable and clunky compared to
Fortran-anything, if you wanted to write ANYTHING LIKE a decent UI. A
second problem with Fortran was that the MS Fortran compiler for PC-ATs
etc in the mid-80s didn't support the 8087, and if you wanted to do
anything numerical, you had to use the 8087 and its co-processor
descendants (until a few years later they put it all on one chip). C
let you inline assembler and wrap them into subroutines for your own
library to use the co-processor in code, and that's exactly what I did.

Finally, although it took me some time, I learned to use pointers. OMG.
Pointers are complete utter magic. Assembler-level programming with
upper-level commands. I built perfect data structures without wasted
space and could still use very general purpose library routines to do
numerical stuff like matrices, angular momentum sums, ODE solutions,
quadratures, AND it was remarkably easy to build a graphical front end
inside C code and visualize the results of my computations (not so much
for fortran, not at anything our grant could afford).

At this point, while I do still have all of the fortran code I ever
wrote (or very nearly) squirrelled away, I haven't written fortran in
maybe 30 years -- somewhere in the late 80's I got my first Unix
workstation and Unix and C are basically perfect matches -- and never
looked back. ALL of my serious code since then has been in C, and yes,
you can write very effective and efficient numerical code in C while
suffering far less on I/O, character data processing, UIs, APIs,
networking, integration with hardware, portability, and more. All with
a language that is a thin veneer of upper level language sensibility on
top of raw metal, where you can usually see the assembler shining
through (which helps write reasonably optimal code, actually).

Fortran arguably retains the advantage in linear algebra-based
programming and vectorization, but my own code was not that LA intensive
and parallelization was (obviously, or why am I here) more important
than vectorization in getting my work done. I had access to vector
supercomputers (at enormous cost) and even ran my stuff on them once or
twice just to benchmark it, but I could run my stuff on literally 100+
Unix workstations all over campus in the background and get real-world
GFLOPs 24x7 (for GLFOP-Years of total effort) "for free" (for the asking
very nicely, actually) while I never beat maybe 35 or 40 MFLOPs on a
Cray Y/MP, and would have had a tiny handful of hours as EVERYBODY
wanted on the Cray Y/MP.

I will not willingly code in Fortran ever again. Hell, at my age I may
never write serious C applications ever again, but if I write ANYTHING
that requires a compiler, its going to be in C. At this point I have
literally GBytes of C code I've written, stolen, modified etc and that
doesn't include actual libraries or all the stuff in subversion.
Dieharder is written in C. I realize that if I learned Fortan all over
again today, the current versions of Fortran have absorbed most of the
goodness of C while remaining strongly typed, and perhaps if I were
learning to code now I'd be more inclined to stick with Fortran if I
learned it first. But for me, C is almost perfect freedom. I don't
need no stinkin' compiler-time protections, and if I want an object,
hey, that's why God invented unions and structs -- keep your creator and
destructor and contents access overhead.

rgb
-Paul Edmon-
I've probably mentioned this before.? If a student only has one
programming course, teaching fortran feels like malpractice,
however, this book is awesome!
Classical Fortran, Kupferschmid
https://www.crcpress.com/Classical-Fortran-Programming-for-Engineering-and-
Scientific-Applications/Kupferschmid/p/book/9781138116436
Nathan
Very true. I would never use Fortran for an OS.? From what I
understand
compiler writers still prefer Fortran as its easier to
vectorize.? Thus
if you want best vector performance from your code Fortran is it, mainly
due to the easy of writing a compiler that can do so.
In the end use the tool that's best for the job.? That's the
moral of
the story.
-Paul Edmon-
Post by Paul Edmon
Once C has native arrays and orders them properly, then
we can talk :).
Yeah, like this.? That's really the big difference, isn't
it? Although
one can argue about just what "properly" really means...
other than "in
the same order that Fortran orders them" ;-)
?? rgb
Post by Paul Edmon
-Paul Edmon-
????? Maybe I'm being too serious but in the old days, Fortran
was the
Post by Paul Edmon
????? most mature, maintained compiler and the libraries were
great,
Post by Paul Edmon
????? then later, C had better compilers but the libraries were
still
Post by Paul Edmon
????? great. Now, I think the only good thing about Fortran is
that
Post by Paul Edmon
????? it's pretty easy to learn?
Peter
On Wed, Nov 28, 2018 at 11:30 AM Stu Midgley
????? I agree 100% .?You can't beat bash and fortran.
On Wed, Nov 28, 2018 at 9:02 AM Paul Edmon
????? Fortran is and remains an awesome language.? More
https://wordsandbuttons.online/fortran_is_still_a_thing.html
Post by Paul Edmon
????? -Paul Edmon-
????? _______________________________________________
????? by Penguin Computing
????? To change your subscription (digest mode or
????? unsubscribe) visit
????? http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
Penguin
Post by Paul Edmon
Computing
To change your subscription (digest mode or
unsubscribe) visit
Post by Paul Edmon
http://www.beowulf.org/mailman/listinfo/beowulf
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567? Fax: 919-660-2525
_______________________________________________
Penguin Computing
To change your subscription (digest mode or unsubscribe)
visit http://www.beowulf.org/mailman/listinfo/beowulf
--
- - - - - - -?? - - - - - - -?? - - - - - - -
Nathan Moore
Mississippi River and 44th Parallel
- - - - - - -?? - - - - - - -?? - - - - - - -
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit http://www.be
owulf.org/mailman/listinfo/beowulf
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:***@phy.duke.edu


_______________________________________________
Beowulf mailing list, ***@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe)
Prentice Bisbal via Beowulf
2018-11-30 17:05:22 UTC
Permalink
Fortran was the second programming language I learned, behind BASIC. I
took Fortran classes in high school, and then was required to take Intro
to Fortran for Engineers class freshman year of college. As a result, I
took multi-dimensional arrays for granted. Years later, I tried created
a multi-dimensional array in C. What the hell, C?

--
Prentice
Post by Paul Edmon
It's still the case the for intense numerical analysis Fortran is best
even though the gap between it and C has diminished. Being a
computational astrophysicist by training I can speak from experience
that Fortran is superior to C for doing serious numerical work at
scale.  What Fortran does well it does very well, and it still does
very well.
Once C has native arrays and orders them properly, then we can talk :).
-Paul Edmon-
Post by Peter St. John
Maybe I'm being too serious but in the old days, Fortran was the most
mature, maintained compiler and the libraries were great, then later,
C had better compilers but the libraries were still great. Now, I
think the only good thing about Fortran is that it's pretty easy to
learn?
Peter
I agree 100% .  You can't beat bash and fortran.
On Wed, Nov 28, 2018 at 9:02 AM Paul Edmon
Fortran is and remains an awesome language.  More people
https://wordsandbuttons.online/fortran_is_still_a_thing.html
-Paul Edmon-
_______________________________________________
To change your subscription (digest mode or unsubscribe)
visit http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
Stu Midgley
2018-12-03 07:08:59 UTC
Permalink
indeed... and then Java... what were people thinking?

On Fri, Nov 30, 2018 at 5:06 PM Prentice Bisbal via Beowulf <
Post by Prentice Bisbal via Beowulf
Fortran was the second programming language I learned, behind BASIC. I
took Fortran classes in high school, and then was required to take Intro to
Fortran for Engineers class freshman year of college. As a result, I took
multi-dimensional arrays for granted. Years later, I tried created a
multi-dimensional array in C. What the hell, C?
--
Dr Stuart Midgley
***@gmail.com
Lux, Jim (337K) via Beowulf
2018-12-04 01:25:41 UTC
Permalink
My daughter took the CS101 class at her liberal arts college and it was Java.

Maybe that’s because it’s an employable skill – An enormous amount of day to day business software development is in Java.

As an Art History major, it’s not like she needs multidimensional arrays. Good, bombproof string manipulation for her Latin grammar/translator project was more useful. So Fortran and C are not big winners in that application development space. Java, Python, Basic would all have served adequately.


Jim Lux
(818)354-2075 (office)
(818)395-2714 (cell)

From: Beowulf [mailto:beowulf-***@beowulf.org] On Behalf Of Stu Midgley
Sent: Sunday, December 02, 2018 11:09 PM
To: Prentice Bisbal <***@pppl.gov>
Cc: Beowulf List <***@beowulf.org>
Subject: Re: [Beowulf] Fortran is Awesome

indeed... and then Java... what were people thinking?
On Fri, Nov 30, 2018 at 5:06 PM Prentice Bisbal via Beowulf <***@beowulf.org<mailto:***@beowulf.org>> wrote:

Fortran was the second programming language I learned, behind BASIC. I took Fortran classes in high school, and then was required to take Intro to Fortran for Engineers class freshman year of college. As a result, I took multi-dimensional arrays for granted. Years later, I tried created a multi-dimensional array in C. What the hell, C?
--
Dr Stuart Midgley
***@gmail.com<mailto:***@gmail.com>
Prentice Bisbal via Beowulf
2018-12-03 16:51:12 UTC
Permalink
One misunderstanding people have about Fortran is that they always want
to compare it to C. C is more of a 'general purpose' language that was 
originally designed for low-level programming tasks, like programming
operating systems without using assembly. On the other hand, Fortran is
a domain-specific language meant for one specific purpose: numerical
programming.

Comparing these two languages to each other is like comparing an SUV to
a Ferrari. The have completely different design goals, so have
completely different strengths and weaknesses.  Once you explain that to
someone who says "OMG! You know people who still use Fortran", they
usually get it.

Prentice
Post by Paul Edmon
It's still the case the for intense numerical analysis Fortran is best
even though the gap between it and C has diminished. Being a
computational astrophysicist by training I can speak from experience
that Fortran is superior to C for doing serious numerical work at
scale.  What Fortran does well it does very well, and it still does
very well.
Once C has native arrays and orders them properly, then we can talk :).
-Paul Edmon-
Post by Peter St. John
Maybe I'm being too serious but in the old days, Fortran was the most
mature, maintained compiler and the libraries were great, then later,
C had better compilers but the libraries were still great. Now, I
think the only good thing about Fortran is that it's pretty easy to
learn?
Peter
I agree 100% .  You can't beat bash and fortran.
On Wed, Nov 28, 2018 at 9:02 AM Paul Edmon
Fortran is and remains an awesome language.  More people
https://wordsandbuttons.online/fortran_is_still_a_thing.html
-Paul Edmon-
_______________________________________________
To change your subscription (digest mode or unsubscribe)
visit http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
Robert G. Brown
2018-11-28 17:15:05 UTC
Permalink
Post by Peter St. John
Maybe I'm being too serious but in the old days, Fortran was the most
mature, maintained compiler and the libraries were great, then later, C had
better compilers but the libraries were still great. Now, I think the only
good thing about Fortran is that it's pretty easy to learn?
Or arguably, that it is slightly better at doing certain matrix
operations because of its default packing of matrix structures (combined
with the aforementioned good libraries and perhaps slightly better
compiler optimizations possible for code written within the usual
declaratory framework). And the fact that there is a large base of
scientific code written in it.

But yeah, C can do anything Fortran can do, and then some. People do
not write operating systems in Fortran for a reason. And while the
lines have long since been blurred between the two as features of C have
been ported back to the more recent versions of Fortran, C is still the
language where you can do literally "anything" as far a data structures
go within the compiler. Want a triangular matrix? No problem, and no
wasted space. Have an ODE solver that requires a vector in a problem
that is expressed as contractions of third rank tensors? Map a vector
holding the memory to a suitably constructed and filled set of pointers
to make third rank tensor and you can evaluate your derivatives with the
tensor forms in natural langage while solving them as a vector.
Finally, when C alone isn't sufficient, you can inline assembler into C
to access things like unique hardware devices in subroutines without
waiting for somebody to give you a library or write kernel drivers for
it.

Yes, C is dangerous. You can break your code in ever so many ways if
you code with less than discipline and knowledge and great care. But
with great power comes with great responsibility -- as they say. C is
IMO still the most powerful language for general purpose programming,
and the one language you'd want to be expert in if you could only be
expert in one language. It is at least the equal of Fortran in
numerical programming, but Fortran is not at all its equal everywhere
else.

rgb (Damn, what am I doing here -- I'll get sucked into this list
again and there goes all of my time playing fallout3...)
Post by Peter St. John
Peter
I agree 100% .?You can't beat bash and fortran.
Fortran is and remains an awesome language.? More people
https://wordsandbuttons.online/fortran_is_still_a_thing.html
-Paul Edmon-
_______________________________________________
Penguin Computing
To change your subscription (digest mode or unsubscribe)
visit http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
Computing
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:***@phy.duke.edu


_______________________________________________
Beowulf mailing list, ***@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://www.beowu
Stu Midgley
2018-11-29 15:22:08 UTC
Permalink
Post by Robert G. Brown
But yeah, C can do anything Fortran can do, and then some. People do
not write operating systems in Fortran for a reason.
I've written a fortran-like scripting language (and the bones of a basic
compiler) in Fortran... everything you can do in C you can do in Fortran.

People often use the lack of pointers as a reason to NOT use Fortran, which
is rubbish. Just allocate the whole address space and go to town with your
own pointers. Which... if you really think about it is all that C does.
In theory the concept of a SIGSEG is only an OS limitation on C. You "can"
in theory just allocate any address you want without allocation and
pre-allocation.
--
Dr Stuart Midgley
***@gmail.com
Joe Landman
2018-11-29 15:37:30 UTC
Permalink
But yeah, C can do anything Fortran can do, and then some. People do
not write operating systems in Fortran for a reason.
I've written a fortran-like scripting language (and the bones of a
basic compiler) in Fortran...  everything you can do in C you can do
in Fortran.
People often use the lack of pointers as a reason to NOT use Fortran,
which is rubbish.  Just allocate the whole address space and go to
town with your own pointers. Which... if you really think about it is
all that C does. In theory the concept of a SIGSEG is only an OS
limitation on C.  You "can" in theory just allocate any address you
want without allocation and pre-allocation.
VMS comes to mind as a Fortran programmable OS.  I seem to remember
other grad students ... er ... patching things ... with negative array
indexes on Vaxen.  Though that's a while ago, and I might be suffering
from ENOTENOUGHCOFFEE.

I wrote a command like argument processor for my fortran code like
30-ish years ago (eek!) so I could at least pass arguments in "easily". 
I remember that was one of the things that caused me to look at C
originally.

I love the "lets allocate all of memory and work in this giant
heap-o-stuff" approach in Fortran.  Works great, until you have a
routine with a slightly different view of how the memory is mapped. 
Then you get C-like pointer aliasing problems.  And debugging issues. 
Yeah, one giant heap, a memory map and a debugger.  Fun times (I had
done quite a bit of that spelunking in the past).  I'd much rather leave
the days of huge global common blocks alone.

Modern fortran appears to be much better at allocation and management of
memory than C (where it is absolutely explicit). Likely it is far
smarter on layouts as well, with various NUMA and heterogeneous
processing systems.
--
Dr Stuart Midgley
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
--
Joe Landman
e: ***@gmail.com
t: @hpcjoe
w: https://scalability.org
g: https://github.com/joelandman
l: https://www.linkedin.com/in/joelandman

_______________________________________________
Beowulf mailing list, ***@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://
Peter St. John
2018-11-29 15:40:48 UTC
Permalink
Well Fortran, C, and even (I assume!) Cobol, are all Turning Complete, so
you can do anything any of those languages can do, in any other of them.
But some languages are a more facile vernacular for a problem domain. If I
wrote C to do the abstract algebra that Cayley does I'd be reinventing many
wheels. It's true that emacs would be better for some things than vi, but I
always use the latter because I know it; but it's worth learning any
scripting language to do scripting when compiling would be nuts.

Peter
Post by Stu Midgley
Post by Robert G. Brown
But yeah, C can do anything Fortran can do, and then some. People do
not write operating systems in Fortran for a reason.
I've written a fortran-like scripting language (and the bones of a basic
compiler) in Fortran... everything you can do in C you can do in Fortran.
People often use the lack of pointers as a reason to NOT use Fortran,
which is rubbish. Just allocate the whole address space and go to town
with your own pointers. Which... if you really think about it is all that
C does. In theory the concept of a SIGSEG is only an OS limitation on C.
You "can" in theory just allocate any address you want without allocation
and pre-allocation.
--
Dr Stuart Midgley
Matt Hurd
2018-11-29 15:38:20 UTC
Permalink
Fortran assumes no aliasing. C/C++ assumes possible aliasing.
Makes a world of difference when optimising. C++ can catch up with Fortran
with extensive template trickery which was first widely demonstrated with
Blitz++ which benchmarked relative to Fortran.
Post by Stu Midgley
Post by Robert G. Brown
But yeah, C can do anything Fortran can do, and then some. People do
not write operating systems in Fortran for a reason.
I've written a fortran-like scripting language (and the bones of a basic
compiler) in Fortran... everything you can do in C you can do in Fortran.
People often use the lack of pointers as a reason to NOT use Fortran,
which is rubbish. Just allocate the whole address space and go to town
with your own pointers. Which... if you really think about it is all that
C does. In theory the concept of a SIGSEG is only an OS limitation on C.
You "can" in theory just allocate any address you want without allocation
and pre-allocation.
--
Dr Stuart Midgley
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
Mikhail Kuzminsky
2018-12-02 08:28:11 UTC
Permalink
I believe that the rationality of FORTRAN using is and now very much
dependent on the application. In quantum chemistry, where I previously
programmed, as also in computational chemistry in general, Fortran
remains the main language.
Post by Robert G. Brown
Yes, C is dangerous. You can break your code in ever so many ways if
you code with less than discipline and knowledge and great care.
This may mean that in some cases write Fortran program can be easier
and therefore faster than in C.
Post by Robert G. Brown
Hell, at my age I may never write serious C applications ever again,
but if I write ANYTHING
that requires a compiler, its going to be in C.
I haven't been programming in quantum chemistry for a very long time.
But recently I wrote a tiny program for the task of computational
chemistry - and I did it in Fortran :-)

Mikhail
_______________________________________________
Beowulf mailing list, ***@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/l
John Hearns via Beowulf
2018-12-02 08:38:47 UTC
Permalink
Interesting things coded in Fortran? How about one of the first medical
Deep Learning applications.
In the 1970s.
https://link.springer.com/chapter/10.1007%2F978-3-642-93308-0_32

My father worked in the Diagnostic Methodology Research Unit in Glasgow.
I learned to code as a 12 year old by sneaking in and using their PDP 11-45
running RSX 11M.
I learned Fortran coding using the PDP.
The researchers there wrote an entire medical diagnostics program called
GLADYS in Fortran.
These days we would call it an expert system, it used Bayseian statistics.

They had a room outfitted with a terminal with simple buttons, and a one
way mirror.
They were investigating if patients would be more inclined to discuss
embarrasing conditions, and be more truthful, with a computer rather than a
human doctor.

My father also told me that clinicians from out of Scotland had to be given
Glaswegian vocabulary coaching.
"I've got the dry boak" = dry retching etc.
Post by Mikhail Kuzminsky
I believe that the rationality of FORTRAN using is and now very much
dependent on the application. In quantum chemistry, where I previously
programmed, as also in computational chemistry in general, Fortran
remains the main language.
Post by Robert G. Brown
Yes, C is dangerous. You can break your code in ever so many ways if
you code with less than discipline and knowledge and great care.
This may mean that in some cases write Fortran program can be easier
and therefore faster than in C.
Post by Robert G. Brown
Hell, at my age I may never write serious C applications ever again,
but if I write ANYTHING
that requires a compiler, its going to be in C.
I haven't been programming in quantum chemistry for a very long time.
But recently I wrote a tiny program for the task of computational
chemistry - and I did it in Fortran :-)
Mikhail
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
John Hearns via Beowulf
2018-12-02 08:44:28 UTC
Permalink
Talking about pointers and memory management, I have discussed this on here
before.
As a CERN particle physicist I got deeply into the BOS memory management
system in Fortran.
https://books.google.co.uk/books/about/The_BOS_System.html?id=yUfBPgAACAAJ&redir_esc=y

This involved doing terrible, terrible things with COMMON blocks and
meetings at midnight at beam crossing areas.
I still am haunted by the memories.. <twitch> <twitch>
Post by John Hearns via Beowulf
Interesting things coded in Fortran? How about one of the first medical
Deep Learning applications.
In the 1970s.
https://link.springer.com/chapter/10.1007%2F978-3-642-93308-0_32
My father worked in the Diagnostic Methodology Research Unit in Glasgow.
I learned to code as a 12 year old by sneaking in and using their PDP
11-45 running RSX 11M.
I learned Fortran coding using the PDP.
The researchers there wrote an entire medical diagnostics program called
GLADYS in Fortran.
These days we would call it an expert system, it used Bayseian statistics.
They had a room outfitted with a terminal with simple buttons, and a one
way mirror.
They were investigating if patients would be more inclined to discuss
embarrasing conditions, and be more truthful, with a computer rather than a
human doctor.
My father also told me that clinicians from out of Scotland had to be
given Glaswegian vocabulary coaching.
"I've got the dry boak" = dry retching etc.
Post by Mikhail Kuzminsky
I believe that the rationality of FORTRAN using is and now very much
dependent on the application. In quantum chemistry, where I previously
programmed, as also in computational chemistry in general, Fortran
remains the main language.
Post by Robert G. Brown
Yes, C is dangerous. You can break your code in ever so many ways if
you code with less than discipline and knowledge and great care.
This may mean that in some cases write Fortran program can be easier
and therefore faster than in C.
Post by Robert G. Brown
Hell, at my age I may never write serious C applications ever again,
but if I write ANYTHING
that requires a compiler, its going to be in C.
I haven't been programming in quantum chemistry for a very long time.
But recently I wrote a tiny program for the task of computational
chemistry - and I did it in Fortran :-)
Mikhail
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
Joe Landman
2018-11-28 16:37:44 UTC
Permalink
I agree 100% .  You can't beat bash and fortran.
Heh ... for me it was Perl and Fortran, circa 1992-1995.  I automated
some of my work flows.  Which was something rare back then.  Turns out
leveraging automation for a parametric scan on long running code (back
then, its fast as heck these days) is a very good thing.

One of my first projects in the late 80's early 90's was trying to use a
self-consistent field code developed in the early 60's or so.  I
literally transcribed it from the text in the library, into my editor,
and then corrected some of the glaringly antiquated bits.  Like the tape
rewind command.

I wound up developing my own code later, using more modern techniques. 
All in Fortran.

In some ways, I miss using it.

These days, I use Julia, Perl, C, and some Python for most of my stuff,
though I dabble a little in go (all the cool kids are using it).

But yeah, Fortran is awesome.
https://wordsandbuttons.online/fortran_is_still_a_thing.html
-Paul Edmon-
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
Dr Stuart Midgley
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
--
Joe Landman
e: ***@gmail.com
t: @hpcjoe
w: https://scalability.org
g: https://github.com/joelandman
l: https://www.linkedin.com/in/joelandman

_______________________________________________
Beowulf mailing list, ***@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://www.b
mark somers
2018-11-29 15:51:45 UTC
Permalink
Try this:




program test
implicit none

real, dimension(2,2,2,2,2,2,2,2,2,2,2,2,2) :: Array1

 Array1 = 0.0

 print *, "hello world", Array1

 stop

end program test
--
mark somers
tel: +31715274437
mail: ***@chem.leidenuniv.nl
web:  https://www.universiteitleiden.nl/en/staffmembers/mark-somers
_______________________________________________
Beowulf mailing list, ***@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf
Gus Correa
2018-11-29 20:04:33 UTC
Permalink
Post by mark somers
program test
implicit none
real, dimension(2,2,2,2,2,2,2,2,2,2,2,2,2) :: Array1
Hmmm ... with rank > 7?
My recollection is that 7 is the maximum (at least up to Fortran 95, maybe
2003, not sure afterwards).

But there are relatively simple workarounds using one-dimensional arrays
and index arithmetic,
to get as many dimensions as one needs.

Keeping arrays in contiguous memory is a good thing, and Fortran compilers
normally do this.

Since Fortran90, the "Matlab-like" notation for array sections, etc, the
'where' command,
allocatable arrays, etc, simplified and made array computations very
efficient (obviating nested loops, etc),
and (array) dynamic memory allocation very easy.
Modules made code organization much cleaner.
For the O-O afficcionados, operator and procedure overlays, structures,
interfaces, etc.
The features abound, most are simple to use.
I still miss a good Fortran90-to-2008 book, where the features come to life
in clean examples.
Metcalf's book is OK to learn legal syntax, but it is terse and very poor
in practical examples.

Here we do Earth Sciences: lots of Fortran code in
Atmospheric/Ocean/Climate, Seismology, Geodynamics,
etc, many codes in public domain, many being currently developed and
expanded -
code that is not going away any time soon.
I'd guess the Astrophysics, Computational Chemistry, Fluid Dynamics,
Structural Mechanics,
Electrical Engineering, etc, are in similar situation,
inheriting a huge mostly high quality Fortran code base.

Students unfortunately have been evangelized to put all their eggs in the
Python's nest,
often times narrowed to Jupyter Notebooks (with religious blind faith on
it), conda/anaconda, and so on.
Nothing agains Python; all against narrow thinking that puts fashion ahead
of content.
Students used to be fluent in Matlab (/Octave) up to a few years ago, which
enabled them to pick up Fortran more
easily. That's no longer so.

However, they would benefit a lot of a basic knowledge of Fortran, along
with
basic elements of data structures, structured programming -
sounds old? still very useful, and sorely missed -
rudiments of O-O programming, and insights of good programming style.
That all can be bundled in a Numerical Analysis/Numerical Modeling type of
course, as it was already mentioned.
Minimally this would make them able to read, understand, modify, and verify
the codes they may use for their
entire careers.
Post by mark somers
Array1 = 0.0
print *, "hello world", Array1
stop
end program test
--
mark somers
tel: +31715274437
web: https://www.universiteitleiden.nl/en/staffmembers/mark-somers
_______________________________________________
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
Continue reading on narkive:
Loading...