|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Fortran - Tell me what you know
#8842653 - 08/28/08 04:14 PM (15 years, 8 months ago) |
|
|
So, I need to do some work with FORTRAN. Im basically a programming noob, I smoked an entry level C++ class that was really basic and that's it.
I guess what I want is,
-Is FORTRAN similar to C++? -Do any of you know of a good compiler to use on a PC? -Know of any web sites with tutorials?
Im guessing that only a few of the peeps here know FORTRAN, but I figured Id post this anyway and see what you have to say. Thanks!
|
ivi


Registered: 01/30/03
Posts: 9,089
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8843010 - 08/28/08 05:26 PM (15 years, 8 months ago) |
|
|
I have used FORTRAN back in the day to process Perseid meteor shower observation data. I don't remember what compiler I used, and I've never worked with C++. But I could mail you a book, it's named Structured FORTRAN 77 for Engineers and Scientists by D. M. Etter, helped me a lot. I got it free from a library giveaway, so if you think you'd find it useful, drop me a PM. I don't think I'll ever need it anymore.
--------------------
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: Fortran - Tell me what you know [Re: ivi]
#8843426 - 08/28/08 06:56 PM (15 years, 8 months ago) |
|
|
Thx for the offer! I dont want to put you out though, I will fetch it from the library myself.
I have read a little so far on the net, seems that there are a few different versions from different years (77,90,95). I wonder how different these are and what the compatibility between them is. I assume Im gonna be using 95, but wont find out till after the weekend.
Im obviously gonna have to figure all this out the proper way, not from forums. I know that many of you here are programmers by trade, so thats why I posted this, for your thoughts.
(BTW, what kind of research were you doing on the meteor shower?)
|
deCypher



Registered: 02/10/08
Posts: 56,232
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8843573 - 08/28/08 07:29 PM (15 years, 8 months ago) |
|
|
N00b. It's all about COBOL if you're gonna do it old school.
-------------------- We are all in the gutter, but some of us are looking at the stars.
 
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: Fortran - Tell me what you know [Re: deCypher]
#8843616 - 08/28/08 07:35 PM (15 years, 8 months ago) |
|
|
Yea, I am a programming noob. However the group Im working with uses FORTRAN, so its not my call.
|
deCypher



Registered: 02/10/08
Posts: 56,232
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8843635 - 08/28/08 07:37 PM (15 years, 8 months ago) |
|
|
Yeah, just joking with ya. I'm just really curious as to what modern-day projects actually use FORTRAN.
-------------------- We are all in the gutter, but some of us are looking at the stars.
 
|
supra
computerEnthusiast
Registered: 10/26/03
Posts: 6,446
Loc: TEXAS
Last seen: 13 years, 1 month
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8843656 - 08/28/08 07:40 PM (15 years, 8 months ago) |
|
|
FORTRAN will be quite a bit different than C/C++, as it is a procedural language, and not object oriented like what you used. Personally I know nothing about it other than that, i have done a little bit of COBOL, and some Pascal, but never any fortran, sorry I can't help more, this is really all I know of it...lol
I'm guessing they are running some sort of mainframe, i wonder what for, it may be worth talking them into using c++ on the back end instead if they are, if their systems are good enough and they have the funds for a re-write.
peace
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: Fortran - Tell me what you know [Re: deCypher]
#8843665 - 08/28/08 07:42 PM (15 years, 8 months ago) |
|
|
Nearly all the research groups at my university use it. Its ubiquitous in physics, if not from its capabilities then simply from its inertia and history.
|
deCypher



