From jmb@ing.iac.esThu Aug 28 19:47:35 1997 Date: Tue, 26 Aug 1997 20:04:46 +0100 (BST) From: Jonathan Burch To: Frank Gribbin Subject: CJM's WHIRCAM Software Notes Dear Frank, Here are CJM's WHIRCAM software notes. Cheers, Jonathan From: SMTP%"cjm@mail.ast.cam.ac.uk" 16-DEC-1994 10:55:45.31 To: jmb CC: Subj: Latest doc Notes on how to setup the ukirt observing system for IRCAM/ALICE _________________________________________________________________ The following notes were the steps that had to be followed to get the IRCAM/ALICE software installed at RGO. The detailed edits to various files are not recorded here only the names of the files that have had to be changed. 1. Create a top-level directory on your favourite disk called ukirt_seed and make it owned by ukirt_mgr e.g. $1$dua1:[ukirt_seed] 2. Add the ACL's IDENTIFIER=UKIRT_MGR, ACCESS=READ+WRITE=EXECUTE+CONTROL IDENTIFIER=UKIRT_MGR, OPTIONS=DEFAULT, ACCESS=READ+WRITE=EXECUTE+DELETE+ CONTROL 3. restore the backup tape backup/log mub0:ukirt190.bck/sel=[*...] ukirt_seed:[*...] /own=ukirt_mgr 4. In systartup add the following lines $ @$1$dua1:[ukirt_seed.$ukirtcom]ukirt_startup $ define/system ieee_busdir ukirt_seed:[ieee] The ieee_busdir definition won't be needed if the micro link controllers aren't used on the WHT IRCAM 5. In ukirtcom_dir (ukirt_seed:[$ukirtcom]) edit ukirt_startup.com to remove the logical name table lnm_sys_mail_names from the definition of lnm$file_dev 6. In ukirtcom_dir edit the file systartup.com A number of lines can be commented out, in particular those parts that start the AAO DRT (not needed for IRCAM), definitions for UKIRT weather logs and logicals for remote observing. In the section on the cluster alias name, define logicals for the following define/system/exec/nolog/trans=(conc) disk$ancildata xxxxx define/system/exec/nolog/trans=(conc) disk$ancildata2 xxxxx define/system/exec/nolog/trans=(conc) disk$ukirtdata xxxxx define/system/exec/nolog/trans=(conc) disk$userspace xxxxx The first two of these hold IRCAM system information (on gxseg0 they were pointed to $1$dua1:[ukirt_seed.]) The second two hold user data. If it is required to store all user data in a special area then define these to point to that area. Otherwise, get all users of IRCAM to define these logicals to point to their own directories and don't define them here. e.g. $ define/nolog/job disk$userspace u2 $ define/nolog/job/trans=(conc) disk$ukirtdata disk$user:[cjm.] 7. In ukirtcom_dir remove un-needed logicals etc. from define_jach_lnm.com define_job_lnm.com The lines to remove can be found by looking at the files in ukirtcom_dir on GXSEG0. 8. In sylogin.com add the following lines $ @ukirtcom_dir:login 9. Edit ukirtcom_dir:setup to modify message about "Unknown cluster in UKIRT system setup" or if you have a cluster alias put in a label for it. ****************************************************************************** By this point you should be able to boot your machine and login with no error messages from the ukirt startup command files. You should also be able to log in and type ukirtstart where software_plane is set to one of the valid numbers for which top level directories exist e.g. 190 ******************************************************************************* 10. In ukirtcom_dir edit the following files define_startups.com Most of the changes are to avoid defining symbols to run such things as CGS4 and the various UKT photometers ******************************************************************************* By this point you should be able to type @ukirtcom_dir:define_startups and see no errors. Check that the symbol ircam3_sim is now available ******************************************************************************* 11. In ukirtcom_dir:run_pckg.com add a line to remove any attempt to start up local adam if you don't have a local version $ IF P1 .EQS. "L" THEN P1 := "" 12. On the tape as supplied from JACH a number of setup files were found to be missing. The ones identified so far were found in disk$ancildata:[alice_data.exec] & disk$ancildata:[alice_data.config] ******************************************************************************* If you haven't already done so, execute @ssc:login and then type xdisplay This will tell the screen task where to point its display. At this point you should be able to type ircam3_sim and the SMS menus will come up and load all the tasks. The current tasks are ALD, SCREEN, IRCAM, SIGNAL, VA, ALF, AIM & EXECMAKER If the tasks don't load properly, check for any error messages in the SMS scrolling window. A problem was encountered on GXSEG2 when parts of the standard obseving system were also loaded. GXSEG2 exceeded it's global page file limit and this caused the IRCAM tasks to fail to load. ******************************************************************************* 13. List all execs from the relevant menu and then chose one to execute. Execute the EXEC and make sure no error messages appear. N.B. the software can fail in confusing ways if the process running the IRCAM software does not have sufficient resources. In particular it was discovered that Fillm must be large enough. The following process quotas were found to be adequate Maxjobs: 0 Fillm: 300 Bytlm: 35000 Maxacctjobs: 0 Shrfillm: 5 Pbytlm: 0 Maxdetach: 0 BIOlm: 100 JTquota: 10000 Prclm: 32 DIOlm: 100 WSdef: 1500 Prio: 4 ASTlm: 100 WSquo: 2000 Queprio: 0 TQElm: 100 WSextent: 16400 CPU: (none) Enqlm: 3000 Pgflquo: 100000 This should be compared with what the ADAMUSER account that UKIRT uses. If any other problems are encountered then upping the process quotas to those at UKIRT may solve the problems Maxjobs: 0 Fillm: 300 Bytlm: 204800 Maxacctjobs: 0 Shrfillm: 5 Pbytlm: 0 Maxdetach: 0 BIOlm: 100 JTquota: 32000 Prclm: 100 DIOlm: 100 WSdef: 1280 Prio: 4 ASTlm: 900 WSquo: 2560 Queprio: 0 TQElm: 100 WSextent: 5120 CPU: (none) Enqlm: 500 Pgflquo: 180000 14. ADAMNET This is the standard adamnet process as distributed by STARLINK. It is needed to control the TEL d-task from the IRCAM control system if they are running on different nodes. ADAMNET must be started both on the node running the IRCAM software and on the node running the TEL d-task. A command file is available to start this detached process. Rebuilding the system _____________________ The following sections describe all stages that were gone through to rebuild the entire ALICE / IRCAM software system 1. Login and type ADAMSTART ADAMDEV UKIRTSTART 190 ! or whatever software plane you require 2. To rebuild the ALICE system type @ukirtcom_dir:alice_setup This defines a number of logical names etc, in particualr the directories where the Transputer ADAM libraries can be found and the copy of VMS "make" that the bulk of the software uses ******************************************************************************* N.B. The alice_setup procedure defines a symbol TADAMDEV that in turn executes a command procedure in ukirt_seed:[transputer.fsys.com]. This command procedure initialises the CAPLIN software by executing @C3$DIR:COMMAND INIT On UKIRT C3$DIR is a system logical pointing to SYS$SYSDEVICE:[CAPLIN] This direcory does not exist on GXSEG0 so this line has been commented out. A copy of the relevant software is included in ukirt_seed:[caplin] but is not executed as 1) the licence agreement is not yet clear 2) we are not expecting to develop transputer code ******************************************************************************* 3. Rebuild the Alice d-task ALD a) set def to ukirt_ald b) check ald_integrate.for to see how ut_start and ut_end are being calculated. If the code has come from Hawaii then you will find that +10 hours is being added to the Vax clock time. Comments can be found in the code explainng this. Insert the correct conversion from Vax time to UT. c) check parameter if_hitime in ald.ifl. This should be set to F(ALSE). If it is set to TRUE then again the code will be assumed to be running in Hawaii and the parameters ut_date and idate that eventually get into the file headers will be wrong. c) type make This will remake the object library, relink the task and compile the IFL file then copy the executeables to ukirt_exe. N.B. At first attempt "make" crashed with access violations. It was discovered that this was due to the ownership of the files not being set correctly. If similar problems are encountered, check the ownership of all the files involved. 4. Rebuilding the SCREEN task - READ COMPLETELY BEFORE STARTING set def to screen_dir @logicals To build this task you need to use LIBMAINT so execute ssc:login then type LIBMAINT then a) compifl screen b) olbcre screenlib //extend c) @screen_link The linking process will generate numerous warnings about various MON routines. MON is not needed in the IRCAM system so these routines should never be called. However, it was found that the resultant exe crashed in devinit. For this reason it was decided to use a modified JCMT screen task (from which the UKIRT one was derived) which is a) an i-task b) makes no reference to MON The original UKIRT task was copied to a directory called ukirt_screen.dir and the new source placed in screen.dir To rebuild a) compifl screen b) olbcre screen c) @screen_link N.B. it is not neccessary to copy the exe to ukirt_exe. The screen task is run from it's own directory 5. Build create_decwterm Set def to screen_dir fort create_decwterm @create_decwterm_link This program is used to create the decterm that the screen task will write it's display into 6. Building the IRCAM task This section will change considerably when the WHT specific IRCAM task is delivered. It is included here for completeness a) check that ieee_busdir is defined b) check that ukirt_lib:io_lib exists c) set def ukirt_ircam d) @logicals e) fort ircam f) olbcre ircamlib g) @ircam_link h) compifl ircam i) copy exe and ifc files to ukirt_exe 7. Building the SIGNAL task a) set def ukirt_signal b) fort signal c) compifl signal d) @signal_link e) Copy exe and ifc files to ukirt_exe 8. Building the VA task Rebuilding this task proved a little involved as it was found that the VA task links against files in a directory pointed to by INMOSNET. This logical is not apparently defined on the JACH machines. On REVAXD at ROE the directory is sys$sysdevice:[inmos_network.]. The procedure adopted finally was a) define the following logicals define/trans=(term,conc) inmosnet $1$dua1:[ukirt_seed.inmos_network.] define qtsys$dir $1$dua1:[ukirt_seed.caplin.tsys017] define tsys$dir $1$dua1:[ukirt_seed.caplin.tsys017] b) Create subdirectories under ukirt_seed as follows $1$dua1:[ukirt_seed.inmos_network.objects.ucx] c) copied all object files from ROE that were found in the directory sys$sysdevice:[inmos_network.objects.ucx] into the directory created in b) d) edited ukirt_seed:[transputer.fsys.noddy_io]noddy_io.opt to reflect the location of the ucx libraries at RGO e) Typed make in ukirt_va 9. Building the EXECMAKER task Make sure you have executed adamdev before attempting to compile execmaker a) fort execmaker b) olbcre em_lib c) compifl execmaker d) @execmaker_link e) copy exe and ifc files to ukirt_exe 10. Building the ALF task To force rebuilding of most of the components of this task, a new copy of alf_common.inc was created by copying the old version. Then simply type make in ukirt_alf A number of changes were subsequently made to the ALF task to ensure that all the headers neccessary for loading files into the La Palma archive were available. The files modified were alf.ifl alf_puticonfig alf_putconfig makefile. and two new files were added alf_putioconfig alf_putaconfig 11. Building the AIM task This is described in two sections. The first describes how to build the standard AIM as used at UKIRT. The second how to build the WHT specific task that talks to the WHT TEL d-task rather than the UKIRT TEL d-task Building the standard AIM task ______________________________ a) set def to ukirt_aim b) define/job tcv_dir ukirt_root:[tel.misc.tcv] (I've not yet discovered where in the ukirt startups this should be defined) c) create a new copy of aimcom.inc to force recompilation of everything d) Type make Building the WHT specific AIM task __________________________________ The main extra step here is to replace the UKIRT TELU library with the RGO one. (Hopefully in future the two libraries can be standardised) It is important to check each time a new release of the ALICE / IRCAM software is received from UKIRT that any changes to TELU are compatible with the changes made for the WHT and that the changes are then merged correctly. The steps involved in upgrading from the 172 plane version to the 190 plane version are described in detail here. Each upgrade will have different requirements however so the steps described here should just be regarded as guidelines. a) the routines in TELU that were modified to support the WHT were telu_get_system telu_get_target telu_offset telu_offset_both telu_select_beam telu_set_guiding telu_set_simu telu_set_target telu_slew b) the routines changed between 172 and 190 by UKIRT were telu_get telu_get_offsets Neither of these changes impacted on the WHT TEL task and neither overlapped with the routines in a) c) In the 190 plane copies were made of telu.cmn, telu.olb, telu.tlb d) copy telu.cmn from 172 plane to 190 plane e) In the 190 telu directory type @logical f) Extract each of the routines in a) from the 172 library, copy them to the telu 190 directory then replace them in the 190 libraries g) In the 190 plane type olbcre telu. (This step is neccessary since the common block is different for the WHT, by recreating the olb ALL routines will be recompiled not just the ones that have been changed) h) copy the new telu.olb up one directory to ukirt_lib i) set def to ukirt_aim j) define/job tcv_dir ukirt_root:[tel.misc.tcv] (I've not yet discovered where in the ukirt startups this should be defined) k) create a new copy of aimcom.inc to force recompilation of everything (if this is what you want to do) l) Edit aim.ifl and replace the default definitions of teltask and telcom_task with suitable defaults for the WHT e.g. GXSEG1::TEL (UKIRT has two TEL tasks, TELD and TELCOM, the functions of both are handled by the WHT TEL d-task and the TCS) m) Type make n) To make sure you get the new definitions for the tel task parameters when AIM is loaded, delete any version of aim.sdf that may exist in the directory pointed to by ircam_config. Alternatively, once AIM is loaded set the parameters then kill and reload the task. The reason for this is that the vpath for these parameters is current,default. 12. After rebuilding the WHT version of AIM you should be able to control the WHT TEL d-task. To check this, load the TEL d-task and the TCS and then load the IRCAM software. You should see a message from the AIM task that it has succesfully located and connected to the TEL d-task when it loads. You should now be able to create and run an EXEC. The EXEC commands supported are ARC Configure and take an ARC observation BIAS Configure and take a BIAS observation BREAK Break the current EXEC (resume with "resume_EXEC") CONFIG name Adopt named configuration DARK Configure and take a DARK observation DATUM device Datum the named device DO n exec_name Perform exec_name n times DRsomething Send command to data reduction system ENDGROUP Stop grouping OBJECT and SKY observations FLAT Configure and take FLAT observation GUIDE Turn autoguiding on NAME object_name Set the object name for subsequent observations NOGUIDE Turn autoguiding off OBJECT Configure and take OBJECT observation SET ARC Set to ARC configuration (as OBJECT) SET BIAS Set to BIAS configuration SET DARK Set to DARK configuration SET FLAT Set to FLAT configuration SET OBJECT Set to OBJECT configuration SET SKY Set to SKY configuration SKY Configure and take SKY observation STARTGROUP Group subsequent OBJECT and SKY observations TARGETSLEW name Slew telescope to named object, then break TARGETWAIT name Load coordinates of object to "Next", then break TEL beam (guiding) Nod telescope to beam and set autoguiding on or off (only main beam is supported) TOFF RA_off DEC_off Move telescope to given offsets WAIT secs Wait specified seconds before continuing EXEC Basically, all EXEC commands are supported aprt from those that control the UKIRT chopping secondary or the UKIRT cross-head 13. GETDAY This program is run when the ircam software is loaded. It's task is to get the current UT day and generate symbols that are used later to construct the directory names that the data will be written into. It's significance is that it sets the directory names to the current UT day. On Hawaii the UT day increments at 2 pm. This means that all the files from one nights observing appear in a single directory. If this program was modified for la Palma then at midnight an observers data could start getting written into a new directory if the system was shut down and restarted after midnight. i.e. a single night's observing would get split between two directories. It is proposed that this program is left as is. In this case all an observers data will appear in one directory no matter how often they start and stop the IRCAM software Examples ________ 1. Observer starts at 16.00 hours on 16 Nov 1994 Directories will get created with names like [.i19941117]. All data taken up to 14.00 on 17 Nov will get written to this one directory even if system is stopped and restarted. 2. Engineer starts at 13.00 hours on 17 Nov 1994 and shuts down at 15.00 Data will go into directories [.i19941117] until system is shut down. If system is restarted after 15.00 then this data will get written to [.i19941118] 14. ALICENET This process is needed if it is required to talk to the real transputer system. I have called the process ALICENET to distinguish it from the standard adamnet process described above. Unfortuneately, the IRCAM system calls this process adamnet and the image that runs is adamnet.exe. However, IT IS A COMPLETELY DIFFERENT TASK TO THE STANDARD ADAMNET PROCESS. The same name was presumeably adopted as it performs the same functions for transputer adam as standard adamnet provides for Vax adam. It's connections are implemented using TCP/IP rather than Decnet however. It is started by the loadtasks procedure in ircam.icl by spawning a dcl sub process To rebuild alicenet a) set def ukirt_seed:[trasputer.csys.adamnet] b) @setup c) make 15. IRCAM3LIST This may be a useful program to run at the end of an observing run. It creates a file of the observations contained in a single directory i.e. a type of log. It is a figaro program. Refer to the figaro programmer's manual if the instructions below are too cryptic a) fort ircam3list b) figaro c) figdev d) define the logical nag_lib e.g. define/job nag_lib $1$dua1:[nag]nag.olb e) if one doesnt already exist, create a commands.dat file in the directory holding the source code with the entry ircam3list ircam3list f) fig ircam3list,slalib_dir:slalib/olb g) crepar ircam3list To run the program do something like define figaro_prog_u ircam3list :== $figaro_prog_u:ircam3list ircam3list Creating a new software plane _____________________________ These are temporary instructions as there are some peculiarities with the IRCAM command files that I haven't yet got to the bottom of 1. To create a new plane @ukirtcom_dir:create_tree This may give errors concerning insufficient privilege. If this happens give yourself bypass privilege 2. ukirtstart This should put the new plane in the logical name search list. It often appears to fail and keeps prompting you for the plane you want but doesn't let you make the choices it says are available. I think this is due to having planes that are not consecutive numbers. e.g. plane 190 & 195 exist but not 191-194. After running it check what the definition of ukirt_root is. 3. To remove a plane from the search list or select a particular plane use the symbols remove and select Is the system working ? _______________________ We are only just beginning to understand how the ALICE / IRCAM system works in detail so this section is only preliminary. It gives examples of things to check if the system is not working and sets out what the system ought to look like when it is working properly. 1. The first thing loaded after typing IRCAM3_DEV is the ALICE OCCAM software. This is down loaded through the B300 and then keeps a window on the Vax updated with information from the OCCAM core software. You should see messages like this on loading ADAM version 2.1 available Enter a unique user id (dir gives list of existing ones): alice Executing ALICE_CONFIG, please wait ... C004 linkswitches reset. TRAM slot 1 link 0 to EDGE 3 1 0 2 5 5 0 2 0 2 5 5 0 TRAM slot 9 link 0 to EDGE 2 1 0 2 28 4 0 2 0 2 4 28 0 TRAM slot 9 link 3 to EDGE 9 2 0 2 29 30 0 1 0 2 30 29 0 ALICENET configured. Executing ALICE_OCCAM, please wait ... The ALICE_OCCAM screen will contain the following if all is well ALICE occam V1.07 parameters and messages System initialised 12:53:29 11/18/1994 NREADS ARRAY DATA READ INT EXPOSURES LINEARIZE SCALED NSTRIPS REALS MIN VAL NCYCLES SUBTR MAX VAL ARRAY AREA Integration : Message > System up and running. If this doesn't happen then there is probably a fault in the communications through the B300 or there is a hardware fault on one of the TRAMs Check the following Do the link lights on link 0 light up when the code is loading. If not then the OCCAM code is not getting to ALICE. Check the configuration of the B300 via it's terminal port. If this is correct then check the UCX database on the Vax. If the link light comes on and the transmit receive lights flash then code is being down loaded. This may indicate a fault with on of the transputers. 2. If you get past this stage then the SMS window should display the following messages SMS image starting ... IRCAM - ALICE (C) system Loading UKIRT_EXE:ALD into ALD Searching for last integration, please wait... Loading SCREEN_DIR:SCREEN into IRCAM_SCN --- Loading ALICE transputer software. --- Creating DCL subprocess CTRL/Y will now abort a DCL command and return to ICL %DCL-S-SPAWNED, process WHIRCAM_1 spawned %DCL-S-SPAWNED, process WHIRCAM_2 spawned Everything set up, waiting for messages %DCL-S-SPAWNED, process WHIRCAM_3 spawned Waiting 5 seconds Booting root transputer... Loading UKIRT_EXE:IRCAM into IRCAM Simulating connection to IRCAM motors Loading SIGNAL into SIGNAL Loading UKIRT_EXE:VA into VA Loading UKIRT_EXE:ALF into ALF . . . --- Software loaded and configured. Please type CTRL/R to refresh screen --- The tasks whircam_1, _2 and _3 are important. (Their names may be different depending on what account the software is run from. If it was account FRED you would get tasks FRED_1 etc.) whircam_1 runs the alicenet process that talks to the transputer adam code whircam_2 and 3 run the inmos iserver task which allow communications on links 0 and 2 of the B300 To check if all the communications have been set up correctly, run UCX and issue the command show device. You should see 5 "bg" devices. Three of these will be connnected top remote port 4047. These are the iserver processes talking to the B300. One of the others will be to port 1416. This is used by the VA task to transfer data from ALICE . The final one will be connected to port 1414. This is used by the alicenet process to send and receive transputer adam messages. ================== RFC 822 Headers ================== Date: Thu, 15 Dec 1994 17:21:18 GMT Message-Id: <94121517211830@mail.ast.cam.ac.uk> From: cjm@mail.ast.cam.ac.uk (Chris Mayer) To: jmb@lpve.ing.iac.es Subject: Latest doc X-VMS-To: SMTP%"jmb@lpve.ing.iac.es" X-VMS-Cc: CJM