COMP 208 - 003
It is currently Friday September 19th 23:55:55
I check my e-mail everyday, so it's the best way to get in touch with me. If my office hours do not work for you, please contact me and we can arrange another time to meet.
For more information see my main page here.
12/02/2007 - Uploaded new gauss.c, was corrected in class, example on slides incomplete/incorrect.
11/27/2007 - No Office Hours Nov. 27 or 28th at Conference
11/06/2007 - Office Hours Cancelled For Today, please e-mail me with questions instead.
10/25/2007 - For installing gcc see instructions on the Comp 322 site replacing "g++" with "gcc". gcc is part of the base MinGW tool set, make is useful to install as well when those options are presented. You'll also be naming your files with a ".c" extension.
10/23/2007 - Midterm Marks Released on WebCT - If you would like to review your exam contact Prof. Friedman
10/22/2007 - Added C Links on Main Page
10/09/2007 - Oct. 9th - Class Cancelled due to Thanksgiving Holiday
10/05/2007 - Reminder - No Office Hours Monday, Office Hours on Tuesday as Normal: 11:00AM-12:30PM
10/01/2007 - Find information about g77 specifications and valid functions here
09/20/2007 - Second Assignment Posted on WebCT DUE Oct. 9th 23:30
09/16/2007 - Updated Command Prompt Here Instructions for VISTA
09/13/2007 - Added Instructions For Working With VISTA
09/11/2007 - First Assignment Posted on WebCT DUE Sept. 20th 23:55
09/11/2007 - Uploaded Alternative Windows Software Package here
09/10/2007 - Added this page for more detailed information.
09/05/2007 - Added First set of Lecture Slides in PDF format.
The Lecture is held in Otto Mass room 10 on Tuesday and Thursday from 2:30PM to 4:00PM.
My office hours this semester will be the following:
- Tue 11:00AM-12:30PM
- Wed 10:30AM-12:00PM
Lecture Slides will be available in PDF
format. There will be the full-screen
set of lecture slides and a "notes" set which will have three slides per page with a section for you
to take notes in the margin.
My Office is in McConnell Engineering Room 322 (double doored lab):
Development Environment Setup
First to clarify confusion: SciTE is only an editor not a compiler. Just running it on your machine will
allow you to write your code but nothing else. GFortran or G77 (from MinGW) are needed as well (GFortran recommended for easy setup, g77 recommended for compliance). In the default
package you need to run the executable before the SciTE directory first and ensure gfortran.exe or g77.exe are part
of your system path (explained in more detail below).
: Make sure to install "XCode" from your Mac Installation CD. You'll also need to install the cctools package before the gfortran package from the zip file on WebCT. You then should be
able to run gfortran from the terminal
: Solved! See more below.
I'll present an alternative setup for Windows
Users now. For Explicit Download Links See Installation.
- GFORTRAN - Our Fortran Compiler Download Website
- Command Window Here - Windows XP Program to allow right-clicking on a folder and opening a command window
- Syn - Alternative Windows Text Editor with FORTRAN Highlighting
These three tools will allow you to 1) compile fortran code, 2) access your command prompt window quickly, and 3) write/edit code gracefully.
Setting Your Path
- Download and Install GFortran for Windows
- Download and Install Command Window Here *XP Only On Vista see this here
- Download and Install Syn
This should be done automatically by the GFortran installation (if you go to Start->Run and type "cmd" then in the dos box type gfortran and hit enter,
you should get "no input files" response, if not your path is not set up correctly). To correctly set your path read below:
Windows has a variable called PATH
which is uses to search for programs like gfortran. This has been a common error
some are receiving when using SciTE. It is still very useful to have programs in the PATH variable instead of needing to
copy your programs to where gfortran resides as some have suggested. I will now iterate how to add to your path.
- Click Start
- Control Panel
- Dbl-Click System
- VISTA: Click Advanced System Properties on the left
- Click Advanced Tab
- Click Environmental Variables Button
- Click on PATH
- Click on Edit Button
- *Add a semi-colon ; and the path to the directory of gfortran.exe
- Click OK
- Click OK
- Click OK
*If gfortran was installed correctly from the above package, you should already see "C:\Program Files\gfortran\bin" here.
You may also need to reboot before this will take effect.
Setting Up Syn
Syn can be setup to add a "Send To" link in your right-click menu. This is recommended.
Now, you can open any f90 file in windows by right-clicking, going to send to, and selection Syn.
When a f90 file is opened in Syn it may not highlight text by default. To correct this, go to View->Syntax Schemes and
select Fortran. You can also just name your files with .for or go to View->Options and under Editor->Syntax Highlight->Fortran add
",*.f90" at the end of "Filetypes"
*Then Restart Syn
Getting Syn to Compile
*You must complete the step above, before the configuration menu will become an option
- Go to Run Menu
- Go to Run File then Configure
- Click the ... next to Profile
- Click add and type Fortran as a name for the profile
- Click OK
- Click the Add Program Button
- Type in gfortran where it now says New Program
- Program: C:\Program Files\gfortran\bin\gfortran.exe
- Arguments: -fimplicit-none -W -Wall "$[ActiveDocLong]" -o "$[ActiveDocLongNoExt].exe"
- Directory: $[ActiveDocPathShort]
You can now hit F9 to compile your program. A command line box will pop-up displaying the result.
Running Your Program
Use windows explorer to go to the directory where your program is stored. Right-click on the directory and select
"Open Command Window Here". *In Vista, You have to click the directory in the right-side pane while
holding the shift key.*
You should now have a dos prompt with your directory containing your newly
created .exe file. Type in the name of your .exe file and hit return. Voila!
Using SciTE with GFortran and/or VISTA
For those unable to compile their programs within SciTE in Vista. Understand it's not that SciTE is broken, it's that
it can't find the program to compile your fortran code.
- If you have MinGW uninstall it.
- Install GFortran for Windows
- Verify GFortran is part of your path: Start->Run and type "cmd" then in the dos box type gfortran and hit enter,
you should get "no input files" response. If you get a command not found; set your path as explained above
- Download a new SciTE property file here (Right-Click->Save As...) overwriting the "fortran.properties" file in your SciTE directory.
You should get a confirmation box for overwriting the file that exists there, click Yes.
- Restart SciTE
After that you should be all set to compile and run programs within SciTE or Syn on Windows XP or Vista using GFortran.
*If you have a French Edition of Windows VISTA:
You'll need to download G95 here
. Click "Yes" or "OK" for all the questions it asks
during installation. You'll then need to update your property file in SciTE as above with this file here
*If you get a "_spawnvp" error, reinstall gfortran
Page Last Updated: Thursday December 13th 18:56:44