@@
B. SYSTEM ENVIRONMENT FOR AIPS ON THE VAX 11/780




1. Introduction

   This section describes the system environment on a VAX 11/780
at NRAO.  This section provides an overview while section C provides
the steps for the installation of AIPS.  The peripherals at NRAO
include a VERSATEC printer/plotter, a TEKTRONIX 4012 graphics terminal,
an FPS AP-120B array processor, and a Model 70 IIS TV device.  The
accounts, quotas, priorities, etc. described here may not be right for
your installation.

2. The AIPS account.

   The following is a description of the AIPS account at NRAO.
The detach privilege is necessary for the batch subsystem.  The
command procedure LOGIN.COM should be executed at login time.

Username: AIPS

Password: Null

Priority:  4

Process Quotas:

   CPU limit :                  Infinite    Direct I/ O limit :       6
   Buffered I/O byte count quota :  8192    Buffered I/O limit :      6
   Timer queue entry quota :          10    Open file quota  :       40
   Paging file quota :             10240    Subprocess quota :        6
   Default page fault cluster :      127    AST limit :              10

Process privileges :

   GRPNAM     may insert in group logical name table
   DETACH     may create detached processes
   GROUP      may affect other processes in same group
   PRMCEB     may create permanent common event clusters


3. Directories / subdirectories

   The entire AIPS is contained in one main directory with a large
number of subdirectories.  These subdirectories are implemented in a
way that allows multiple versions of AIPS software to exist at one time.
At NRAO we run two versions called OLD and NEW.  The OLD version should
be more thoroughly debugged but the NEW version may contain newly added
capabilities and programs.  In the following description of the
subdirectories, if an xxx appears in the directory name, then
both an OLD and NEW version of that subdirectory exist.  At NRAO xxx is
a date.  For example for OLD the xxx might be 15SEP82 and for
NEW the xxx might be 15NOV82.  A third area called LOCAL contains site
specific routines.  This area can be used at your site to develop tasks
or to keep tasks developed at your site separate from those provided by
NRAO.

[AIPS]

   This directory contains a few command procedures that make
logical assignments and start up AIPS.

[AIPS.DATA]

   This subdirectory contains all user data, and all of the system
files used by AIPS except for the memory files.  This data is shared
by both the OLD and NEW versions.  We found it necessary to have two
versions of the memory files.

[AIPS.RUN]

   This subdirectory contains the run files (of the form *.RUN) used by
AIPS.

[AIPS.xxx]

   This subdirectory contains the AIPS memory files, command procedures
to assist in programming AIPS, plus the 'control files' (of the form
*.CT*) used in installing AIPS.

[AIPS.xxx.INC]

   This subdirectory contains the include files (of the form *.INC)
referred to in the program source code.

[AIPS.xxx.HELP]

   This subdirectory contains the help files (of the form *.HLP) used
by AIPS.  HELP files contain text used by the verb INPUTS, followed
by a line of dashes and then the text used by the verb HELP.

[AIPS.xxx.HIST]

   This subdirectory contains the CHANGE.DOC and CHANGED.* files
containing a record of the changes made to AIPS programs.

[AIPS.xxx.LOAD]

   The subdirectory contains the executable modules (*.EXE) comprising
the AIPS system.

[AIPS.xxx.AIPS]

   This subdirectory contains the object module library (SUBLIB.OLB)
for subroutines used exclusively by the main AIPS program or the
utility programs (excluding the tasks).

[AIPS.xxx.AIPS.SUB]

   This subdirectory contains the source code for the machine
independent subroutines used exclusively by the main AIPS program,
the batch subsystem, or the utility programs.

[AIPS.xxx.AIPS.PGM]

   This subdirectory contains the source code for the main AIPS program,
the batch subsystem programs, and the utility programs.

[AIPS.xxx.AIPS.ZSUB.VMS]

   This subdirectory contains the source code for the VAX/VMS machine
dependent subroutines used exclusively by the main AIPS program, the
batch subsystem, or the utility programs.

[AIPS.xxx.APL]

   This subdirectory contains the object module library (SUBLIB.OLB)
