%-----------------------------------------------------------------------
%;  Copyright (C) 1995
%;  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{\AMark}{AIPSMark$^{(93)}$}
\newcommand{\AMarks}{AIPSMarks$^{(93)}$}
\newcommand{\AM}{A_m^{(93)}}
\newcommand{\whatmem}{\AIPS\ Memo \memnum}
\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}{91}
\newcommand{\memtit}{AIPS BENCHMARKS ON THE SPARC ULTRA 1 AND 2}
\title{
%   \hphantom{Hello World} \\
   \vskip -35pt
%   \fbox{AIPS Memo \memnum} \\
   \fbox{{\large\whatmem}} \\
   \vskip 28pt
   \memtit \\}
\author{Patrick P.~Murphy}
%
\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

\begin{abstract}

         With the recent announcement by Sun Microsystems of their
    UltraSparc systems based on a new, $64$--bit processor, there has
    been some considerable interest both inside NRAO and elsewhere in
    a measure of \AIPS\ performance on these new systems.  To that end,
    the {\tt 15JUL95} version of \AIPS\ was used to obtain several measures of
    \AMark\ on both an Ultra 1 and Ultra 2 made available to NRAO
    at Sun's offices in Vienna, Virginia.  This report details the
    compiler and OS specifics and summarizes the results.  The old
    record of $8.7$ \AMarks on an SGI system has now been broken;
    the new record by the Ultra 2 is $9.0$ \AMarks .

\end{abstract}

%\renewcommand{\topfraction}{0.85}
\renewcommand{\floatpagefraction}{0.75}
%\addtocounter{topnumber}{1}
\typeout{bottomnumber = \arabic{bottomnumber} \bottomfraction}
\typeout{topnumber = \arabic{topnumber} \topfraction}
\typeout{totalnumber = \arabic{totalnumber} \textfraction\ \floatpagefraction}

\section{HARDWARE}

     There were two systems used; one locally and not connected to any
network; the other remotely through a remote login via Sun's corporate
network ({\bf not\/} the Internet!) to a system in California.  The local
system was a Sparc Ultra 1 (the firmware identified itself as a Sparc 12,
though that may change in production models), model 170E with the
Creator3D High-performance graphics card (24-bit), 256 megabytes of
memory, and one {\it SCSI\/} bus with two disks (one fast/wide, the other
fast but not wide).  The remote system was an Ultra Sparc 2 with two
processors, each running at 182 MHz, one {\it SCSI\/} disk (probably fast,
most likely fast/wide), and 768 Megabytes of memory.

\section{SOFTWARE}

     SunOS 5.5 was the operating system used on both computers.  For the
recompilations done on the Ultra 1, the {\it SC4.0.1\/} compilers were
used (both Fortran and C).  The version of \AIPS\ was the stock {\tt
15JUL95} system that NRAO has been distributing since August.  The actual
benchmark run was the so-called ``DDT'' or {\it Dirty Dozen Tasks\/} as
described in \AIPS\ Memo 85.  Briefly described, this measures both the
accuracy and the aggregate (wall clock) time for a set of standard data
reduction steps with a standard set of data.  The


\section{DDT RUNS --- ULTRA 1}

     \AIPS\ was installed and running on the Ultra 1 in less than an hour
from first contact.  A binary tape was used in the process, resulting in
ready-to-run binaries.  However, these were compiled on one of NRAO's
machines (a Sparc 20, SunOS 5.4, {\it SC3.0.1}) with generic compiler
options so they would run on any Sparc system, and thus they were not
optimized for the new {\tt sun4u} architecture.  The table below shows the
timings for all runs on the Ultra 1; this was run number 1.  For all runs,
the DDT accuracy results were identical to those obtained by NRAO on local
machines (i.e. 99 bits for everything except {\tt MX}).

     Following the first run, the {\it SC4.0.1\/} compilers were used to
completely rebuild all of AIPS, using exactly the same optimization
settings as shipped.  Basically, this means {\tt -O4} is applied to the
numerically intensive ``Q'' routines, and {\tt -O2} to most other things.
No additional optimization related flags were used.  This showed only a
minor improvement in the \AMark .  It was then decided to add the {\tt
-fast} and {\tt -depend} qualifiers to the {\tt f77} command for the ``Q''
routines (actually, for all relevant modules compiled with {\tt\$OPT4} ---
which expands for SunOS 5 to {\tt -O4} --- or higher).  In the past, the
{\tt -fast} option had been regarded as unsafe, but the accuracy results
from the DDT after recompiling {\tt\$QPSAP}, {\tt\$QNOT}, {\tt\$QSUB}, and
{\tt\$QOOP} and relinking the {\tt INSTEP3} subset was in perfect
agreement with the previous runs.  These qualifiers resulted in a
significant improvement ({\it i.e.\/}, reduction) in the time elapsed.
Finally, a new (in {\it SC4.0.1\/}) qualifier was used: {\tt
-xarch=v8plus}.  Apparently this alerts the compiler to the exact
architecture for which the program is being built, in this case the {\tt
sun4u} systems.  This gave a small but significant boost in \AMark .

     For all runs on this system, the source and binaries, and the first
