This web page describes a typical CS-185 Fortran programming session. Keep in mind that there are many other ways to obtain these same results. I will briefly describe a few of them at the end of this page. You are welcome to try the alternate approaches and find out what works best for you. If you have problems while following these instructions, double check that you are following them exactly. If you are and the computer does not respond as expected, contact the CCSD help desk at 277-7288.
From on campus, start by logging onto Warp (MSOE's PC network). You do this by entering your Username and Warp Password into the Novell Netware Client Log in dialogue box. Be sure to log into the msoe_tree Tree, the Academics.msoe Context and the Warp server (these options can be found on the NDS tab on Advanced section of the log in dialogue box.
From the dorms, log into ResNet as you normally do and proceed with the instructions below. From home, dial up your internet service provider (ISP), such as ExecPC, and start an internet session as you normally would. Then follow the instructions below.
Start a Telnet session on Torres by completing the following steps. Run the Microsoft telnet application (telnet.exe usually found in the Windows folder). There may be a Telnet icon in the Novell Application Launcher (NAL) window or your desktop. If so, double click on it to run Telnet. Otherwise, click on the Start button and choose Run.... Then enter c:\windows\telnet.exe in Run dialogue box or click on the Browse... button on the Run dialogue box and browse for the Telnet application.
Once you have the Telnet program running, you'll need to set up and start a Telnet session to Torres. To do this, complete the following steps. Choose Connect | Remote System... from the Telnet menu bar. Enter torres.msoe.edu as the Host Name, Telnet as the Port and DEC-VT100 as the Term Type and then click on the Connect button. At this point, you should be presented with the Torres log in dialogue as shown in Figure 1. Enter your Username and Torres Password. Note your Username is always the same on both Warp and Torres. Your passwords my be different on the two systems. However, I suggest you keep them the same to minimize confusion. Keep in mind that changing your password on one system does not automatically change it on the other system.
|
If you enter your Username and Password correctly, you should next see a Torres login announcements screen similar to the one shown in Figure 2.
|
After the login announcements, you should be presented with a menu similar to the one shown in Figure 3.
|
You may eventually use many of the choices on this menu, but for now I'll just explain the ones that are vital to creating, compiling and running a Fortran 90 program. Note that on my desktop PC, the delete key works as expected with these menus, but the backspace key (<--) does not. It produces ^H symbols on the screen. Next, enter a 7 to go to the Programming menu shown in Figure 4.
|
Next, enter a 1 to go to the Fortran 77/Fortran 90 menu shown in Figure 5.
|
The next step in the creation of a Fortran 90 program is to use an editor to enter your source code into a file. I suggest you use the PICO editor (choose 1 in the Fortran programming menu). Notice that while the menu implies you can only create or edit Fortran source code files using the choices, you can really put any kind of text you want in the files. For example, you could use choice 1 in the Fortran programming menu to create or edit a data (.dat) file. For now, enter the sample Fortran 90 program shown in Figure 6.
|
To enter this program, enter a 1 in the Fortran programming menu to start PICO. You should next be prompted to enter the name of the file to edit, in this case enter program.f90. Since the file does not already exist, it will be created. At this point, your Telnet window should look similar to Figure 7.
|
Pico commands are shown across the bottom of the Telnet window as shown in Figure 7. The caret symbols (^) mean that you are to hold the Ctrl key down and press the indicated letter key to access the respective function.
Now enter the program substituting your name and other information into the comments at the beginning of the program. Do not allow PICO to automatically "Wrap" any lines in your file (it will if they're too long). If PICO wraps a line, break it into two or more shorter lines. Remember that all comment (non-Fortran) statements in your programs must be proceeded by an exclamation point (!).
When you are finished entering the program, save it to disk by pressing ^X, answering Yes to the "Save modified buffer?" prompt and pressing enter in response to the "File Name to write: program1.f90" prompt. If you ever want to change the name of a program file you are editing, you can enter a new name at the "File Name to write:" prompt. These steps should return you to the Fortran programming menu.
The next step is to compile the sample program. To do this, enter a 4 in the Fortran programming menu. This will start the Fortran 90 compilation dialogue. Enter program1.f90 for the source file name, -V as a compiler option (this will result in the automatic generation of a list file) and program1 for the executable file name. If there are no mistakes in your program, you should see a "Press [ENTER] to continue..." message after a few seconds.
If there is an error, for example leaving the w out of the word write in the program, an error message or messages will be display as shown in Figure 8.
|
Correct any mistakes in your program so it compiles without producing any error messages. The list file produced by the -V compiler option contains any error messages intermixed with your source code. It is sometimes useful to print or view (with PICO or option 5 (View a text file) on the Unix utilities menu) list files to find errors. You will also be required to submit a copy of the list file with all program reports.
Perform the following steps to print a list file. Choose option 6 (Unix Utilities) on the Fortran programming menu. This will cause the Unix utilities menu to be displayed in your Telnet window. Figure 9 shows the options on this menu. Note that option B - File Browser/Viewer messes up my Telnet window so use it with caution.
|
To print a file, choose option P on the Unix utilities menu. This will start the print dialogue. The first page of this dialogue allows you to select the room in which to print your file. After entering the number corresponding to your location, you will be prompted for the name of the file to print. Enter -r program1.l in response to this prompt. The -r option causes the file to be printed in landscape orientation. The file will be printed in portrait orientation if you omit it.
Finally, run (or execute) the program you have entered and compiled. To do this, return to the Fortran programming menu by entering R's on the Print location and Unix utilities menus. Enter a 5 on the Fortran programming menu to start the run program dialogue. You will be prompted for the name of the program you want to run (in this case, program1).
If you entered and compiled the program correctly, at this point you should complete a dialogue similar to the one shown in Figure 10.
|
Where you enter the values to be summed (45.3 and -87.9 in this case) and the program displays the result.
After working through this example you should know how to enter, compile and run your own Fortran 90 programs. There are alternatives to the approach described here. These alternatives include:
Send comments and suggestions about this page to:
Dr. Charles S. Tritt
This page last updated 3/11/99