From: sns@bondi.jpl.nasa.gov (Sam Southard)
Newsgroups: alt.sci.astro.figaro
Subject: Death by mutilation?
Date: 28 Jan 1993 15:37:20 GMT
Organization: Image Analysis Systems Group, JPL
Distribution: world
NNTP-Posting-Host: bondi.jpl.nasa.gov
Keywords: VAXnotes figaro forum forwarding

               <<< REVAD::$1$DRA1:[NOTES$LIBRARY]FIGARO.NOTE;1 >>>
                               -< Figaro forum >-
================================================================================
Note 35.2                     Death by mutilation?                        2 of 3
RLVAD::KIS "Keith Shortridge, AAO"                   86 lines  22-DEC-1992 11:48
                 -< And another version to complicate things >-
--------------------------------------------------------------------------------
In the light of these comments, it may be worth giving a brief progress
report on the recent work done (mainly here in Australia, but based firmly on
the work Horst did for the portable ADAM version of Figaro) on a portable
standalone Figaro. While it's clearly in Starlink's interests to merge Figaro
as completely as possible into the ADAM system, and I'm all for that, we also
think that a number of sites, particularly non-Starlink sites, have an interest
in seeing a UNIX version of Figaro 3 that looks like Figaro always did, and
which doesn't run as part of the Starlink environment. (I'm not knocking the
Starlink environment here, just noting that there may still be a place for
a more traditional version of Figaro.)

So we've been working for a while now, on and off, in fits and starts, to
produce such a thing. One of the first results was the portable version of
DSA that Horst used for the ADAM Figaro system. We've now taken the work that
Horst did on that, and on the other various libraries that Figaro uses (such
as FIG, JTY, GEN, etc) and have fed that back into what we're doing. This
really has been rather a successful international collaboration, so far.
We have been working on the bits of Figaro that Horst and Starlink don't
really have much interest in, such as the Figaro parameter system, the
VARS library, and the assortment of programs needed to link together a
standalone Figaro application - the stuff that gets invoked when you do 
'@FIGARO_DEV/FIG name' (or in the new UNIX world, '$FIGARO_DEV/fig name').
A lot of the code has its origins in the work Sam Southard did for SUN Figaro
2.4, but we've gone over most of the code carefully, since this time we are
aiming not just for a SUN system but a more portable system - a lot of the work
is in fact being done on DECStations.

This Figaro 'backbone' now seems to be working, and is being tested right now.
It means that any Figaro application that uses libraries that have already been
ported can now run under this new standalone, portable, Figaro system. At
the moment I have a sample set running: BCLEAN, EXAM, EXTRACT, IREVX, IREVY,
IXSMOOTH, ISCRUNCH, SCRUNCH, GROWX, GROWY, IDIV, IMULT and a few others. At
the moment, we're trying to check out the system rather than dash to implement
all the applications. We've linked against the Starlink version of PGPLOT, and
I've seen SOFT and IGREY run on a DecStation. We've not yet tackled the image
display routines, although I believe Figdisp will run on a Decstation and 
getting TVPCKG running with it should present few problems, but might be
tedious - we're trying to tidy up the code as we go (for example, we're trying 
to end up with something that doesn't look like a kluge of a VMS program that
runs under UNIX only because a number of not-quite-exact emulations of
system routines have been written; we're trying to replace all calls to things
like LIB$ and SYS$, and TVPCKG I think has quite a number of these). Another
thing missing, of course, is mag tape handling. I believe Starlink is making
good progress with the MAG package (although I will miss TIO) and we will
probably rework the tape routines to use that. So it will be a while yet 
before the whole system is running, but right now it seems to have some 
momentum and it obviously is going to happen.

One thing that will be part of the new system, some of you may be interested
to hear, will be Callable Figaro. The somewhat alarming piece of VAX macro
that runs this has been turned into a C program and this works. I'm trying
at the moment to speed up a data reduction procedure running on the VAX as
a DCL procedure, and as an experiment I've cast it into a Callable Figaro
program to run under UNIX. It seems to work. It seems to work very well, in
fact. (The Callable Figaro program running on a SUN IPX just processed an
UCLES frame in 4min 36 seconds; the equivalent VMS DCL procedure on a VAX 4000
took 32 minutes and 44 seconds - I've not yet checked that it got the same 
result (!) and I know I'm not comparing like with like here, but it indicates
what can be done.)

I should say something about the variety of Figaros that there now seem to be.
The essential thing, I think, is that applications have to be completely 
portable, and as far as possible, the same subroutine libraries should be
used by all the systems. This should certainly be the case between ADAM Figaro
and the new standalone Figaro - they are in fact really part of the same
project, and are indeed using the same DTA code, the same DSA code, the same
GEN code, etc. The PAR and VAR libraries, and the underlying system stuff is
different, of course, but we definitely intend to keep what does overlap 
exactly the same. And, of course, we want the same code to run under UNIX
and under VMS (we may want to run on a VMS ALPHA one day). Generally, if you 
have a VMS Figaro application, and it doesn't use any funny LIB$ or SYS$
calls, you may find that all you have to do is change the syntax of the
statement     INCLUDE 'DYN_SOURCE:DYNAMIC_MEMORY.INC'
to            INCLUDE 'DYNAMIC_MEMORY'
and this syntax will work for all the current target systems (SUN, VAX, and
DECStation - if we have to use some other system where even this simple form
of INCLUDE, which admittedly isn't standard Fortran 77 - no INCLUDE can be
standard Fortran 77 - then we'll have to pre-process it). I'm also in touch with
Sam Southard and we're trying to keep from diverging there as well.

I hope that's of some interest to readers of these NOTES, because I don't think
we've said much recently about what's going on here. The prime movers here have
been myself, Mike Ashley and Brad Carter at University of New South Wales,
Stephen Meatheringham at Mount Stromlo, and of course Horst up in Edinburgh.
So, that's some of your answer, Captain Starlink - Figaro's support comes
from Edinburgh, from California, and also, appropriately, from the Land of Oz.