|
delta9
Active Ingredient


Registered: 10/28/04
Posts: 5,390
Loc: California
Last seen: 13 years, 6 months
|
Re: Fortran - Tell me what you know [Re: deCypher]
#8873994 - 09/03/08 09:16 PM (15 years, 8 months ago) |
|
|
Quote:
DieCommie said: 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.
This has something to do with its ubiquity; however:
Quote:
The Cypher said: Interesting; what makes it powerful for physics purposes?
The fact that it is ForTran - Formula Translation. Last I recall Physics has a lot to do with formulae.
Quote:
It seems like the non-OOP capabilities of the language would inevitably doom it to being slow compared to C++ and the lik.
OOP is not fast. Vtable resolution takes a finite amount of time and always will. Besides, OOP is a noun-based nomenclature. Are nouns the best way to describe physics? If you think about it, this means (as is often the case with OOP) you must give each object too much knowledge of the rules, and therefore, having a "ball" object in a physics simulation that was completely OOP based would require you to give the ball knowledge about gravity, friction, and such within its methods. Clearly, it might be better (and faster, both in development and run time) to simply give a ball object a mass and a vector for direction and accelleration then use a more functional/declarative approach to process the ball's actions via functions that represent gravity, friction, etc and operate strictly on those base values. Now you have a physics simulation that can easily (with very few changes) simulate other objects (like boxes) or environments (like the moon). BUT I DIGRESS...
Quote:
DieCommie said: 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.
Stick with what you are comfortable with. Check out FTN95 free for personal use or try some from this resource page. If you persist in adding *n?x to the things you must now learn then...
Quote:
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?
Now you have two problems! Learning *n?x and learning fortran. Thankfully, learning *n?x is not that terribly complicated; however, if you do get Ubuntu or another debian-derived operating system keep in mind you may need to install (apt-get) the package "build-essential".
Quote:
DieCommie said: Jesus this shit is confusing... I spent nearly all day yesterday trying to get this, and still cant get shit going.
Well, you've now added cygwin and emacs to your list of problems - what do you expect? While I dearly love emacs and use it everyday, there is certainly a bit of a learning curve involved in becoming proficient with it.
This is a decent programming forum in that there are many good programmers here.
Some tutorials you may have already perused: Stanfard Fortran 77 Tutorial, University of New Mexico Fortran 90 Tutorial
Keep at it, you'll figure it out! Fortran is, thankfully, not a terribly complicated language (it's certainly no C++, which is possibly the most complicated).
-------------------- delta9
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 3 months, 8 days
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8874321 - 09/03/08 10:16 PM (15 years, 8 months ago) |
|
|
> "Thats because they are computer programmers and dont know anything about physics research".
Translation: Old school physicists haven't progressed from the 1960's.
Fortran is still used quite a lot, but mainly by people that are stuck in the past. If you have to use it, then you have to use it, but if I had a choice, I would avoid it in favor of something a little less ancient. Yeah, an old fashioned screw driver will work, but why use it when you have a power driver?
> You can declare 2 matrices of complex numbers and multiply them right away. 2 lines of code. Doing that in C++ gives me shivers.
To each his own. I did a lot of work implementing a C++ MOA for massively parallel computing systems that will blow the doors off of anything written in fortran. It may not be native to the language, but with c++ templates, it might as well be. However, as you point out, using the available tool for the job is often the best way to go. With legacy code, or with legacy physics professors, it is probably best to go with the flow.
-------------------- Just another spore in the wind.
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: Fortran - Tell me what you know [Re: Seuss]
#8877121 - 09/04/08 01:32 PM (15 years, 8 months ago) |
|
|
Quote:
Yeah, an old fashioned screw driver will work, but why use it when you have a power driver?
I usually use my regular screwdriver, for quick easy projects I guess that confirms what I have been hearing, that fortran is fine for quick easy programming project.
Anyway, I am getting more and more confused every day trying to get fortran to work. I may have to give up and shift my focus because I am spending more time trying to set up a fortran compiler than I am on my classes and research.
Every body suggests different things and gives me different links, but what I really need is an explanation of how all the pieces I need fit together. Right now, I am trying this -->http://approximatrix.com/articles/setting-up-gnu-gfortran-on-windows-xp But I am stuck on step 4 where I have to 'compile the compiler' (whatever that means). I get a error after compiling for an hour or so....
Ahhh Im so frustrated, this shit is harder than solving the Dirac equation!
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 3 months, 8 days
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8877297 - 09/04/08 02:10 PM (15 years, 8 months ago) |
|
|
It is hard because you are trying to shoehorn a unix application into a windows environment, for which it was never meant.
I would honestly recommend installing linux. The learning curve isn't that bad anymore (with the easier to use distributions) and the fortran compiler will work "out of the box" so to speak. Trust me, you will save a lot of hair pulling. Besides, your legacy physics professor should know that anybody doing actual academic research uses unix rather than windows.
http://ubuntuforums.org/showthread.php?t=89571
(The link above talks about installing the Intel Fortan compiler on Linux, but there is a windows version as well. That might be what you are looking for... no idea.)
-------------------- Just another spore in the wind.
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: Fortran - Tell me what you know [Re: Seuss]
#8877744 - 09/04/08 03:52 PM (15 years, 8 months ago) |
|
|
Yea, I think I will try linux. I have been wanting to try it for a long time. Over the summer I installed Ubuntu, but I couldn't get the video driver going so I uninstalled it. This weekend I will install it again, and give it a try.
|
automan
blasted chipmunk


Registered: 09/18/03
Posts: 8,272
|
Re: Fortran - Tell me what you know [Re: DieCommie]
#8878178 - 09/04/08 05:20 PM (15 years, 8 months ago) |
|
|
install sabayon. it will come with all codecs and is meant to build source in (which is what you want to do). it is based on gentoo.
-------------------- No, no, you're not thinking, you're just being logical. ~ Niels Bohr
|
|