Instructions for Running the Codes
__________________________________
These are FORTRAN coded programs. You will need to compile each code to produce an executable so that you can...well...execute the program. To compile and execute the code you will have to be on a computer that has loaded FORTRAN and its libraries. This should be the case for the university unix network computers, for which the following specific instructions apply. Most commands and instructions will also work on Linux platforms as well. Now it is as simple as 0,1,2,3 (usually)...
0) Logon to a Sun unix workstation terminal using your BroncoNet
user ID and password. Open up a web browser (netscape, mozilla). You
can do this by clicking on the netscape navigator icon on the
applications bar at the bottom of your screen, or right click on the
background to bring up the windows applications menu, move the mouse to
"WWW Browsers" and then click on "Mozilla".
1) click on "fortran code" on the web page; save the file to your disk area; let's say its name is code.f
2) to compile the code under FORTRAN 77, simply type on your unix command line from the Terminal window (you'll need to launch a terminal window if one isn't already set up: right click on the background to bring up the windows applications menu, move the mouse to "Programs" and then click on "Terminal"), followed by a return key:
f77 -o code.exe code.f
fyi: the executable (here named code.exe) can have any name
you
like. It needn't even have the suffix .exe (or any suffix) attached to
it.
However, the file name code.f must match exactly the name of the
FORTRAN code
and it must have the .f suffix. On a linux platform, the
command is probably "g77" instead of "f77", with all else the same.
If there are any bugs in the code, the screen will flash some warning messages. However, this should not happen here. If it does, write down what it says and send me an email (kirk.korista@wmich.edu) or see me. If all goes well you should see that an executable named code.exe was produced in the same directory.
3) to run or execute the code, type :
./code.exe
and hit return. (note: you must include the explicit path ./ of the executable's present directory as shown, when executing an executable)
Once the code is executed, it will prompt you to enter in some data. Hit the carriage return (enter) key as you do so.
When the computations are completed, the program will stop, usually
printing
to the screen the name of the output file containing the computed data.
Note:
if you should see some messages printed to screen upon completion of
the
execution don't worry unless you see the words floating
overflow.
If that happens - the program has crashed; please let me know.
To see that the new data file has appeared in your directory, type:
ls (that's the letter "l" then "s", followed by the return key)
which will "list" the contents of your current directory. You
should be able to see the fortran code file, the executable you created
and any data files you've generated. A few other miscellaneous files
and folders will be present as well; just leave them alone.
If you need to execute the code more than once, it would be a good idea to rename the output data file - otherwise the data inside that file will be overwritten by the results of the next run. To do this simply type:
mv file.dat file1.dat
on the unix command line (noting spaces where they occur), where mv is the unix command for move, file.dat is the original name, and file1.dat is the new name for this file. You can choose any naming system you like.
Other useful unix commands (see also the unix on-line help), all are to be followed by a {return}:
If you have any questions about any of this or of the contents of the output files, please ask me.
Good luck and have fun!
FORTRAN 90 and 95 are the latest fancy compilers of FORTRAN code and should usually also work. So I think that
f90 -o code.exe code.f
or
f95 -o code.exe code.f
should work, should you prefer or need to use either of these
versions of
FORTRAN. The codes should run slightly faster, but otherwise all else
should go as above.