for subroutines used by the AIPS programs and the tasks.

[AIPS.xxx.APL.SUB]

   This subdirectory contains the source code for the machine
independent subroutines used by the AIPS programs, and the tasks.

[AIPS.xxx.APL.PGM]

   This subdirectory contains the source code for the tasks that do not
use the array processor.

[AIPS.xxx.APL.APGM]

   This subdirectory contains the source code for tasks that use the
array processor.

[AIPS.xxx.APL.ZSUB.VMS]

   This subdirectory contains the source code for the VAX/VMS machine
dependent subroutines used by the AIPS programs and the tasks.

[AIPS.xxx.APL.YSUB.DEA]

   This subdirectory contains the source code for the subroutines of
both the AIPS program and the tasks that are used with the Deanza
display device.

[AIPS.xxx.APL.YSUB.IIS]

   This subdirectory contains the source code for the subroutines of
both the AIPS program and the tasks that are used with the Model 70
IIS display device.

[AIPS.xxx.APL.YSUB.M75]

   This subdirectory contains the source code for the subroutines of
both the AIPS program and the tasks that are used with the Model 75
IIS display device.

[AIPS.xxx.NOTST]

   This subdirectory contains an object module library (SUBLIB.OLB) for
the subroutines that do not yet conform to the AIPS programming
standards.

[AIPS.xxx.NOTST.SUB]

   This subdirectory contains the source code for the subroutines that
do not yet conform to the AIPS programming standards.

[AIPS.xxx.NOTST.PGM]

   This subdirectory contains source code for the non-AP using tasks
that do not yet conform to the AIPS programming standards or that use
non-standard subroutines.


[AIPS.xxx.NOTST.APGM]

   This subdirectory contains source code for the AP using tasks that do
not yet conform to the AIPS programming standards or that use non-
standard subroutines.

[AIPS.xxx.FPS]

   This subdirectory contains the object module library (SUBLIB.OLB)
which contains the array processor subroutines.

[AIPS.xxx.FPS.SUB]

   This subdirectory contains the source code (of the form *.FOR, *.AP,
*.VFC) for the array processor routines.

[AIPS.xxx.PSAP]

   This subdirectory contains the object module library (SUBLIB.OLB)
which contains the array processor simulator subroutines.

[AIPS.xxx.PSAP.SUB]

   This subdirectory contains the source code for the array processor
simulator subroutines.

[AIPS.xxx.PSAP.LOAD]

   If you have an AP, the executable routines for the AP using tasks
which have been linked with the pseudo AP subroutines will be found
here.  Otherwise this area is empty.  These tasks can be useful when
the array processor is busy or for debugging.

[AIPS.xxx.DOC]

   This subdirectory only contains other subdirectories.

[AIPS.xxx.DOC.TEXT]

   This subdirectory contains the text files for the main AIPS manuals.

[AIPS.LOCAL]

   This subdirectory should contain a subdirectory for any site specific
routines.  This area and the other LOCAL subdirectories are not updated
by our installation procedure.

[AIPS.LOCAL.SUB]

   This subdirectory should contain source code for any site specific
subroutines.

[AIPS.LOCAL.PGM]

   This subdirectory should contain source code for any site specific
programs which do not use the AP.

[AIPS.LOCAL.APGM]

   This subdirectory should  contain source code for any site specific
programs which use the AP.

[AIPS.LOCAL.INPUTS]

   This subdirectory should contain the inputs files for any site
specific tasks.

[AIPS.LOCAL.HELP]

   This subdirectory should contains the help files for any site
specific tasks.

[AIPS.LOCAL.LOAD]

   This subdirectory should contain the executable modules for any
site specific tasks.

3. Logical assignments


a. Process logical assignments

ASSIGN TT: FOR005

   Fortran unit 5 is used by the AIPS interpreter for input from
the terminal.  The above assignment is necessary because the AIPS
interpreter is initiated by a command procedure.  Normally the
system logical name table contains the entry FOR005 = SYS$INPUT
(after version 1.6 of VMS this assignment is not listed but is
implicit) and the process logical name table contains the entry
SYS$INPUT =<terminal name>.  Thus under normal conditions FOR005 is
already properly assigned to be used for terminal input.  However, a
command procedure assigns SYS$INPUT to the command procedure file
thus necessitating this assignment.  The assignment is made by
command file LOGIN.COM.

