Serving the Quantitative Finance Community

 
User avatar
rogers
Topic Author
Posts: 0
Joined: October 17th, 2005, 11:36 pm

Fortran

November 12th, 2005, 11:12 pm

i am thinking if it is a good idea to learn Fortran. Compared with MATLAB, is it Fortran more powerful or...?does Fortran have free-download version.
 
User avatar
Cuchulainn
Posts: 22933
Joined: July 16th, 2004, 7:38 am

Fortran

November 13th, 2005, 10:28 am

QuoteOriginally posted by: rogersi am thinking if it is a good idea to learn Fortran. Compared with MATLAB, is it Fortran more powerful or...?does Fortran have free-download version.Fortran was originally the language for scientists and engiineers (FORmula TRANslation).IMO it is the best language for PDE/FDM stuff, C++ is a (close?) second. Point is Fortran is a DOMAIN-SPECIFIC language. I have no idea if it widely used but some people use it in C wrappers.I used to use Fortran for FDM/FEM and numerical work. Worked like a dream. Of course it did not have generics or polymorhims but there were workarounds.Have a look at the Microsoft site. It has lots of languages for .NET.Maybe ask someone like DCFC is there is much interest ...
Last edited by Cuchulainn on November 12th, 2005, 11:00 pm, edited 1 time in total.
 
User avatar
lifo
Posts: 0
Joined: February 29th, 2004, 6:57 am

Fortran

November 13th, 2005, 12:28 pm

QuoteOriginally posted by: rogersdoes Fortran have free-download version.Yes--intel's Fortran compiler for windows is available for a free 30 day evaluation period. For linux, they have a free for non-comercial use version. It's very fast, much faster than the free gnu g77 that comes with most linux installations. See inte's website to download. Most CFD people I know use the linux version of intel's fortran compiler for number crunching, both on AMD and intel boxes. It has some very nice features for the number-cruncher, like being able to switch reals to 4, 8, and 16 byte [with full math library support] using a compiler flag.
 
User avatar
lballabio
Posts: 0
Joined: January 19th, 2004, 12:34 pm

Fortran

November 13th, 2005, 12:29 pm

QuoteOriginally posted by: rogersdoes Fortran have free-download version.On Linux, it is part of the gcc collection. I don't know whether it's part of mingw on Windows.But googling for "free fortran compiler" might give you some results.Luigi
 
User avatar
lballabio
Posts: 0
Joined: January 19th, 2004, 12:34 pm

Fortran

November 13th, 2005, 12:31 pm

QuoteOriginally posted by: CuchulainnFortran is a DOMAIN-SPECIFIC language. You liked this one, didn't you?
 
User avatar
Cuchulainn
Posts: 22933
Joined: July 16th, 2004, 7:38 am

Fortran

November 13th, 2005, 1:05 pm

QuoteOriginally posted by: lballabioQuoteOriginally posted by: CuchulainnFortran is a DOMAIN-SPECIFIC language. You liked this one, didn't you? I like specific domains, and then the most suitable tools for them, especially those that bridge the gap between the problem and its solution. BTW I am not getting ready to start a 'let's bring back Fortran" campaign. We can just reinvent all the FTN libraries in C++
Last edited by Cuchulainn on November 12th, 2005, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 22933
Joined: July 16th, 2004, 7:38 am

Fortran

November 13th, 2005, 1:09 pm

QuoteOriginally posted by: lifoQuoteOriginally posted by: rogersdoes Fortran have free-download version.Yes--intel's Fortran compiler for windows is available for a free 30 day evaluation period. For linux, they have a free for non-comercial use version. It's very fast, much faster than the free gnu g77 that comes with most linux installations. See inte's website to download. Most CFD people I know use the linux version of intel's fortran compiler for number crunching, both on AMD and intel boxes. It has some very nice features for the number-cruncher, like being able to switch reals to 4, 8, and 16 byte [with full math library support] using a compiler flag.lifo,LU decomposition Fortarn versus C++? Which is faster and by how much?
 
User avatar
lifo
Posts: 0
Joined: February 29th, 2004, 6:57 am

Fortran

November 13th, 2005, 1:23 pm

