CSCE 206 1 CSCE 206 Scientific Applications Programming This is not a course in “programming” This is a course in “computing” We will do a lot of programming It will at times seem like a course in programming, because we will sometimes get bogged down in details…
25
Embed
CSCE 206 1 CSCE 206 Scientific Applications Programming This is not a course in “programming” This is a course in “computing” We will do a lot of programming.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CSCE 206
1
CSCE 206Scientific Applications Programming
This is not a course in “programming”
This is a course in “computing”
We will do a lot of programming
It will at times seem like a course in programming, because we will sometimes get bogged down in details…
CSCE 206
2
CSCE 206
This will at times seem like a course in programming, because we will sometimes get bogged down in details…
Try to remember• that this is a course in “computing”• that to know “computing” you must know
“programming”• that our goal is “computing” for numerical
applications
CSCE 206
3
Numerical Applications
Top 500 list www.top500.orgFinding roots of equationsInterpolation of functionsCurve fittingNumerical differentiationNumerical integrationMatrix operationsAverages, deviations, momentsDifferential equations
Various other versions have also existed (HPF, IBM FORTRAN G, H, …)
CSCE 206
6
Which Fortran?
The big change was to Fortran 90 from FORTRAN 77
We will do F90, which is the “modern” Fortran
Differences between F90, F95, and F2K are nonexistent at the level of this course
Vendors have always “enhanced” their languages as a way of making vendor switching hard
We will concentrate on ANSI Standard Fortran 90(ANSI = American National Standards Institute)
CSCE 206
7
Why Unix?
For small jobs, for simple experimentation, you should use Matlab, or something similar.
The reason for using a real programming language is to solve problems too big for desktops.
There aren’t any non-Unix machines on the Top 500 list (and I don’t think there ever have been any).
Real computing is done on Unix machines.
CSCE 206
8
Which Unix?
It is almost true that all Unix is alike.UnixLinuxSolaris (Sun Microsystems)HPIX (Hewlett-Packard)Irix (Silicon Graphics)UNICOS (Cray Research, Inc.)AIX (IBM)
CSCE 206
9
Why Unix?
“I view different computer operating systems as being like different cuisines. Using an Apple is like keeping kosher; the believers would not live any other way, but they cannot eat with members of other religions. Using Unix is like preparing your own meals from recipes in the Joy of Cooking; the effort involved initially exceeds the palatability of the results, but experience eventually brings satisfaction. Using Microsoft Windows is like eating at a McDonald’s; you can find one anywhere, and the food will keep you going, but it would be sad if there were no other restaurant in town.”
(Gerald Folland, American Math Monthly, March 2000)
CSCE 206
10
Bottom Line
We will, therefore, cover• computing• in the modern (standard) version of Fortran• on numerical applications• on a standard Unix platformThis will be computing done the way it’s done in
the major leagues (Los Alamos, NCAR, Livermore, aircraft/auto/oil industry)
This will (I hope) prepare you to be adaptable to Fortran (and other languages) on other platforms using other compilers and tools
CSCE 206
11
How-to-write-programs Issues
The operating system (in this case, Unix)The development environment• editor (you are free to choose)• we will not use a GUI (graphical user
interface)• we will use a command line interface• we will use a makefile for convenienceCompiler to translate source code to an
executableLibraries of standard routines (math functions,
etc.)
CSCE 206
12
CSE Dept: How to Write Programs
I don’t use Blackboard; I do use the CSE web server, and almost everything will be on the web
• look up the CSE secure web page https://www.cse.sc.edu
• CSCE dropbox for submitting your programs• CSCE206 group mailing list for broadcast• CSCE individual email accountswww.cse.sc.eduwww.cse.sc.edu/~buell