Professional Documents
Culture Documents
bY
STAN-M-78-673
NOVEMBER 1078
bY
Tony F. Chanl
William M. Coughran, Jr.
Eric H. Grosse
Michael T. Heath2
taining the library and monitoring its use, and managing the consulting
operation.
mathematical software
numerical analysis
1.
- Introduction
[2] and Cody [5] do discuss some relevant points). By summarizing our
sor George Forsythe, the original leader of the research group, encouraged
tually, however, the load became heavy enough that the campus computing
service was asked to make more formal arrangements, and soon the comput-
capacity. For the first year or so at SLAC, most effort was devoted to
led to a high-quality library, but one that was not heavily used. So a
second phase began, publicizing the library and improving the user inter-
face. With the success of that effort, we entered a third, more stable,
stage in which actual contact with the users and their problems was
1
emphasized. Expansion and revision of selected areas continues, in order
to meet needs better and to generate the enthusiasm without which the
The SLAC consulting operation may be broken down into four main
2
-• Providing Software
ticularly important, since few users are willing to put much initial
They were slow to incorporate advances in the state of the art because of
2
their desire for a systematic collection, their administrative organiza-
and did not provide much guidance in how to make those choices. Despite
copies could be kept, which was inconvenient for users housed in the
the credibility of the entire package. Finally, and perhaps most funda-
the small core library rather than the experimental code collection.)
government distribution sites (e.g., the Argonne Code Center and the
routine to solve nonlinear fitting problems). Few codes have been written
3
directly for the library, since we view the librarian's task as one of
and, therefore, rarely provide the user with selection guidelines. Our
sonal experience, and discussions with the many visitors to the Numerical
can install new algorithms in the library soon after they become avail-
able.
answers are not computed without warning, and generality and flexibility
so that users can develop familiarity with the routine's behavior and
Since the numerical work is done on large and busy computer systems,
time rather than storage tends to be the main constraint. Even with the
Some routines have been rejected for inclusion in the core library
because we did not feel that their coding style was clear enough for
-_
maintenance, or because they seemed unreasonably long or overly compli-
cated to us.
sion. (It is widely felt that for a number of computations that the
precision should be used in all but the most stable processes.) However,
5
releases of routines without having to remodify them.
3.
- Advising on Problem Formulation
can greatly enhance its value by keeping it online. First, everyone can
-_
get a copy, either directly at his terminal or, with only slightly more
form is simply not good enough for a scattered and diverse user community.
maintenance using text editors and formatting programs, which make con-
as-it is aptly known, is the heart of our library. It provides the main
the key document that forces explicit, careful decisions and coherent
6
organization [4].
library and a description of how various parts of the system may be used,
containing:
- pitfalls in computation
- suggested reading
imating forms and featuring the nonlinear fitting routine VARPRO; fast
equation chapter based on fine codes from the Sandia and Lawrence Liver-
which, because of the primitive state of the art and relative lack of
the fast Poisson solvers from the National Center for Atmospheric
Research.
7
error returns, and a short description of the method used.
associated with them, which often help people in understanding how to use
will solve the user's problem, the effort required to write and debug a
popular here.
papers that one might read for help in solving a difficult problem.
Also mentioned are user's handbooks for individual codes, which can vary
and Gordon's ODE code [ll]). The packages produced by the NATS project,
tion structure, let us consider the problem of solving some ordinary dif-
-ferential equations. The user may have a first-order system with appro-
priate initial conditions. The user's guide would allow him to conclude
that he has an initial value problem, and upon further reading he might
decide his problem is not stiff. Combining this information with the
code, say Shampine and Gordon's ODE. The user could then obtain a
description of the code and its calling sequence from the public WRITEUPS
8
ODE from the public EXAMPLES library. If at a later time the user wanted
visitors and other transients, who are rather common at a national labo-
sulting. Others who come in may have read our user's guide, but want to
routines.
effective at the time the library was introduced, but can be usefully
rerun only every few years. They emphasized the practical use of rou-
tines and what to watch out for, rather than the theory behind the algo-
audience. The visits to user groups include both "big game hunting," in
projects where one hopes to have the greatest leverage, and "general
9
Assisting in use of the library also extends to implementation
details. To save the user as much effort as possible, and at the same
online in object form and are automatically linked into programs, just
the library routines, source text is kept offline and in some cases
4
-- Maintaining the Library
For numerical routine libraries this implies that some sort of guarantee
those persons who do use it are contacted and the routine upgraded. On
A routine that has become outdated, but not dangerous, also poses a
problem. The solution used at SLAC is to drop the routine from the
10
NAPLUG, later drop its short documentation from the WRITEUPS library, and
finally remove papers describing the routine from the consulting office
and expunge the source from the system libraries. The load module for
the routine (i.e., the compiled machine code for the routine) is left in
place (if it causes no name conflicts); the source for the routine can
tion, and old [7]. The basic idea is to migrate routines through these
ines the problem and refers it to the proper specialist who (hopefully)
fixes the code. The updated routine is compiled and the resulting load
module put into the new library; the users who discovered the problem are
advised to access the new version. After some time, the erroneous pro-
duction version of the routine is moved into the old library displacing
any previous version; subsequently, the patched version in the new library
Another technical problem arises from the fact that, since several
11
the package, routine names can be made unique (being derived from the
core library, real name conflicts can exist and duplication of code does
are imported for use in the library they usually include all necessary
The library ignores the code duplication problem since the local
system has adequate disk capacity to handle the superfluous code. The
problems of name conflicts that can arise with stand-alone codes are
resolved with the CHANGE facility of the IBM Linkage Editor [9] which
allows one to modify the name of a routine after it has been compiled.
This has proven an effective solution since unique names can be supplied
by Bailey and Jones [l]. The collection procedure is based upon the use
versions of routines.
ferent parts of the library are used. For example, it appears that data
fitting routines are the most important component of the library to most
this situation is reversed; this implies that libraries and their sup-
12
porting services should be adapted to the local environment.) Such infor-
calls of the library routine within the same job, the monitor call is
ber," which it passes to the monitor. The monitor looks up the number in
a status table to be sure that no recent changes have made the routine
obsolete, then writes out a system accounting record of which user made
the call, and optionally what the parameters were. Note that the status
even if the user has his own (old) copy of the monitor routine.
source copy of a routine, his identification and the name of the routine
lar problems.
5
-* Managing the Operation
13
sulting operation described here is staffing. Most computer people tend
exceptions, have tended to avoid the tar pits of software libraries. Users
lack balance in the knowledge of systems and numerical analysis and are,
assistants with overlapping terms, so that the new consultant can learn
the ropes from the older one. The Ph.D. students benefit by the exposure
enthusiasm and, partly through the students' link with the campus research
see good people go in, burn out in a year, and return to research. One
ing priorities, user problems, system questions, etc.) that must be made*9
up effectively.
14
possible should be embedded in programs, so that consultants can spend
their time on higher level functions and have mechanical operations per-
formed mechanically.
quite difficult to get monies set aside for obtaining numerical codes. In
fact, the entire project is run on a relatively small budget since there
are few code costs and research assistant salaries are quite low when com-
pared with the cost of a full-time member of the professional staff. How-
ever, the number of Ph.D. student hours available is limited, and some
by management.
sultants to groups which make heavy use of CPU resources can assist in
measurements and observations provide the basis upon which management must
6
-* Conclusion
Although new codes are being added and old ones removed, the basic organ-
15
ization of the library has stabilized. The hard choices of which avail-
able routines are best suited for inclusion in the core library are now
made more routinely since the criteria by which routines are judged have
that all routines are automatically available without conflict, and the
now been done. Experience with the costs of maintenance and providing
user consulting has been gleaned. Some idea of how users are affected
The NAPLUG has been well received at SLAC and enables many users to
make proper code choices when faced with numerical problems. The simple
The online WRITEUPS and EXAMPLES libraries assist in the transition from
module libraries insure that all core subroutines are automatically call-
able, without the need for special job control information. The works ref-
function as consultants insures that the concerned user can find assis-
16
and library stability issues that arise from this policy complicate main-
students involved in the project never act as consultants for a long period
relatively slow and somewhat arduous task. The means for reaching the
. codes to the library. (In some sense, users must be "sold" on the value
lectual effort and machine resources over the past four years. User
response has been favorable; the overall library organization has proven
its worth. As a resource for the researchers at SIX, our library forms
17
an important foundation of high-quality, state-of-the-art mathematical
software which assists them in spending more of their time studying physics
and not numerical analysis. Moreover, the symbiosis between the Numerical
Analysis Group and SLAC has aided in the practical training of numerical
specialists. .
Acknowledgments
Some of the ideas contained in this paper are abstracted from a paper
to the interested SLAC user. The present paper attempts to reach a wider
A major project like the one described here inevitably involves many
individuals. John Ehrman and Richard Lagerstrom must be singled out for
Bolstad, June Genis, Gene Golub, John Lewis, Franklin Luk, Joseph Oliger,
Michael Overton, Lennox Sweeney, and Margaret Wright for their contribu-
tions, and Marsha Berger, Daniel Boley, Stephen Nash, and Lloyd Trefethen
for their consulting efforts. Numerous code authors have been generous
e
in making their routines available for use in the library. Countless SLAC
users have made suggestions that have improved the library. SLAC, SLAC
SCIP), and the Department of Energy also deserve thanks for their support.
18
References
-SIAM Rev.
- 16, 1 (January 1974), 36-46.
6. Coughran, W. M., Jr. The Construction of a Numerical Analysis
19
11. Shampine, L. F. and Gordon, M. K. Computer Solution of Ordinary
Francisco, 1975.
20