QuoteOriginally posted by: Cuchulainnlifo,LU decomposition Fortarn versus C++? Which is faster and by how much?Using the same compiler--(intel Fortran versus intel C++) and the same implementation--same algorithm & equivalent data types, I expect no significant difference in speed. Now if you choose to make your matrices out of vectors, maps, or strings, instead of arrays, I can imagine a possible performance difference.
 
User avatar
lifo
Posts: 0
Joined: February 29th, 2004, 6:57 am

Fortran

November 13th, 2005, 1:29 pm

To elaborate on why Fortran is used--For the most part, it is used so much in science because it is used so much in science. Professors used it, so their students use it. Existing code is in Fortran, so new code is in Fortran. It gets the job done. Also, it is much easier to learn Fortran than C++. And Fortran's style is supposed to be much more friendly towards parallelization.
 
User avatar
cordless
Posts: 0
Joined: October 13th, 2005, 5:49 pm

Fortran

November 14th, 2005, 10:38 pm

QuoteOriginally posted by: lifoAnd Fortran's style is supposed to be much more friendly towards parallelization.If you are refering to Fortran95 (or newer), then it would be an understatement!
 
User avatar
PinballWizard
Posts: 4
Joined: March 13th, 2002, 4:36 pm

Fortran

November 15th, 2005, 12:25 am

Fortran is still big in engineering as well (US & Canada). A lot of Fortran legacy apps are still in use.If you are in Finance, though, I do not see you would want to develop in Fortran!? It is a very powerful language, but would probably be a drag in terms of compatibility, flexibility and integration with other systems - unless you run your own show.
 
User avatar
acastaldo
Posts: 14
Joined: October 11th, 2002, 11:24 pm

Fortran

November 15th, 2005, 2:59 am

QuoteDoes FORTRAN have a free download versionAt least two are available:gfortranhttp://gcc.gnu.org/wiki/GFortran#downloadwhich comes bundled with the gcc compilerand g95http://g95.sourceforge.net/ which is a separate project, though also based on gcc
Last edited by acastaldo on November 14th, 2005, 11:00 pm, edited 1 time in total.
 
User avatar
crosshatch
Posts: 0
Joined: January 3rd, 2005, 10:19 pm

Fortran

November 15th, 2005, 6:38 am

I gave Fortran a whirl a month or so ago, it's a very nice language. Felt very much like matlab/octave so great syntax when you want to work with multi-dimensional arrays...I got g95 + BLAS + LAPACK working very nicely on my Mac. It's a real pleasure to, for once, have an easy calling convention to these libraries, compared to C or C++ when you have to worry about your matrices being contiguous in memory with column major order.But then I got interested in real-time graphics visualisation of a navier-stokes eq. and switched back to C++ and OpenGL. In other words, Fortran is great for pure number crunching but once you have to build something more interactive it becomes a bit annoying.
 
User avatar
cordless
Posts: 0
Joined: October 13th, 2005, 5:49 pm

Fortran

November 15th, 2005, 1:25 pm

QuoteOriginally posted by: crosshatchBut then I got interested in real-time graphics visualisation of a navier-stokes eq. and switched back to C++ and OpenGL. In other words, Fortran is great for pure number crunching but once you have to build something more interactive it becomes a bit annoying.I really got hooked on to modern Fortran for a few years, because it gave me access to OO features (not all though), which made me feel like I was writing good code but without much overhead. One main problem, as you hint to, is that when you want to do graphics and other stuff away from raw number-crunching, you can't easily build or include available tools into your code. You need to start writing large unformatted files, and importing them elsewhere. My datasizes were in the tens-of-GBs (wavefunctions suck) and I could start feeling the limitations quickly.I used to suggest to new grad students to "Learn Fortran. It is easy, and fast. As a scientist, you probabaly won't need anything more." I now suggest to them to learn C++.
 
User avatar
MattF
Posts: 6
Joined: March 14th, 2003, 7:15 pm

Fortran

November 16th, 2005, 10:08 am

Fortran was a decent effort for the 70s ... but so were Betamax, Space-Hoppers, Glam-Rock and PDP-11s.The world has moved on and wasting time learning Fortran now is somewhat pointless as you are cutting yourself off from all the subsequent software advances.