Assignments made for a subprocess during creation by subroutine ZACTV9:

ASSIGN <terminal determined by logical names. See 3c.>: SYS$OUTPUT
ASSIGN TT:        SYS$INPUT
ASSIGN ERROR.DAT  SYS$ERROR

   If a shed task generates a system abort, a copy of the system
error messages will be written into file ERROR.DAT.


b. Group logical assignments

   At NRAO All group assignments are made at boot time in the system
managers start up procedure.  The installation procedure will set up
a command procedure ASSIGNL.COM to make all group assignments needed for
AIPS.  ASSIGNL.COM is executed by the system startup procedure at boot
time. A description of these group assignments follows.

ASSIGN/GROUP <disk 1>:[AIPS.new] NEW
ASSIGN/GROUP <disk 1>:[AIPS.old] OLD

   AIPS contains two separate versions that operate on the same data
area.  The two assignments above define these two areas. The string
<disk 1> will be a disk device name such as DBA0.  IN AIPS.new
or AIPS.old the 'new' and 'old' will be dates, such as 15NOV82 for
'new' and 15SEP82 for 'old'.

ASSIGN /GROUP <disk1>:[AIPS.DATA]   DA00
ASSIGN /GROUP <tape device name>:   MT00

   The logical names DA00 and MT00 are used for the AIPS data area
on disk 1 and the tape drive.  AIPS volume numbers start at 1, so
disk 1 in AIPS refers to DA00, disk 2 refers to DA01, etc.  If more
than one disk drive or tape drive exists on the system other
assignments must be made.

ASSIGN <terminal reserved for AIPS1>:  RESSTT1

   This assignment allows a specific terminal to always be AIPS1.
AIPS1 has priority use of the AP, and can be given other priority
usage of graphics and TV devices.  Also the temporary storage areas
(used when doing a STORE and RESTORE) are tied to AIPS numbers.
Terminals not assigned to one of the nine allowable RESSTTi will
acquire the lowest AIPS number that is not reserved and is not in
use when they start up AIPS.

ASSIGN/GROUP <emergency batch terminal or text file>  BATTT

   If batch AIPS gets into trouble, it writes messages to this device.

ASSIGN/GROUP <default graphics device>:   TEKTK0
ASSIGN/GROUP <graphics device 1>:         TEKTK1
ASSIGN/GROUP <user of graphics device 1>: AITKTT1

   The terminal name assigned to AITKTT1 will use the graphics device
assigned to TEKTK1.  All other users (except 'remote' users discussed
below) will use the default graphics device as long as their AIPS
number is smaller than the AIPS parameter 'number of users allowed
access to the grahics devices'.  Up to nine pairs of TEKTTi and
AITKTTi may be defined.  Some of the TEKTTi may be assigned to the
same graphics terminal if you want users to share a device.

ASSIGN/GROUP <default TV device>:             TVDEV0
ASSIGN/GROUP <TV device no. 1>:               TVDEV1
ASSIGN/GROUP <user assigned to TV device 1>:  AITVTT1

   These assignments specify which user terminals use which TV
devices.  Access to the default TV is controlled by setting the
system parameter 'number of users allowed access to the TVs'.

ASSIGN /GROUP <remote terminal 1>  REMOTT1
ASSIGN /GROUP <remote terminal 2>  REMOTT2

   Terminals that appear in this list are considered 'remote graphics
terminals'.  All graphics commands will be sent back to this terminal.
That is, the terminal functions as a user input terminal and a graphics
terminal.  These terminals are not allowed to use the default TV.
However they may be specifically assigned a TV by being in the list
of AITVTTi.


ASSIGN /GROUP TT:     TASKTT0
ASSIGN /GROUP _<1st AIPS terminal>:         AIPSTT1
ASSIGN /GROUP _<task terminal next to 1st AIPS terminal>: TASKTT1

   The assignments above allow tasks (subprocesses) spawned by the user