Registered: 02/10/08
Posts: 56,232
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8843676 - 08/28/08 07:44 PM (15 years, 8 months ago) |
|
|
Interesting; what makes it powerful for physics purposes? It seems like the non-OOP capabilities of the language would inevitably doom it to being slow compared to C++ and the lik.
-------------------- We are all in the gutter, but some of us are looking at the stars.
 
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: Fortran - Tell me what you know [Re: deCypher]
#8843764 - 08/28/08 07:57 PM (15 years, 8 months ago) |
|
|
I dont know. For the third time, Im a programming noob 
Ill ask tomorrow and find out. I think its just so ingrained in science, that its much easier to keep going with it than to switch. An analogy would be - Its better to have a grid system in a city, so why not rebuild Boston in a grid system? Because its easier to just upgrade the existing system and deal with it.
Maybe there is alot of code already out there for FORTRAN that makes it better to use, thats what I meant by saying it has inertia and history.
I asked some programming friends, and they say the same things you guys do... "Why are you using FORTRAN? I dont know anything about FORTRAN. Use [programming language X] instead."
Seuss has done research and knows programming, so maybe he will chime in reasons why it is used.
|
Cepheus
Balance




Registered: 04/19/06
Posts: 8,266
Loc: the space between reality...
Last seen: 1 month, 20 days
|
Re: Fortran - Tell me what you know [Re: deCypher]
#8843765 - 08/28/08 07:57 PM (15 years, 8 months ago) |
|
|
Man, I'm forever getting into this argument with theoretical physicists / chemists.. C is vastly superior to FORTRAN.
They all accept I'm right, but they don't like change and are generally stubborn .
-------------------- "I only ever hope to reach equilibrium, in Nature's matrix, in line with the meridian" ~ Jehst
"...and I know that I have to keep breathing, as tomorrow the sun will rise, who knows what the tide will bring?" Free Spore Ring Europe Send any spare spore prints you might have and help the distribution
Open Source. Freedom. GNU/Linux Addicting is not a word.
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: Fortran - Tell me what you know [Re: Cepheus]
#8843790 - 08/28/08 08:00 PM (15 years, 8 months ago) |
|
|
Sometimes for change to happen, the old generations have to die. 
I tell you what guys when Im in charge of a group, Ill ask you what is best and take that advice.
And Cepheus, since you know about it, you can point me to a good compiler and a tutorial right?
|
deCypher



Registered: 02/10/08
Posts: 56,232
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8843821 - 08/28/08 08:05 PM (15 years, 8 months ago) |
|
|
Quote:
DieCommie said: Sometimes for change to happen, the old generations have to die. 
I tell you what guys when Im in charge of a group, Ill ask you what is best and take that advice.
Tradition is one of the hardest things to shake off. Especially if the university or whatever group is funding your project has pre-established reserved agreements for only dealing with a certain computer vendor or computer software.
-------------------- We are all in the gutter, but some of us are looking at the stars.
 
|
Cepheus
Balance




Registered: 04/19/06
Posts: 8,266
Loc: the space between reality...
Last seen: 1 month, 20 days
|
Re: Fortran - Tell me what you know [Re: deCypher]
#8844486 - 08/28/08 09:40 PM (15 years, 8 months ago) |
|
|
If you're using fortran, there is a good chance you'll be developing for and on *nix based computers.. Most researchers use linux cause its easier to program for (due to the huuuge amount of documentation).
If you do have *nix installed, then you'll almost indefinitely have gcc installed, in which case you already have a fortran compiler; g77.
http://gcc.gnu.org/onlinedocs/gcc-3.4.6/g77/Invoking-G77.html#Invoking-G77
http://www-teaching.physics.ox.ac.uk/Unix+Prog/hargrove/tutorial_77/
-------------------- "I only ever hope to reach equilibrium, in Nature's matrix, in line with the meridian" ~ Jehst
"...and I know that I have to keep breathing, as tomorrow the sun will rise, who knows what the tide will bring?" Free Spore Ring Europe Send any spare spore prints you might have and help the distribution
Open Source. Freedom. GNU/Linux Addicting is not a word.
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: Fortran - Tell me what you know [Re: Cepheus]
#8844708 - 08/28/08 10:07 PM (15 years, 8 months ago) |
|
|
I was told that I could find something to use on windows, but if there is that much more documentation in *nix, then thats what I will do.
Now, in addition to being a programming noob, in a *nix noob. Thats some kind of unix/linix thing right?
Thx for the links ( I was reading one of them earlier today ); give me one to the OS you think I should use as well, if you dont mind! Are all Unix OSes the same with respect to fortran?
EDIT - Thanks for your help everyone. I think I have got what I need to proceed. How the hell do you know all this shit? 
Edited by Qubit (08/28/08 10:21 PM)
|
Cepheus
Balance




