Home > Archive > Fortran > January 2006 > Fortran Newbie
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| chuckles 2006-01-13, 7:01 pm |
| Hullo all,
Could some one point me to a link which would give me an
introduction to fortran 77? I know there are newer standards but the
majority of links I've come across on google tend to be concerned with
updating programmers from 77 to a newer standard. I am looking for an
absolute beginners intro to fortran (not programming languages in
general) I have experience with C/C++, assembler, java etc but on first
look fortran is quite confusing. Also I would be interested to learn
why fortran SEEMS overlooked by the programming community, please don't
imagine thats a sweeping statement born from complete ignorance, I have
recently completed a degree in computer science but have never had
reason to investigate the language before now. From what I have read in
terms of texts about fortran it seems to be the language of choice for
scientific and engineering computation, but seems to stand quietly
beside the likes of C, C++????
I have searched on google for introductory college notes/websites but
most I have found seem to be dead links or very succinct introductions.
I am using g77 to begin with but have downloaded gfortran for linux to
allow me to update to fortran 90 when I feel I am proficient with the
basics of the langauge. Any and all info you could give me would be
most appreciated.
Kind Regards,
Chuckles
Also if there's an faq for this group could you please supply a link.
| |
| e p chandler 2006-01-13, 7:01 pm |
|
chuckles wrote:
> Hullo all,
> Could some one point me to a link which would give me an
> introduction to fortran 77? I know there are newer standards but the
> majority of links I've come across on google tend to be concerned with
> updating programmers from 77 to a newer standard. I am looking for an
> absolute beginners intro to fortran (not programming languages in
> general) I have experience with C/C++, assembler, java etc but on first
> look fortran is quite confusing. Also I would be interested to learn
> why fortran SEEMS overlooked by the programming community, please don't
> imagine thats a sweeping statement born from complete ignorance, I have
> recently completed a degree in computer science but have never had
> reason to investigate the language before now. From what I have read in
> terms of texts about fortran it seems to be the language of choice for
> scientific and engineering computation, but seems to stand quietly
> beside the likes of C, C++????
> I have searched on google for introductory college notes/websites but
> most I have found seem to be dead links or very succinct introductions.
> I am using g77 to begin with but have downloaded gfortran for linux to
> allow me to update to fortran 90 when I feel I am proficient with the
> basics of the langauge. Any and all info you could give me would be
> most appreciated.
>
> Kind Regards,
> Chuckles
>
> Also if there's an faq for this group could you please supply a link.
See Clive Page's "Professional Programmer's Guide to Fortran 77",
available in various formats at:
http://www.star.le.ac.uk/~cgp/fortran.html
A more general introduction can be found in
Chivers and Sleightholme - "Interactive Fortran 77 - A Hands on
Approach" available at:
http://www.kcl.ac.uk/kis/support/ci...an/f90home.html
I'm sure the regulars in this NG have much more to say about modern
Fortran.
-- Elliot
e-mail: epc8 at juno dot com
| |
| Michael Metcalf 2006-01-13, 7:01 pm |
|
"chuckles" <chuckleberryfinn@gmail.com> wrote in message
news:1137177627.898889.246450@g49g2000cwa.googlegroups.com...
> I am using g77 to begin with but have downloaded gfortran for linux to
> allow me to update to fortran 90 when I feel I am proficient with the
> basics of the langauge.
Many of us would regard this as a wrong approach. As you know other
languages, you will become rapidly frustrated learning F77 with its lack of
array language, pointers, dynamic memory, abstract data types and whatever.
Fortran 90 is not just F77 plus some other features, it provides a way to
program in a completely different way that superceds F77. Learning F77 is
useful only for someone who has to maintain/update existing codes. It is not
stage one in a two stage process.
I recommend going to g95 and learning only the 'modern' features.
Regards,
Mike Metcalf
P.S. You might find www.fortran.com/metcalf useful.
| |
| Steven G. Kargl 2006-01-13, 7:01 pm |
| In article <1137177627.898889.246450@g49g2000cwa.googlegroups.com>,
"chuckles" <chuckleberryfinn@gmail.com> writes:
> Hullo all,
> Could some one point me to a link which would give me an
> introduction to fortran 77? I know there are newer standards but the
> majority of links I've come across on google tend to be concerned with
> updating programmers from 77 to a newer standard. I am looking for an
> absolute beginners intro to fortran (not programming languages in
> general) I have experience with C/C++, assembler, java etc but on first
> look fortran is quite confusing.
Mike Metcalf was somewhat modest in his reply to you. He has co-author
several well-regarded books on Fortran 77, 90, 95, and now 2003. With
your background, you should be able to read "Fortran 90/95 Explained"
(I have the 2nd edition) in a few days and understand the basics of the
languages.
Mike's advice is also fairly sound. Skip Fortran 77 and go directly
to Fortran 95 for many of the reasons he listed.
--
Steve
http://troutmask.apl.washington.edu/~kargl/
| |
| chuckles 2006-01-13, 7:01 pm |
| Mike, steve and ep thank you very much for your advice. I will get a
copy of "Fortran 90/95 Explained". As I said I thought learning 77
first would be advantageous, thank you very much for putting me right;
I'm sure you've saved me from alot of frustration . Thanks again.
Kind Regards,
chuckles
| |
| Rich Townsend 2006-01-13, 9:57 pm |
| chuckles wrote:
> Mike, steve and ep thank you very much for your advice. I will get a
> copy of "Fortran 90/95 Explained". As I said I thought learning 77
> first would be advantageous, thank you very much for putting me right;
> I'm sure you've saved me from alot of frustration . Thanks again.
>
> Kind Regards,
> chuckles
>
One afterthought: "Fortran 90/95 Explained" is the 'old' version of the book,
superceded by "Fortran 95/2003 Explained". IMHO, I would go for the latter
(95/2003) book; the first 1/2 is almost identical to 90/95, while the second
half does a very nice job of introducing the new features in Fortran 2003 (even
though an actual F2003 compiler has yet to appear).
cheers,
Rich
| |
| Ken Plotkin 2006-01-13, 9:57 pm |
| On 13 Jan 2006 10:40:27 -0800, "chuckles" <chuckleberryfinn@gmail.com>
wrote:
[snip]
>look fortran is quite confusing. Also I would be interested to learn
>why fortran SEEMS overlooked by the programming community, please don't
>imagine thats a sweeping statement born from complete ignorance, I have
>recently completed a degree in computer science but have never had
[snip]
IMHO it's ignored because it's not particularly interesting to the
computer science community, so CS departments don't teach it. If
Fortran is taught, it's usually in the engineering departments.
There was a similar problem with math in the early 60s. "Modern math"
consiting of set theory, symbolic logic, etc., was all the rage.
Those topics were much more intersting than arithmetic to math
teachers and texbook dealers, but we wound up with a generation of
kids who were never taught arithmetic.
Ken Plotkin
| |
| chuckles 2006-01-14, 6:58 pm |
| Thanks for the info Rich, I'll check into the newer version of the
book.
>IMHO it's ignored because it's not particularly interesting to the
>computer science community, so CS departments don't teach it. If
>Fortran is taught, it's usually in the engineering departments.
Interesting that you should say that, it was actually a civil
engineering post graduate friend that first asked me about fortran as
he was using it on a regular basis as part of his PHD research. I was
more than a little surprised as the little I knew about fortran was
that it was the oldest HLL around. I incorrectly thought it first
appeared in the 60s-70s but was even more surprised to learn it was
first developed in the 1950s.
It seems to me that a language that old, still being actively used in
engineering research and not being taught to CS students (at least in
my university) is a scandal.
Thanks again gents.
Kind Regards,
Chuckles
| |
| Dr Ivan D. Reid 2006-01-14, 6:58 pm |
| On 14 Jan 2006 06:10:46 -0800, chuckles <chuckleberryfinn@gmail.com>
wrote in <1137247846.542342.325670@g43g2000cwa.googlegroups.com>:
> It seems to me that a language that old, still being actively used in
> engineering research and not being taught to CS students (at least in
> my university) is a scandal.
You're probably right <he says, trying to remain this side of
incoherent rage>. Part of the problem is that people don't realise that
FORTRAN has evolved (for one thing, it's now Fortran); they seem to get
stuck at the level they were introduced to it. Worse, they then pass this
(mis)information on. I had to interrupt a grad students' conversation in
the UCL HEP tearoom a few years ago (~2001) when one asserted, "Well,
you'd never use Fortran because it's limited to 6-character identifiers." !!!
--
Ivan Reid, Electronic & Computer Engineering, ___ CMS Collaboration,
Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".
| |
| Clive Page 2006-01-14, 6:58 pm |
| In message <dq922p$61u$1@gnus01.u.washington.edu>, Steven G. Kargl
<kargl@troutmask.apl.washington.edu> writes
>Mike Metcalf was somewhat modest in his reply to you. He has co-author
>several well-regarded books on Fortran 77, 90, 95, and now 2003. With
>your background, you should be able to read "Fortran 90/95 Explained"
>(I have the 2nd edition) in a few days and understand the basics of the
>languages.
>
>Mike's advice is also fairly sound. Skip Fortran 77 and go directly
>to Fortran 95 for many of the reasons he listed.
Despite being the author of one of the Fortran77 guides previously
referenced, I'd also like to say that you shouldn't read it any more, as
Fortran77 is so very outdated and very much harder to use than modern
Fortran.
One of the problems with those beginning to write Fortran is that many
of the available texts still cover stuff which is only present in the
language for compatibility with antique code. The subset that new
programmers need to know about is very similar to that implemented in
the F programming language - I'd suggest having a look at the resources
on this site:
http://www.fortran.com/F/resources.html
Having written programs in the F-subset, one could then use an F-subset
compiler, or one of the free full-language compilers, such as g95 or
gfortran, or one of the many commercially available.
--
Clive Page
| |
|
| chuckles wrote:
>
> Interesting that you should say that, it was actually a civil
> engineering post graduate friend that first asked me about fortran as
> he was using it on a regular basis as part of his PHD research. I was
> more than a little surprised as the little I knew about fortran was
> that it was the oldest HLL around. I incorrectly thought it first
> appeared in the 60s-70s but was even more surprised to learn it was
> first developed in the 1950s.
>
> It seems to me that a language that old, still being actively used in
> engineering research and not being taught to CS students (at least in
> my university) is a scandal.
No one warned you about the clf evangelists that were giving you advice
as scandalous as you'd expect from those trying to remake Fortran into a
Frankenstein monster. They're eager to teach you how to drive but failed
to mention you won't know how to use (read) the Interstate freeways.
http://www.netlib.org
http://gams.nist.gov
The second link is like AAA trail guide on how to get from A to B and
just about anywhere in between.
| |
| Rich Townsend 2006-01-14, 9:56 pm |
| kia wrote:
> chuckles wrote:
>
>
>
> No one warned you about the clf evangelists that were giving you advice
> as scandalous as you'd expect from those trying to remake Fortran into a
> Frankenstein monster. They're eager to teach you how to drive but failed
> to mention you won't know how to use (read) the Interstate freeways.
>
> http://www.netlib.org
> http://gams.nist.gov
>
> The second link is like AAA trail guide on how to get from A to B and
> just about anywhere in between.
>
Congratulations, chuckles, you've met one of the c.l.f trolls. This one's real
name is Mr B. Voh -- a rather bitter, petty little man, not very bright, but
ultimately harmless. Have a dig through Google groups if you want to know a
little about his agenda.
cheers,
Rich
| |
| Ken Plotkin 2006-01-14, 9:56 pm |
| On 14 Jan 2006 06:10:46 -0800, "chuckles" <chuckleberryfinn@gmail.com>
wrote:
>Interesting that you should say that, it was actually a civil
>engineering post graduate friend that first asked me about fortran as
>he was using it on a regular basis as part of his PHD research. I was
>more than a little surprised as the little I knew about fortran was
>that it was the oldest HLL around. I incorrectly thought it first
>appeared in the 60s-70s but was even more surprised to learn it was
>first developed in the 1950s.
It was one of the first higher level languages. (I have a feeling
someone is about to follow up by naming the first...and the
second...and saying how many years those preceded Fortran. :-) ) Its
purpose was to let scientists and engineers write their own programs
without having to become real programmers.
>It seems to me that a language that old, still being actively used in
>engineering research and not being taught to CS students (at least in
>my university) is a scandal.
As a working tool for non-programmers, and not based on the latest
programming theory, it's not interesting to them.
Nothing really new there, or unique to CS departments. The school I
went to had an outstanding chemistry department, leaders in polymer
chemistry. The sophomore chemistry course taught to non-chem,
non-chem engineering students sucked big time. They tended to assign
the worst instructors to it. We were not considered important to
them, and teaching us the kind of things that would be useful to
non-chemists just was not interesting to them.
It's a good thing that math and physics departments don't have that
attitude. They generally relish teaching centuries old stuff to
engineering students because it's still alive and necessary.
Ken Plotkin
| |
| Gary L. Scott 2006-01-15, 4:00 am |
| Rich Townsend wrote:
> kia wrote:
>
>
> Congratulations, chuckles, you've met one of the c.l.f trolls. This
> one's real name is Mr B. Voh -- a rather bitter, petty little man, not
> very bright, but ultimately harmless. Have a dig through Google groups
> if you want to know a little about his agenda.
>
There's an agenda? I missed it completely...
> cheers,
>
> Rich
--
Gary Scott
mailto:garyscott@ev1.net
Fortran Library: http://www.fortranlib.com
Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html
Why are there two? God only knows.
If you want to do the impossible, don't hire an expert because he knows
it can't be done.
-- Henry Ford
| |
| Mr Hrundi V Bakshi 2006-01-15, 4:00 am |
|
"Gary L. Scott" <garyscott@ev1.net> wrote in message
news:11sjic2q7nhdmcc@corp.supernews.com...
> Rich Townsend wrote:
advice[color=darkred]
a[color=darkred]
failed[color=darkred]
>
> There's an agenda? I missed it completely...
>
Off the top,
True wit is to nature advantage dressed, what oft was thought but ne'er so
well expressed.
Eminently applicable to you and Mr Andy Capp.
You can toss for whose the nitwit or witnit, -:).
| |
|
| I think that starting with the F subset might indeed be a good idea.
I also wanted to point out that 'g95 -std=F' implements F, so it is
quite easy to experiment with it.
Joost
| |
| Gary L. Scott 2006-01-15, 7:12 pm |
| Mr Hrundi V Bakshi wrote:
> "Gary L. Scott" <garyscott@ev1.net> wrote in message
> news:11sjic2q7nhdmcc@corp.supernews.com...
>
>
> advice
>
>
> a
>
>
> failed
>
>
>
> Off the top,
>
> True wit is to nature advantage dressed, what oft was thought but ne'er so
> well expressed.
>
> Eminently applicable to you and Mr Andy Capp.
>
> You can toss for whose the nitwit or witnit, -:).
>
>
Thanks again.
--
Gary Scott
mailto:garyscott@ev1.net
Fortran Library: http://www.fortranlib.com
Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html
Why are there two? God only knows.
If you want to do the impossible, don't hire an expert because he knows
it can't be done.
-- Henry Ford
| |
|
| "Gary L. Scott" wrote:
>
> There's an agenda? I missed it completely...
Me too, but whadya know, VOH is a famous "fella", that's got Townsent
all riled up & talking to ghosts.
VOH (Virtual Office Hours) is a web based bulletin board developed at
UCLA.
http://voh.chem.ucla.edu
| |
| Rich Townsend 2006-01-15, 9:58 pm |
| kia wrote:
> "Gary L. Scott" wrote:
>
>
>
> Me too, but whadya know, VOH is a famous "fella", that's got Townsent
> all riled up & talking to ghosts.
>
> VOH (Virtual Office Hours) is a web based bulletin board developed at
> UCLA.
> http://voh.chem.ucla.edu
>
A trawl through Google groups will reveal that Mr B. Voh posts (or posted) from
Earthlink, subnet 165.247.0.0/16. The headers on your message indicate that you,
too, are posting from Earthlink, with the same subnet.
Combine that with your incessant carping on about Intel's business practices,
your pathetic fetishization of CVF, and your ability to make a single
substantive post to c.l.f without making an absolute arse of yourself, and the
conclusion is inescapable: you and B. Voh are the same miserable little creep.
I suggest you go and see a shrink; whilst your crippling incompetence is alas
incurable, he may be able to fix your delusions of adequacy.
cheers,
Rich
PS You utter ignorance of NNTP headers is shared by your bumchum Hrundi
| |
| Greg Lindahl 2006-01-16, 3:57 am |
| In article <dqeuk1$so6$1@scrotar.nss.udel.edu>,
Rich Townsend <rhdt@barVOIDtol.udel.edu> wrote:
>PS You utter ignorance of NNTP headers is shared by your bumchum Hrundi
Rich,
While you're insulting people on Usenet, can you please leave out the
references to anal sex?
Thanks in advance.
-- greg
| |
| chuckles 2006-01-16, 9:57 pm |
| Oh dear I've failed again. :(
>You're probably right <he says, trying to remain this side of
>incoherent rage>.
My comments were made during an ill advised moment of self
righteousness, I apologise.
| |
| Dr Ivan D. Reid 2006-01-16, 9:57 pm |
| On 16 Jan 2006 07:44:33 -0800, chuckles <chuckleberryfinn@gmail.com>
wrote in <1137426273.751961.21470@g49g2000cwa.googlegroups.com>:
> Oh dear I've failed again. :(
[color=darkred]
> My comments were made during an ill advised moment of self
> righteousness, I apologise.
Ah, no, you mis-read my reply. I was agreeing with you...
--
Ivan Reid, Electronic & Computer Engineering, ___ CMS Collaboration,
Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".
| |
| chuckles 2006-01-16, 9:57 pm |
| I thought you may have been but then I considered the fact no one
professor ever advised me to start using linux but I did anyway. We
were taught specific languages (more modern languages granted) in our
first year and then our studies began to focus on more theoretical
topics and practical applications from second year on. I could have
learned fortran myself anytime as there were no doubt compilers present
on university machines.
| |
| Steven G. Kargl 2006-01-16, 9:57 pm |
| In article <1137451125.188354.246570@z14g2000cwz.googlegroups.com>,
"chuckles" <chuckleberryfinn@gmail.com> writes:
> I thought you may have been but then I considered the fact no one
> professor ever advised me to start using linux but I did anyway. We
> were taught specific languages (more modern languages granted) in our
> first year and then our studies began to focus on more theoretical
> topics and practical applications from second year on.
I'm guessing that the "more theoretical topics and practical applications"
did not involve serious number crunching. While it's possible to write
number crunching code in any language, Fortran's 50+ year history is
hard to beat. <Let the language war begin>
--
Steve
http://troutmask.apl.washington.edu/~kargl/
| |
| chuckles 2006-01-16, 9:57 pm |
| Not really serious number crunching, some calculus, linear algebra,
probability, dsp, crypto, software engineering theory, networking
theory, distrib computing etc. My particular stream was software
engineering so there was never a particular assignment which stressed
fortran code or a particular problem which screamed out for an
alternative to C/C++, matlab, mathematica etc which is what I spent
most of my time programming in/ using. I'd be interested to hear of a
sample application (bring on the number crunching, contrived or
otherwise) which is more suited to fortran as opposed to an other hll.
As I said earlier I'm learning fortran because I think its pathetic I
didn't learn it while I was an undergrad, I didn't have a sample
application in mind.
| |
| chuckles 2006-01-16, 9:57 pm |
| Just looked at your homepage Doc. Karl, the closest I ever got to
physics in college was first year electronics and final year project on
dsp. Very basic stuff I wrote my own filters in octave with gnuplot and
translated to C++, also had a brief section on sound waves in write up
but nothing a high school physics student wouldn't already know (i
imagine).
| |
| Steven G. Kargl 2006-01-16, 9:57 pm |
| In article <1137452831.656437.320800@o13g2000cwo.googlegroups.com>,
"chuckles" <chuckleberryfinn@gmail.com> writes:
> I'd be interested to hear of a sample application (bring on the
> number crunching, contrived or otherwise) which is more suited to
> fortran as opposed to an other hll.
From personal experience, I have a colleague who wrote a matlab
code to solve subcritical penetration of an acoustic field
through a rough surface. This involves solving a 2D surface integral.
His objective was to get an answer from the few runs that he needed
to do. His matlab code did the job. I was asked to join the group
and do Monte Carlo simulation at higher frequencies and for larger
surfaces. The matlab code has few problems. First, matlab has/had
a 2 GB memory limit, which I quickly surpasses. Second, the matlab
code could take several hours to run for a single simulated signal.
When you need thousands of signals, you need speed. I rewrote the
matlab code in Fortran, which reduced runtimes to the 5 to 15 minute
range where the surface is 40x40 m**2 with a 7 mm sample length.
I probably could have rewritten the matlab in C, but Fortran 95's
array syntax is awfully nice.
--
Steve
http://troutmask.apl.washington.edu/~kargl/
|
|
|
|
|