terminal assigned to AIPSTT1 to write to a special message terminal
assigned to TASKTT1.  Up to nine of these assignment pairs may exist.

  Any terminals not found in this list will have the task messages
printed at the default terminal, which is always TT:.  That is, user
input and task messages all occur at the same terminal.  On some
terminals this may require a carriage return or an AIPS 'WAIT'
instruction to release the terminal long enough for the task to print
its messages.

   The subroutine that uses these logical assignments is
[AIPS.xxx.AIPS.ZSUB.VMS]ZACTV9.FOR.


4. Process names

   The startup command procedure AIPS.COM changes the name of the
process to AIPS1 or AIPS2, AIPS3 etc. if other versions are running,
up to the number of allowable interactive AIPSs.  Tasks shed by
AIPS are given the names TASKi where TASK is the task name (for
example IMLOD) and i corresponds to the number of the AIPS
activating the task. For example AIPS2 activates task IMLOD2.



5. Startup command procedures.

LOGIN
   LOGIN will make all process logical  assignments needed to run
AIPS.  Then LOGIN will set the terminal to UNKNOWN FULLDUP.
This allows (at least on our terminals) tasks to print to the terminal
even when the terminal is waiting for user input.  Then LOGIN calls
AIPSTR to start up AIPS.  After AIPS runs, the terminal is re-set to
its original terminal type.

AIPSTR
   This procedure is NRAO specific in some ways, thus you may have
to tailor it to your needs.  First the user is asked which version of
AIPS to run, OLD or NEW. Then the procedure asks if the user
wants to mount a tape, and gives the user a choice of tape drives.
Next the procedure runs ZSTRTA to re-name the process to the proper
AIPSi and Aips is started up.  After AIPS finishes, ZSTOPA is run
to give up the name AIPSi by re-naming the process to the terminal
name.

ASSIGNL
   At NRAO this procedure makes all group logical assignments needed
for AIPS.  This procedure is called in the SYSTARTUP command procedure
at boot time.  The installation procedure builds an ASSIGNL.COM
that makes the group logical assignments.  Some installations
will want to edit their SYSTARTUP procedure to make the group logical
assignments at boot time.  Other installations will want to edit
LOGIN.COM to make it call ASSIGNL.COM.

AIPS
   The user can initiate AIPS at the command level ($ prompt) by typing
@AIPS.  This procedure is very similar to AIPSTR except that the
prompts for mounting tapes are omitted.

6. Output to the VERSATEC printer/plotter

   At NRAO our VERSATEC serves as the spooled system printer and
as the plotter.  Printed output and plots are written to
file FOR001.DAT which is created  with DISP='PRINT/DELETE' in a
FORTRAN open statement.  Our device name for the VERSATEC follows
DIGITAL's terminology instead of VERSATEC's and is 'LPA0:'.

   Only one program spools plots to the plotter.  Task PRTPL will
read an AIPS plot file, construct a bit map version of the plot and
then ZDOPRT (a subroutine of PRTPL) will read the bit map and write
the file FOR001.DAT which will be spooled and recognized by the
VERSATEC driver as a plot.

   The bit map file written by PRTPL and read by ZDOPRT is of the
following format:  The first word in the first 512 byte block contains
the number of plot lines in the bit map file.  ZDOPRT expects each line
to contain 2112 bits (132 words).  The first (top) line starts at the
first word in the 2nd 512 byte block.  Succeeding lines follow one
after another crossing block boundaries.

   Sites with a VERSATEC that is used for plotting only and not for
spooled printed output will want a version of ZDOPRT that writes
directly to the VERSATEC.  Use module ZDOPR3.FOR as a model.  You
will probably have to change the device name in this module from
LPA0: to your device name.

   Before version C of the VERSATEC driver, spooling of plot files
was not supported.  We constructed a make shift 'spooler' to handle
this case.  The programs for this 'spooler' are included on the
installation tape. However, if you have an older version of the
driver we suggest that you get the new driver from VERSATEC.
The new driver is compatible with the old one, plus it has the
spooling capability.