data area were coexistent on the same {\it SCSI\/} disk (fast/wide) and
the {\tt TDISK} parameter was set so that the test data from the DDT went
on a second (fast, but we think not wide) disk.  There were other, slower,
disks on the system but they were not used during this test.  The other
DDT parameters were as set for standard large DDTs, i.e. {\tt EDGSKP} set
to $12$, {\tt TERSE} set to zero.

\begin{table}
\protect\begin{center}
\protect\begin{tabular}{|l|r|r|l|} \hline
Run & Secs & $\AM $ & Notes \\ \hline
1 & 828 & 4.83 & NRAO binaries; highest ``Q'' optimization: {\tt -O4} \\
2 & 802 & 4.99 & Ultra compiled binaries ({\it SC4.0.1\/}), also {\tt -O4} \\
3 & 664 & 6.02 & Ultra compiled {\it SC4\/}, {\tt -fast -O4 -depend} \\
4 & 638 & 6.27 & As for run 3, also added {\tt -xarch=v8plus} \\
\hline
\end{tabular}
\end{center}
\caption{Sparc Ultra 1 Timings}
\label{ta:one} %%% use: ... in Table~\ref{ta:one} ...
\end{table}


\section{DDT RUNS --- ULTRA 2}

     As soon as run 3 for the Ultra 1 was complete, the binaries and other
critical files were copied to tape, thence to a system on Sun's internal
corporate network and copied to the Ultra Sparc 2 in California.  Results
for the Ultra 2 runs are presented below in Table 2.  Following run 5 on
the Ultra 2 and run 4 on the Ultra 1, the binaries from run 4 ({\it
i.e.\/}, with {\tt -fast -O4 -depend -xarch=v8plus}) were copied out to
the Ultra 2 (again via tape and then {\tt ftp}) for the final run.

     The \AIPS\ system, binaries, and all data were placed on the same
{\it SCSI\/} disk for these two runs.  While this system was connected to
Sun's internal network, its ``owner'' had deliberately left it unused for
the day and there was no other network access.  The speed of the
inter-site network connection was sufficient to eliminate ``terminal
printout slowdown'' as a factor in the DDT timing.

     One additional set of re-compilations was attempted on the ``Q''
routines, this time with {\tt -autopar} and {\tt -reduction} (to enable
some level of auto-parallelization to be done by the compiler) but there
was a system library missing which caused all links to fail.  Thus, the
attempt had to be abandoned due to the late hour and absence of the
crucial object module ({\tt \_\_dopar\_ex}).

\begin{table}
\protect\begin{center}
\protect\begin{tabular}{|l|r|r|l|} \hline
Run & Secs & $\AM $ & Notes \\ \hline
5 & 476 & 8.40 & Binaries from run 3 on the Ultra 1 used. \\
6 & 446 & 8.97 & Binaries from run 4 on the Ultra 1 used. \\
\hline
\end{tabular}
\end{center}
\caption{Sparc Ultra 2 Timings}
\label{ta:two} %%% see above for usage.
\end{table}

\section{DISCUSSION}

     The Sun Engineers pointed out that the Ultra 2 used suffered from a
rather subtle clock timing effect.  Had the chips been running at a
slightly slower or faster speed, they felt that a significant improvement
in data transfer through the system's crossbar (which runs at 67 MHz).  It
was also thought by everyone present that the performance would have been
boosted on both systems had there been two separate {\it SCSI\/}
interfaces, each with a fast/wide disk.  The effect of the {\tt -autopar}
and {\tt -reduction} flags on the \AMark\ will, for the present, remain a
mystery, though it is probable that it would boost the figure
somewhat past the $9.00$ level.


\section{ACKNOWLEDGMENTS}

     The author wishes to express thanks to both of the Sun Systems
Engineers: Ed Conzel {\tt <ed.conzel@east.sun.com>} and Curt Harpold {\tt
<curt.harpold@east.sun.com>}.  Their assistance and technical knowledge
not only made possible the benchmarking, but also significantly
streamlined the whole process.

\end{document}
