%-----------------------------------------------------------------------
%;  Copyright (C) 1995-1997
%;  Associated Universities, Inc. Washington DC, USA.
%;
%;  This program is free software; you can redistribute it and/or
%;  modify it under the terms of the GNU General Public License as
%;  published by the Free Software Foundation; either version 2 of
%;  the License, or (at your option) any later version.
%;
%;  This program is distributed in the hope that it will be useful,
%;  but WITHOUT ANY WARRANTY; without even the implied warranty of
%;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%;  GNU General Public License for more details.
%;
%;  You should have received a copy of the GNU General Public
%;  License along with this program; if not, write to the Free
%;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
%;  MA 02139, USA.
%;
%;  Correspondence concerning AIPS should be addressed as follows:
%;         Internet email: aipsmail@nrao.edu.
%;         Postal address: AIPS Project Office
%;                         National Radio Astronomy Observatory
%;                         520 Edgemont Road
%;                         Charlottesville, VA 22903-2475 USA
%-----------------------------------------------------------------------
\documentstyle [twoside]{article}
%
\newcommand{\AIPS}{{$\cal AIPS\/$}}
\newcommand{\POPS}{{$\cal POPS\/$}}
\newcommand{\AMark}{AIPSMark$^{(93)}$}
\newcommand{\AMarks}{AIPSMarks$^{(93)}$}
\newcommand{\LMark}{AIPSLoopMark$^{(93)}$}
\newcommand{\LMarks}{AIPSLoopMarks$^{(93)}$}
\newcommand{\AM}{A_m^{(93)}}
\newcommand{\ALM}{AL_m^{(93)}}
\newcommand{\eg}{{\it e.g.},}
\newcommand{\ie}{{\it i.e.},}
\newcommand{\daemon}{d\ae mon}
\newcommand{\boxit}[3]{\vbox{\hrule height#1\hbox{\vrule width#1\kern#2%
\vbox{\kern#2{#3}\kern#2}\kern#2\vrule width#1}\hrule height#1}}
%
\newcommand{\memnum}{96}
\newcommand{\whatmem}{\AIPS\ Memo \memnum}
%\newcommand{\whatmem}{{\bf D R A F T}}
\newcommand{\memtit}{AIPS on an ALPHA AXP Clone}
\title{
%   \hphantom{Hello World} \\
   \vskip -35pt
%   \fbox{AIPS Memo \memnum} \\
   \fbox{{\large\whatmem}} \\
   \vskip 28pt
   \memtit \\}
\author{ Robert~L.~Millner, Patrick~P.~Murphy, and Jeffrey~A.~Uphoff\\
National Radio Astronomy Observatory\\Charlottesville, Virginia, USA}

%
\parskip 4mm
\linewidth 6.5in                     % was 6.5
\textwidth 6.5in                     % text width excluding margin 6.5
\textheight 8.91 in                  % was 8.81
\marginparsep 0in
\oddsidemargin .25in                 % EWG from -.25
\evensidemargin -.25in
\topmargin -.5in
\headsep 0.25in
\headheight 0.25in
\parindent 0in
\newcommand{\normalstyle}{\baselineskip 4mm \parskip 2mm \normalsize}
\newcommand{\tablestyle}{\baselineskip 2mm \parskip 1mm \small }
%
%
\begin{document}

\pagestyle{myheadings}
\thispagestyle{empty}

\newcommand{\Rheading}{\whatmem \hfill \memtit \hfill Page~~}
\newcommand{\Lheading}{~~Page \hfill \memtit \hfill \whatmem}
\markboth{\Lheading}{\Rheading}
%
%

\vskip -.5cm
\pretolerance 10000
\listparindent 0cm
\labelsep 0cm
%
%

\vskip -30pt
\maketitle
\vskip -30pt


\normalstyle

%
%\date{September~ 5,~1993}
\vspace{2mm}
\begin{abstract}

There has been some interest, both within NRAO and in the general Radio
Astronomy Community, in the possibility of running AIPS on one of the many
``clone'' systems based on the Digital ALPHA AXP 21164 processor.
Recently, NRAO/Charlottesville acquired such a system and proceeded to
install the Linux operating system thereon.  We have also started the
process of porting AIPS to this 64-bit system, though the results reported
herein are based solely on the use of binaries generated on an OSF/1
(Digital Unix) ALPHA processor and copied to the Linux system.  We have
successfully run the ``DDT'' suite of programs on this Linux/Alpha system
and have achieved an \AMark\ of $9.0$.

\end{abstract}

\section{Introduction --- the Porting}

The Alpha clone in question is an Aspen Durango with 64 Megabytes of
memory, 1 Megabyte of L3 cache, a 433MhZ 21164 Alpha AXP processor, a
Quantum Fireball 6 GByte IDE disk, and a CMD646 PCI IDE controller.  In
addition, a Buslogic BT948 SCSI--II card was borrowed for the tests, as
was a Quantum XP34550S Fast SCSI-II disk.  This system is running a
development kernel (Linux 2.1.57) based on a standard Red Hat
installation.

Porting AIPS to such a system is problematic.  Under Linux, the approach
in the past has been to use the GNU {\tt gcc} compiler and {\tt f2c}
Fortran-to-C converter combination, but our initial forays into this realm
revealed 64-bit problems with the {\tt f2c} converter (\ie\ it was not
64--bit clean).  The second approach considered was to use the newer {\tt
g77} compiler, but this was deferred on the basis of our experience with a
separate porting attempt on an Intel/Linux system: it compiles but fails
in the Q routines with a segmentation fault.

However, one of the nicer features of Linux on the ALPHA architecture is
that statically linked binaries generated on an OSF/1 ``Digital Unix''
system can be made to run under Linux/Alpha.  After verifying this was the
case, we proceeded to build a set of such static binaries for AIPS on one
of our DEC Alpha systems, compiling with Digital Unix {\tt f77} and {\tt
cc} using optimizations and tuned for the 21164 processor.  Such binaries
turn out to be quite large, tipping the scales at over 500 Megabytes for
the {\tt LOAD} area.  It may be possible to reduce these via stripping,
and we are investigating the possibility of linking in shared mode to the
system libraries on the OSF/1 system.  There are both technical and
licensing issues to be overcome for this to work.

\vfill\eject %%% looks better.

\section{Testing and Results}

Details of the ``DDT'' certification and benchmarking package are covered
in \AIPS\ memo 85 and will not be repeated here.  Suffice it to say that
the {\tt LARGE} version of the DDT was run on the system in question,
using the standard methods as described in aforesaid memo.

The system was first tested with the IDE disks.  When these were
``un-tuned'' the resulting \AMark\ is $4.2$.  Using the system {\tt
hdparm} to tune the disk to {\tt "-m 16 -c 1 -u 0"} increases this value
to $4.5$ but has the unfortunate side effect of rendering the machine
unusable for anything else.  Tuning it with {\tt "-m 8 -c 1 -u 0"} gets a
$4.5$ also, and the CPU actually has some idle time and
can be used although sluggish and unresponsive.  Un-masking IRQs brings
the system back down to un-tuned performance but makes it more usable.

However, when the swap, {\tt /tmp} and \AIPS\ areas (source and data) are
moved to the SCSI drive, there is a dramatic improvement.  On an otherwise
unloaded system, the \AMark\ shoots up to $9.0$.  If there is some
background activity (reading e-mail, running a web browser, {\it etc\/}.),
the result slows down to $8.6$.  The system ``{\tt top}'' utility reports
consistently less than 5\% idle time and under 8\% used by the system with
the rest going almost exclusively to \AIPS\ tasks.  The disk needed no
tuning.

Finally, for some idea of how well these binaries would perform under
OSF/1, they were run on a Digital Alphastation with a 400MHz 21164
processor, which was running Digital Unix version 4.0.  These binaries
were accessed via NFS, but everything else (the data areas specifically)
was local.  The \AMark\ for this test on an otherwise unloaded system was
$10.0$.  This would seem to indicate that the emulation code under Linux
on the Alpha has relatively little overhead.

\section{Conclusions}

The viability of a generic Alpha ``clone'' with Linux as an operating
system for AIPS has been demonstrated.  The approximate cost of such a
system is on the order of US\$5k and the dollar-per-\AMark\ value of circa
\$600 is perhaps the lowest value determined by the authors to date.  The
use of a good SCSI controller and disk moved the machine out of the
desktop PC arena and into the mid- to high-performance workstation arena.

Further investigation will no doubt continue into this system, especially
in the areas of native Fortran compilers or emulators.  However, NRAO now
has the ability to provide the Radio Astronomical community with software
that will run at high performance levels on relatively low cost hardware.

\end{document}