Registered: 04/19/06
Posts: 8,266
Loc: the space between reality...
Last seen: 1 month, 20 days
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8844972 - 08/28/08 10:42 PM (15 years, 8 months ago) |
|
|
Well I think the aim of the g77 compiler is to be a free open source clone of any commercial fortran 77 compilers... and every GNU/Linux operating system comes with the gnu compiler collection, so you'll have a whole array of compilers. If you're developing for the x86 (and even if you're not) the code should be portable.
As you've never used linux before, Ubuntu will make for the easiest transition from Windows.
A GNU/Linux operating system is based around a command line interface (however it does have a GUI), so in order to get the most out of your system, it is imperative that you get a reasonable understanding of how to use it effectively:
http://www.tuxfiles.org/linuxhelp/cli.html http://www.ee.surrey.ac.uk/Teaching/Unix/
A good understanding of *nix based systems is a very useful skill when it comes to research, because there is so much code out their for reference as it is widely used amongst the research community.
And I know this stuff because... It interests me?
-------------------- "I only ever hope to reach equilibrium, in Nature's matrix, in line with the meridian" ~ Jehst
"...and I know that I have to keep breathing, as tomorrow the sun will rise, who knows what the tide will bring?" Free Spore Ring Europe Send any spare spore prints you might have and help the distribution
Open Source. Freedom. GNU/Linux Addicting is not a word.
|
funnybunny
Saboten Bomber




Registered: 01/30/06
Posts: 602
Loc: Spain
Last seen: 1 year, 11 months
|
Re: Fortran - Tell me what you know [Re: deCypher]
#8854896 - 08/31/08 01:35 AM (15 years, 8 months ago) |
|
|
Quote:
The Cypher said: Interesting; what makes it powerful for physics purposes? It seems like the non-OOP capabilities of the language would inevitably doom it to being slow compared to C++ and the lik.
A wide range of mathematical libraries that have been around for decades (so they are very optimized) that allow you to program the important work rather than the number crunching.
Libraries apart, FORTRAN is made for math. Matrix multiplication, flipping or operations with complex numbers are built-in.
You can declare 2 matrices of complex numbers and multiply them right away. 2 lines of code. Doing that in C++ gives me shivers.
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: Fortran - Tell me what you know [Re: funnybunny]
#8856592 - 08/31/08 03:29 PM (15 years, 8 months ago) |
|
|
I asked my prof about this on friday. I said some of my programming friends (which includes a few IRL) balk at the idea of using Fortran. His response was, in his usual sarcastic manner, "Thats because they are computer programmers and dont know anything about physics research". He said that fortran is way easier to use, and the 'modules' (whatever the hell those are) are somehow better...
In any case, I am now trying to to get gfortran, emacs, and cygwin somehow installed and configured correctly, and am failing horribly... I got my question in on other forums, so hopefully I can get this going by school on tue.
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8859277 - 09/01/08 07:59 AM (15 years, 8 months ago) |
|
|
Jesus this shit is confusing... I spent nearly all day yesterday trying to get this, and still cant get shit going.
EDIT- Maybe somebody here knows of a good programming forum I can post my questions in?
Edited by Qubit (09/01/08 08:04 AM)
|
funnybunny
Saboten Bomber




Registered: 01/30/06
Posts: 602
Loc: Spain
Last seen: 1 year, 11 months
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8861357 - 09/01/08 03:50 PM (15 years, 8 months ago) |
|
|
You end faster installing some linux distro.
Use VMware if afraid of slicing your hard disk.
|
|