Why do I use Fortran90, vim and Linux etc.
Often people ask me why do I use Fortran90, vim and Linux when there are so
many other alternatives about there. So this is my chance to rant and rave
back at them!
Why Fortran90 and not C/C++: There are various reasons for this one,
most of the software I have to support was originally written in F77 is a big reason.
I also believe that F77 is faster for numerical work than C/C++ and the F90 compilers
will catch up to the F77 ones soon. I don't really lack anything I need from F90 you
get with C/C++, for instance for serious graphics programming I would only really
consider OpenGL
and GLUT
and both of these have Fortran interfaces. If you can't afford OpenGL,
Mesa is a free OpenGL clone
that runs on nearly all UNIX X-windows machines and
works with GLUT. Fortran compilers
are widespread, for instance when the first Cray T3D was delivered to the U.K. the
only parallel compiler available was a Fortran one, the C compiler didn't come until
4-6 months later. Fortran90 also allows the use of dynamic memory allocation for an
example of a program using this look over here, this
program was written by me to calculate the coloumbs interaction between atoms
in a solution. Originally it was for a small system but then it grew until I
decided to look at the dynamic memory allocation. It is slightly slower now but
can handle alot more. With the release by Intel of their own C/C++/F90 compilers for
linux then there is no problem now in using F90 under Linux.
Why vim and not emacs: I manage the computers for our group and
when they arrive you most certainly do not find emacs pre-loaded, this means to
actually set the machine up the editor available is vi (not vim I know). So I use
vi, however I do realise that vi is not as user-friendly as emacs can be so after
I get the machines running I install vim which is an improved version of vi and
does everything I want of an editor. For one thing when I want to edit a file typing
vim -g file.dat I get the file opened on my desktop in an X11 window in under
1 second, I have access to all the goodies I could want like split screens etc. If I
type emacs file.dat about 8 seconds later it's ready to go - far too long for
me to wait.
Why Linux and not WinXX: This is an easy one actually, at work all our
serious workstations are some variety of UNIX (AIX, IRIX), if I use a mini-computer
it has UNIX. Even if I use a parallel machine e.g. SP2 it's UNIX. Even Cray's like the
T90 and T3E are UNIX. It therefore makes sense for me to use UNIX on the PC's aside
from the compatibilty issues look at what you get free with Linux:
- gcc - a quality C/C++ compiler + all the libs, debugger etc.
- g77 - a Fortran77 compiler (in beta-test but still very stable).
- performance f77/f95/C/C++ compiler (Intel).
- Support for parallel processing.
- Pascal and Ada front ends in beta-test.
- XFree86 - X windows with many servers for accelerated cards.
- All the networking tools.
- support for SCSI devices, sound cards, modems, CD-ROMS, RAID's etc
- 100,000's or other Linux users on the net many of whom are happy to help
answer questions/problems you have.
- bug responces in Linux or programs is often very fast.
- Megabytes of documentation all on the web dealing with practically everything
you want to know - for instance want to install a UPS? The documentation is all there,
where to find the software, what needs installing.
- It makes an ideal development system to test your codes before using
valuable time on larger machines.
- The hardware is cheap and easy to replace/fix yourself.
- With the advent of faster CPUs eg AMD's, Alpha, Sparc is can be used as
a cheap alternative to more expensive workstations.
For production code on the Linux cluster here I use the
PGI compiler suite
because its code is so much faster (but at a price!) than the GNU ones. I've also used the
Intel Performance compilers and was impressed with them as well.
If you want to know more about the various
versions of fortran for Linux then look
here as this chap
seems to know more than anyone else on the subject.
My personal machines
Well some people have asked me what after all this do I have on my desk.
Well the current machine on my desk at work is a very nice
White Box, AMD Duron 1.3 with
a fully integrated Asus A7N266-VM Nvidia main board.
Its got 768Mb of DDR ram and two disks in it running Linux software raid-1.
This box runs my stuff quite happily. We have more or less unlimited access and time on
our own Beowulf
so I do most of my number crunching on those
batch machines and the analysis/prep stuff on the White Box. There is a
plan at the moment to upgrade the cluster and to use some of the 2000+
cpus to upgrade the desktop machines, also to push the memory to 1Gb.
For more details on this and my machines at home look
here.
Last update: Tue Mar 23 22:24:04 CST 2004
Comments to: jon _at_ sinica.edu.tw
These pages were created using vim
-a very much vi-improved.
Opinions on these pages are generally not Academia Sinica's.