\documentstyle[11pt,nopagenumbers]{article}

\addtolength{\oddsidemargin}{-.75in}
\addtolength{\evensidemargin}{-.75in}
\addtolength{\textwidth}{+1.5in}
\addtolength{\topmargin}{-.75in}
\addtolength{\textheight}{+1.5in}

\setlength{\parindent}{0mm}     % indented paragraphs just don't look good.

\begin{document}
\begin{tabbing}
{\bf 1.12  Computer Models of Physical and Engineering Systems}
\` {\bf Spring 1997}
\end{tabbing}
\begin{center}
{\bf Athena  Compilers\\
	Based on 1.00 Athena  Compilers}
\end{center}

\begin{flushleft}
{\bf Overview}
\end{flushleft}

An integral component of course 1.12 is the extensive use of the Athena
computing facilities. You will most likely have used one of the public Athena
clusters available on the MIT campus during the last term. To find out about the 
athena clusters, simply type {\it xcluster} at the athena prompt. A large
window will appear containing a map of the campus with each of the
clusters marked with an {\it X}. By clicking the screen cursor on
an  {\it X} or on one the buttons containing building names,
information about the type and number of workstations in a specific 
cluster will appear. You should be aware that there are several computer
architectures available on the campus. The three primary architectures
in use are: 
\begin{enumerate}
\item DEC stations
\item SUN stations
\item IBM RS6000s 
\end{enumerate}
The name of each type of machine (DEC, SUN, or IBM) is written
on the front face of the computer casing.

\vspace{.1in}
Due to differences between the machines' architectures, each must
use a compiler written specifically for it. Ideally the use of any C++
compiler should be transparent across machines. Unfortunately 
the behavior of C++ compilers still varies depending on the 
architecture and the vendor software support.
However, independent software organizations have produced compilers 
that behave similarly on different architectures.
These compilers are available in special lockers on the system. 
They can be used after {\em
add}ing the specified locker to your command path as described in detail 
later. 

\vspace{.1in}
Course 1.12 will formally support the {\it Cygnus} Version of the {\it 
GNU C++} compiler {\it g++}. On athena, this compiler is stored in a 
locker called {\it cygnus}.

\vspace{.1in}
The remainder of this handout contains details and examples of the
compile instructions that you will need to use {\it g++}. The same compile 
commands can be used regardless of the machine type.

\begin{enumerate} 
\item {\bf Adding the locker} \\ \\
The first step is to {\it add} the {\it cygnus} locker to your
machine. The {\it add} command attaches the specified locker to your
workstation and in addition, adds it to your path. To add {\it
cygnus}, just type:

\begin{center}
\begin{tabular}{|c|}  \hline
add cygnus \\ \hline
setenv hosttype \$\{hosttype\} \\ \hline
\end{tabular}
\end{center}
{\it This must be done every time you login to a workstation}.

\newpage
\item {\bf The most basic compile command} \\ \\
To compile a program, your file must have a {\it .C} extension. After
adding {\it cygnus}, you can use the following command to compile your file.

\begin{center}
\begin{tabular}{|c|}  \hline
make -f filename.mak \\ \hline
\end{tabular}
\end{center}

A sample makefile is given. Copy the makefile.mak into your directory
and modify it by typing the name of your cc-file where appropriate.
\end{enumerate}

\vspace{.2in}
{\bf Note :}  \\ \\
All students are expected to turn in C++ programs that can be compiled
on Athena Workstations (DEC5000, RS6000 or SUNSPARC Classics) using the
{\it Cygnus GNU} C++ compiler {\it g++}. You may prefer to
use personal machines (PC's, MAC's, etc.) to write and compile your code.
But before turning it in, please ensure that it compiles and runs
correctly with {\it Cygnus g++} on athena. 
Points will be taken off if your code 
does not meet this requirement (even if it works correctly 
with some other compiler). \\ \\


\end{document}






