This chapter describes how to retrieve and install ready-built libraries and modules from the asis01 server at CERN. More details on asis01 can be found in section .
Compressed tar files are kept in the directory cernlib/@sys/pro/tar, where @sys should be replaced by the Transarc name for your system, e.g. rs_aix32 for the RS6000 running AIX 3.2. Examples of the Transarc naming convention are given in table on page . This directory contains a number of files with the extension .contents, each of which describes the contents of the corresponding file with extension .tar.gz.
N.B. the tar files are only created when a release is made (typically a few days after the release). If you wish to install a version of the CERN library that has not yet been released please follow the instructions given in .
Procede as follows:
Welcome message
ftp> cd 93d/tar 250- 250- This directory contains compressed files of CERNlib release 93d for HP/UX 9.0 250- 250- Files ending in .tar.gz have been compressed using gzip. gzip/gunzip for 250- HP/UX are available in this directory in the gzip.tar file. Get this first 250- and untar in a directory in the search path. Also take a new copy of 250- plitar; this will use gzip -d ( equivalent to gunzip ) to uncompress files 250- ending in .tar.gz. 250- 250- 250-Please read the file README 250- it was last modified on Thu Nov 4 18:16:40 1993 - 83 days ago 250 CWD command successful. ftp>
The complete sources can be obtained by retrieving and unpacking only the cernsrc.tar.gz file. Assuming that you wish to retrieve individual sources, procede as follows:
One may obtain all of the libraries or individual sets as shown above. To obtain individual libraries only, procede as follows:
One may obtain all of the binaries as shown above. shown above. To obtain individual binaries only, procede as follows:
As the compressed tar files are only produced following a release of the complete libraries, it may be necessary to retrieve individual source files, e.g. if one wishes to install a new version of a library or modules. In this case, one should transfer the appropriate .car and .cra files.
N.B. please also check ensure that you copy the latest versions of any files in the mgr tree.
Retrieving individual source files
zfatal:/home/cp/jamie/hepdb (10) cd /tmp zfatal:/tmp (11) ftp asis01.cern.ch Connected to asis01.cern.ch. 220 asis01 FTP server (Version 2.0WU(14) Fri Sep 17 15:39:37 MET DST 1993) ready . Name (asis01.cern.ch:jamie): anonymous 331 Guest login ok, send your complete e-mail address as password. Password: 230- ________________________________________ 230- Application Software Installation Server 230- ________________________________________ 230- 230- Welcome to the ASIS ftp server, developed by the CERN Computing and 230- Networking Division to serve the High Energy Physics research community. 230- 230- ftp clients may abort due to improper handling of such introductory 230- messages. A dash (-) as the first character of your pw will suppress it. 230- 230- The CERNlib software, located in the "cernlib" directory, is covered by 230- CERN copyright. Before taking any material from this directory, please 230- read the copyright notice "cernlib/copyright". 230- 230- Please contact cernlib@cernvm.cern.ch for site registration. General 230- support questions should be addressed to asis-support@asis01.cern.ch. 230- 230 Guest login ok, access restrictions apply. ftp> ftp> cd cernlib/share/94a/src/car 250---------------------------------------------------------------------------- 250- CERNlib release 94a: scheduled date March 1994 250- 250- directory /cern/94a/src/car containing Patchy sources *.car 250- Patchy cradles *.cra 250- 250- compressed Patchy sources *.zcar 250---------------------------------------------------------------------------- 250- 250 CWD command successful. ftp> ftp> dir paw.car 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. -rw-r--r-- 1 cernlib software 4527809 Feb 1 10:47 paw.car 226 Transfer complete. ftp> get paw.car 200 PORT command successful. 150 Opening ASCII mode data connection for paw.car (4527809 bytes). 226 Transfer complete. 4648428 bytes received in 44.68 seconds (101.6 Kbytes/s) ftp>
N.B. as many of the CERN library packages depend on each other, you may require new versions of other packages as well.
The CERNLIB installation procedures perform the following steps:
The complete functionality of PATCHY is described in the PATCHY reference manual [5]. An introductory guide is given in the Patchy for beginners guide [6].
Rather than attempt to describe all of the features of PATCHY here, we will take the specific example of the HBOOK package.
To install HBOOK, two files are required. These are the HBOOK source file, typically kept in /cern/pro/src/car/hbook.car on Unix systems at CERN, and the so-called cradle.
The cradle for HBOOK, in /cern/pro/src/car/hbook.cra, is as follows.
Cradle for the installation of HBOOK
+EXE. +USE,*HBOOK,$PLINAME. +ASM,24. +USE,QXNO_SC ,T=I,IF=QX_SC. +USE,QX_SC ,T=I,IF=QXNO_SC. +USE,QXCAPT ,T=I,IF=QXNO_SC,QX_SC. +PAM,11,T=C,A.$CERN_ROOT/src/car/hbook +QUIT.
Other cradles may be more complicated, but this will help describe the basic ideas. Let us examine each line of this cradle in turn.
This tells YPATCHY to write out all 'material', typically source code, that has been selected. The material is written to the so-called Assembled Material file, or ASM file for short. Different streams exist for various types of material, as described below. They are all initially connected to the default stream on unit 21.
This, and other +USE statements, select the material of interest. Multi-level selection is possible. For example, *HBOOK will trigger all of the things in the hbook.car file in the PATCH *HBOOK.
$PLINAMEis set by the installation procedures. Typically, it is the machine type, e.g. DECS for DECstation, IBMRT for RS6000 etc.
By convention, an asterix is used to indicate a so-called pilot patch, which will contain other +USE statements. The flags selected by $PLINAMEare normally used to select machine specific features, as shown below.
Flagging machine specific features using PATCHY
+SELF,IF=IBMRT. * * RS 6000 specific code * +SELF.
The same effect can be achieved using the C preprocessor, as is shown below.
Flagging machine specific features with C preprocessor statements
#ifdef IBMRT /* RS 6000 specific code */ #endif /* IBMRT */
This tells PATCHY to establish a new output stream. By default, all material will be written to the stream 21, which is automatically initialised and does not require a +ASM directive to establish it. There are rules/conventions as to which streams are used for what:
The convention adopted is
+SELF,IF=QXCAPT. int CDHSTC(hnf) +SELF,IF=QXNO_SC. int cdhstc(hnf) +SELF,IF=QX_SC. int cdhstc_(hnf) +SELF. char *hnf;
This directive tells PATCHY to read the 'card' format file which contains the HBOOK source.
All done.
Prior to installing the CERNLIB software from scratch, you must install PATCHY. You may obtain the PATCHY installation kit from as shown below.
In most cases, the PATCHY binaries can be retrieved from .cern.ch as shown below. It may be necessary to rebuild the modules if there are compiler/shared library incompatibilities etc.
Retrieving the modules from asis
zfatal:/home/cp/jamie (4) ftp asis01.cern.ch Connected to asis01.cern.ch. 220 asis01 FTP server (Version 2.0WU(14) Fri Sep 17 15:39:37 MET DST 1993) ready . Name (asis01.cern.ch:jamie): anonymous 331 Guest login ok, send your complete e-mail address as password. Password: 230- ________________________________________ 230- Application Software Installation Server 230- ________________________________________ 230- 230- Welcome to the ASIS ftp server, developed by the CERN Computing and 230- Networking Division to serve the High Energy Physics research community. 230- 230- ftp clients may abort due to improper handling of such introductory 230- messages. A dash (-) as the first character of your pw will suppress it. 230- 230- The CERNlib software, located in the "cernlib" directory, is covered by 230- CERN copyright. Before taking any material from this directory, please 230- read the copyright notice "cernlib/copyright". 230- 230- Please contact cernlib@cernvm.cern.ch for site registration. General 230- support questions should be addressed to asis-support@asis01.cern.ch. 230- 230 Guest login ok, access restrictions apply. ftp> cd cernlib/rs_aix32/patchy/4.15/bin 250 CWD command successful. ftp> ls 200 PORT command successful. 150 Opening ASCII mode data connection for file list. fcasplit ycompar yedit yfrceta yindex yindexb ylist ylistb ypatchy ysearch yshift ytobcd ytobin ytoceta 226 Transfer complete. ftp> ftp> Local directory now /home/cp/jamie/patchy/bin ftp> bin 200 Type set to I. ftp> prompt off Interactive mode off. ftp> mget * 200 PORT command successful. 150 Opening BINARY mode data connection for fcasplit (20539 bytes). 226 Transfer complete. 20539 bytes received in 0.8578 seconds (23.38 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for ycompar (73414 bytes). 226 Transfer complete. 73414 bytes received in 1.1 seconds (65.17 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for yedit (102039 bytes). 226 Transfer complete. 102039 bytes received in 0.6132 seconds (162.5 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for yfrceta (96265 bytes). 226 Transfer complete. 96265 bytes received in 0.7846 seconds (119.8 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for yindex (1299 bytes). 226 Transfer complete. 1299 bytes received in 0.05103 seconds (24.86 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for yindexb (79914 bytes). 226 Transfer complete. 79914 bytes received in 0.9767 seconds (79.91 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for ylist (1294 bytes). 226 Transfer complete. 1294 bytes received in 0.02697 seconds (46.85 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for ylistb (78498 bytes). 226 Transfer complete. 78498 bytes received in 0.9826 seconds (78.02 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for ypatchy (161238 bytes). 226 Transfer complete. 161238 bytes received in 0.9318 seconds (169 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for ysearch (88551 bytes). 226 Transfer complete. 88551 bytes received in 0.9307 seconds (92.91 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for yshift (93915 bytes). 226 Transfer complete. 93915 bytes received in 1.032 seconds (88.9 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for ytobcd (73968 bytes). 226 Transfer complete. 73968 bytes received in 0.4764 seconds (151.6 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for ytobin (84577 bytes). 226 Transfer complete. 84577 bytes received in 0.533 seconds (155 Kbytes/s) 200 PORT command successful. 150 Opening BINARY mode data connection for ytoceta (88839 bytes). 226 Transfer complete. 88839 bytes received in 0.4553 seconds (190.5 Kbytes/s) ftp> quit 221 Goodbye. zfatal:/home/cp/jamie (5)
To install PATCHY from the installation kit, first retrieve the required files from .cern.ch as shown below.
Retrieving the PATCHY installation kit for Unix systems
zfatal:/home/cr/cernlib (415) ftp asis01 Connected to asis01.cern.ch. 220 asis01 FTP server (Version 2.0WU(14) Fri Sep 17 15:39:37 MET DST 1993) ready . Name (asis01:cernlib): anonymous 331 Guest login ok, send your complete e-mail address as password. Password: 230- ________________________________________ 230- Application Software Installation Server 230- ________________________________________ 230- 230- Welcome to the ASIS ftp server, developed by the CERN Computing and 230- Networking Division to serve the High Energy Physics research community. 230- 230- ftp clients may abort due to improper handling of such introductory 230- messages. A dash (-) as the first character of your pw will suppress it. 230- 230- The CERNlib software, located in the "cernlib" directory, is covered by 230- CERN copyright. Before taking any material from this directory, please 230- read the copyright notice "cernlib/copyright". 230- 230- Please contact cernlib@cernvm.cern.ch for site registration. General 230- support questions should be addressed to asis-support@asis01.cern.ch. 230- 230 Guest login ok, access restrictions apply. ftp> ftp> cd cernlib/rs_aix32/patchy/4.15/src 250-Please read the file README 250- it was last modified on Tue Nov 30 13:19:59 1993 - 63 days ago 250 CWD command successful. ftp> ftp> ls 200 PORT command successful. 150 Opening ASCII mode data connection for file list. README make_patchy p4boot.sh0 p4inceta rceta.sh 226 Transfer complete. ftp> ftp> get README 200 PORT command successful. 150 Opening ASCII mode data connection for README (4844 bytes). 226 Transfer complete. 4963 bytes received in 0.03007 seconds (161.2 Kbytes/s) ftp> get make_patchy 200 PORT command successful. 150 Opening ASCII mode data connection for make_patchy (4434 bytes). 226 Transfer complete. 4548 bytes received in 0.02672 seconds (166.2 Kbytes/s) ftp> get p4boot.sh0 200 PORT command successful. 150 Opening ASCII mode data connection for p4boot.sh0 (12888 bytes). 226 Transfer complete. 13335 bytes received in 0.1023 seconds (127.3 Kbytes/s) ftp> get rceta.sh 200 PORT command successful. 150 Opening ASCII mode data connection for rceta.sh (8598 bytes). 226 Transfer complete. 8877 bytes received in 0.03805 seconds (227.8 Kbytes/s) ftp> bin 200 Type set to I. ftp> get p4inceta 200 PORT command successful. 150 Opening BINARY mode data connection for p4inceta (1573200 bytes). 226 Transfer complete. 1573200 bytes received in 8.896 seconds (172.7 Kbytes/s) ftp> ftp> quit 221 Goodbye. zfatal:/home/cr/cernlib (416)
We now ensure that the variable CERN is correctly defined and then run make_patchy.
Running make_patchy
chmod +x make_patchy export CERN=/cernlib/cern ./make_patchy
This will then launch the installation and verification procedure, resulting in the following files:
The PATCHY modules may be copied from VXCERN as shown below.
Copying the PATCHY modules from VXCERN
COPY VXCERN::CERNVAX:[PATCHY.PRO.EXE]*.* * ! VAX versions COPY VXCERN::CERNAXP:[PATCHY.PRO.EXE]*.* * ! AXP (Alpha) versions
On VAX/VMS systems, the installation kit is available on VXCERN as shown below.
N.B. an installation kit is only available for VAX systems, i.e. there is no Alpha installation kit.
Copying the PATCHY installation kit from VXCERN
VSCLIB? set def [.patchy] VSCLIB? copy vxcern::cernvax:[patchy.src.vaxvms]*.* */log %COPY-S-COPIED, VXCERN::CERNVAX:[PATCHY.SRC.VAXVMS]P4BOOT.SH0;2 copied to DISK$USER1:[JAMIE.PATCHY]P4BOOT.SH0;2 (23 blocks) %COPY-S-COPIED, VXCERN::CERNVAX:[PATCHY.SRC.VAXVMS]P4INCETA.CET;8 copied to DISK$USER1:[JAMIE.PATCHY]P4INCETA.CET;8 (3235 blocks) %COPY-S-COPIED, VXCERN::CERNVAX:[PATCHY.SRC.VAXVMS]PATCHY.COM;4 copied to DISK$USER1:[JAMIE.PATCHY]PATCHY.COM;4 (3 blocks) %COPY-S-COPIED, VXCERN::CERNVAX:[PATCHY.SRC.VAXVMS]RCETA.SH;3 copied to DISK$USER1:[JAMIE.PATCHY]RCETA.SH;3 (16 blocks) %COPY-S-COPIED, VXCERN::CERNVAX:[PATCHY.SRC.VAXVMS]README.DOC;3 copied to DISK$USER1:[JAMIE.PATCHY]README.DOC;3 (10 blocks) %COPY-S-NEWFILES, 5 files created
Now customise PATCHY.COM specifying the source, work and target directories. The modules are then built by typing @PATCHY.
Result of running PATCHY.COM
Directory DISK$USER1:[JAMIE.PATCHY.EXE] YCOMPAR.EXE;1 YEDIT.EXE;1 YFRCETA.EXE;1 YINDEX.EXE;1 YLIST.EXE;1 YPATCHY.EXE;1 YSEARCH.EXE;1 YSHIFT.EXE;1 YTOBCD.EXE;1 YTOBIN.EXE;1 YTOCETA.EXE;1 Total of 11 files.
Below we describe two scenarios. The first is for a Unix system at CERN, where the asis tree is available via NFS or AFS. The second is for a remote system or for one where the asis tree is not available.
In the following examples, the CERNLIB tree is available via AFS. The procedure is identical for the case when the CERNLIB tree is mounted via NFS.
Accessing the CERNLIB tree via AFS
\footnotesize{ zfatal:/hepdb/cdchorus (185) ls -l /cern total 0 lrwxrwxrwx 1 root system 26 Dec 7 21:02 93c -> /afs/cern.ch/asis/cern/93c lrwxrwxrwx 1 root system 26 Dec 7 21:02 93d -> /afs/cern.ch/asis/cern/93d lrwxrwxrwx 1 root system 26 Dec 7 21:02 94a -> /afs/cern.ch/asis/cern/94a lrwxrwxrwx 1 root system 26 Dec 7 21:02 WWW -> /afs/cern.ch/asis/cern/WWW lrwxrwxrwx 1 root system 26 Dec 7 21:02 cmz -> /afs/cern.ch/asis/cern/cmz lrwxrwxrwx 1 root system 26 Dec 7 21:02 mad -> /afs/cern.ch/asis/cern/mad lrwxrwxrwx 1 root system 26 Dec 7 21:02 man -> /afs/cern.ch/asis/cern/man lrwxrwxrwx 1 root system 26 Dec 7 21:02 new -> /afs/cern.ch/asis/cern/new lrwxrwxrwx 1 root system 26 Dec 7 21:02 old -> /afs/cern.ch/asis/cern/old lrwxrwxrwx 1 root system 29 Dec 7 21:02 patchy -> /afs/cern.ch/asis/cern/patchy lrwxrwxrwx 1 root system 28 Dec 7 21:02 phigs -> /afs/cern.ch/asis/cern/phigs lrwxrwxrwx 1 root system 26 Dec 7 21:02 pro -> /afs/cern.ch/asis/cern/pro lrwxrwxrwx 1 root system 28 Dec 7 21:02 share -> /afs/cern.ch/asis/cern/share }
Let us assume that we wish to reinstall the CERNLIB software in the /cernlib/cern tree. We first create these directories, and then a subdirectory for the version that we wish to install. We procede as follows:
Setting up the directory tree
mkdir /cernlib/cern mkdir /cernlib/cern/93d mkdir /cernlib/cern/93d/bin mkdir /cernlib/cern/93d/lib mkdir /cernlib/cern/93d/log mkdir /cernlib/cern/93d/src mkdir /cernlib/cern/93d/doc
We now set up a number of links.
Creating links into the AFS tree
cd /cernlib/cern/93d ln -s /cern/93d/include include ln -s /cern/93d/mgr mgr cd src ln -s /cern/93d/src/car car ln -s /cern/93d/src/cmz cmz ln -s car cra
In fact, only the links for the car and cra directories are required for what follows.
Tailoring the .profile of the cernlib account
PATH=/cern/pro/bin:$PATH; export PATH export CERN=/cernlib/cern export CERN_LEVEL=93d export PLISTA=DEV . $CERN/$CERN_LEVEL/mgr/plienv.sh
We then reexecute the .profile and switch to the CERN manager directory.
Preparing to build the CERN software
. .profile cd $CERN/$CERN_LEVEL/mgr
We can now build the complete CERN software by typing make all.
Building the CERN software
make -n all ... makepack -p kerngen makepack -s -c kerngen ... makepack -s -c kernasw makepack -l kernlib makepack -p cspack makepack -s cspack makepack -l packlib -c cspack ... makepack -p isajetd rm -r /cernlib/cern/93d/src/cfs/isajetd makepack -p pdflibd rm -r /cernlib/cern/93d/src/cfs/pdflibd
Various components can be built using the syntax make target. Thus, to build the PAW modules one would type make paw. As the standard Unix make is employed, all the dependancies are known and intermediate components only rebuilt if required.
The following extract from the makefile indicates which components can be rebuilt separately or together.
Extract from cernlib makefile
# ********************************************************************** # Make definitions * # ********************************************************************** # ====================================================================== # >>> General makes # ====================================================================== # all: cernset products all: cernset cernset: cernlibs cernpgm userpgm mclibs mcdoc cernlibs: kernlib packlib mathlib graflibs pawlib phtools cernpgm: dzedit fatset kuipset paw rzconv flop tree telnetg \\ zftp pawserv zserv higzconv f2h hepdbset umlog userpgm: garfield poisson mclibs: ariadne cojets eurodec fritiof herwig isajet \\ jetset lepto pdflib photos mcdoc: cojetsd eurodecd fritiofd herwigd isajetd jetsetd \\ pdflibd photosd pythiad shrlibs: scernlib smathlib sgraflib sgeant products: cmz gks historian nag # ====================================================================== # >>> Basic Libraries # ====================================================================== kernlib: kernlib.a packlib: packlib.a mathlib: mathlib.a phtools: phtools.a graflibs: graflib grafX11 grafGKS graflib: graflib.a grafX11: grafX11.a grafGKS: grafGKS.a grafDGKS: grafDGKS.a grafGL: grafGL.a grafGPR: grafGPR.a pawlib: pawlib.a scernlib: scernlib.a smathlib: smathlib.a sgraflib: sgraflib.a kernlib.a: $(LIB)/libkernlib.a packlib.a: $(LIB)/libpacklib.a mathlib.a: $(LIB)/libmathlib.a phtools.a: $(LIB)/libphtools.a graflib.a: $(LIB)/libgraflib.a grafX11.a: $(LIB)/libgrafX11.a grafGKS.a: $(LIB)/libgrafGKS.a grafDGKS.a: $(LIB)/libgrafDGKS.a grafGL.a: $(LIB)/libgrafGL.a grafGPR.a: $(LIB)/libgrafGPR.a pawlib.a: $(LIB)/libpawlib.a scernlib.a: $(LIB)/scernlib.a smathlib.a: $(LIB)/smathlib.a sgraflib.a: $(LIB)/sgraflib.a
If the CERN library directory tree is not accessible over NFS or AFS, we must first retrieve the compressed tar files containing the source (cernsrc.tar.Z) and the installation scripts (cernmgr.tar.Z).
We first connect to the asis server, as shown below.
Retrieving the CERNLIB sources and installation scripts
zfatal:/cernlib/tmp (132) ftp asis01.cern.ch Connected to asis01.cern.ch. 220 asis01 FTP server (Version 2.0WU(14) Fri Sep 17 15:39:37 MET DST 1993) ready . Name (asis01.cern.ch:cernlib): anonymous 331 Guest login ok, send your complete e-mail address as password. Password: 230- ________________________________________ 230- Application Software Installation Server 230- ________________________________________ 230- 230- Welcome to the ASIS ftp server, developed by the CERN Computing and 230- Networking Division to serve the High Energy Physics research community. 230- 230- ftp clients may abort due to improper handling of such introductory 230- messages. A dash (-) as the first character of your pw will suppress it. 230- 230- The CERNlib software, located in the "cernlib" directory, is covered by 230- CERN copyright. Before taking any material from this directory, please 230- read the copyright notice "cernlib/copyright". 230- 230- 230- Please contact cernlib@cernvm.cern.ch for site registration. General 230- support questions should be addressed to asis-support@asis01.cern.ch. 230- 230 Guest login ok, access restrictions apply. ftp>cd cernlib/rs_aix32/93d/tar 250- 250- This directory contains compressed files of CERNlib release 93d for IBM/RS6 000 250- 250- Files ending in .tar.gz have been compressed using gzip. gzip/gunzip for 250- IBM/RS6000 are available in this directory in the gzip.tar file. Get this 250- first and untar in a directory in the search path. Also take a new copy of 250- plitar; this will use gzip -d ( equivalent to gunzip ) to uncompress files 250- ending in .tar.gz. 250- 250- 250 CWD command successful. ftp> ftp> get plitar 200 PORT command successful. 150 Opening ASCII mode data connection for plitar (10951 bytes). 226 Transfer complete. 11262 bytes received in 0.06656 seconds (165.2 Kbytes/s) ftp> get cernsrc.contents 200 PORT command successful. 150 Opening ASCII mode data connection for cernsrc.contents (22467 bytes). 226 Transfer complete. 22799 bytes received in 0.2305 seconds (96.6 Kbytes/s) ftp> get cernmgr.contents 200 PORT command successful. 150 Opening ASCII mode data connection for cernmgr.contents (4937 bytes). 226 Transfer complete. 5016 bytes received in 0.01622 seconds (302 Kbytes/s) ftp> bin ftp> get cernmgr.tar.Z 200 PORT command successful. 150 Opening BINARY mode data connection for cernmgr.tar.Z (111289 bytes). 226 Transfer complete. 111289 bytes received in 0.7157 seconds (151.9 Kbytes/s) ftp> get cernsrc.tar.Z 200 PORT command successful. 150 Opening BINARY mode data connection for cernsrc.tar.Z (19319023 bytes). 226 Transfer complete. 19319023 bytes received in 118.1 seconds (159.8 Kbytes/s) ftp>
Having retrieved the installation kits, we now unpack using plitar.
Unpacking the installation procedures
zfatal:/cernlib/tmp (133) ls -l total 38048 -rw-r--r-- 1 cernlib sys 4937 Feb 1 14:05 cernmgr.contents -rw-r--r-- 1 cernlib sys 111289 Feb 1 14:06 cernmgr.tar.Z -rw-r--r-- 1 cernlib sys 22467 Feb 1 14:05 cernsrc.contents -rw-r--r-- 1 cernlib sys 19319023 Feb 1 14:08 cernsrc.tar.Z -rw-r--r-- 1 cernlib sys 10951 Feb 1 14:05 plitar zfatal:/cernlib/tmp (134) chmod +x plitar # Make 'plitar' executable zfatal:/cernlib/tmp (135) zfatal:/cernlib/tmp (135) plitar # See if it gives us any help ##====================================================================== ## ## PLITAR 93d.02 : CERN Program Library distribution utility ## Last update : 93/10/28 ## ##====================================================================== # # Syntax: plitar [ -n ] tar_options tar_file # # plitar combines tar+compress utilities to pack/unpack the files being # part of the CERNlib distribution set; the corresponding _readme file # describes the contents of each of them. Please read it beforehand. # Location of tar files and the target install directory is controlled # through environment variables CERN, CERN_LEVEL and PLITMP # # Examples: # # plitar -n xvf cernlib "non-execute" mode to display the action # plitar tvf cmz examines the CMZ compressed-tar set # plitar xvf geant installs the GEANT compressed-tar set # zfatal:/cernlib/tmp (136) echo $CERN /cernlib/cern zfatal:/cernlib/tmp (137) export CERN=/cernlib/kern zfatal:/cernlib/tmp (138) mkdir $CERN zfatal:/cernlib/tmp (139) echo $CERN_LEVEL 93d zfatal:/cernlib/tmp (140) echo $PLITMP /tmp zfatal:/cernlib/tmp (141) export PLITMP=/cernlib/tmp zfatal:/cernlib/tmp (145) plitar -n tvf cernmgr.tar.Z ##====================================================================== ## ## PLITAR 93d.02 : CERN Program Library distribution utility ## Last update : 93/10/28 ## ##====================================================================== # # ----------------------------------------------------------------------- # The 2 parameters CERN and PLITMP are environment variables # which may be changed using setenv (in C-shell) or export (in sh,ksh) # ----------------------------------------------------------------------- # # Tar files expected in PLITMP=/cernlib/tmp # Target directory CERN =/cernlib/kern # uncompress -vc /cernlib/tmp/cernmgr.tar.Z | tar tvf - zfatal:/cernlib/tmp (146) plitar xvf cernmgr.tar.Z ##====================================================================== ## ## PLITAR 93d.02 : CERN Program Library distribution utility ## Last update : 93/10/28 ## ##====================================================================== # # ----------------------------------------------------------------------- # The 2 parameters CERN and PLITMP are environment variables # which may be changed using setenv (in C-shell) or export (in sh,ksh) # ----------------------------------------------------------------------- # # Tar files expected in PLITMP=/cernlib/tmp # Target directory CERN =/cernlib/kern # uncompress -vc /cernlib/tmp/cernmgr.tar.Z | tar xvf - x 93d/mgr/93d/irs.names, 4679 bytes, 10 media blocks. x 93d/mgr/93d/dos.names, 3548 bytes, 7 media blocks. ... x 93d/mgr/yexpand, 1230 bytes, 3 media blocks.
We can now unpack the source files in the same way.
Unpacking the source files
zfatal:/cernlib/tmp (150) plitar xvf cernsrc.tar.Z ##====================================================================== ## ## PLITAR 93d.02 : CERN Program Library distribution utility ## Last update : 93/10/28 ## ##====================================================================== # # ----------------------------------------------------------------------- # The 2 parameters CERN and PLITMP are environment variables # which may be changed using setenv (in C-shell) or export (in sh,ksh) # ----------------------------------------------------------------------- # # Tar files expected in PLITMP=/cernlib/tmp # Target directory CERN =/cernlib/kern # uncompress -vc /cernlib/tmp/cernsrc.tar.Z | tar xvf - x 93d/src/car/comis.cra, 393 bytes, 1 media blocks. x 93d/src/car/wylbur.car, 1063629 bytes, 2078 media blocks. x 93d/src/car/kernvax.car, 196447 bytes, 384 media blocks. x 93d/src/car/ariadne.cra, 134 bytes, 1 media blocks. ... x 93d/src/car/pawdemo.car, 784187 bytes, 1532 media blocks. x 93d/src/car/kernsgi2.car is a symbolic link to kernsgi.car. x 93d/src/car/isajet72.car, 1226674 bytes, 2396 media blocks. x 93d/src/car/isajet72.cra, 152 bytes, 1 media blocks. zfatal:/cernlib/tmp (151)
We now add the following commands to our profile.
Tailoring the .profile of the cernlib account
PATH=/cern/pro/bin:$PATH; export PATH export CERN=/cernlib/cern export CERN_LEVEL=93d export PLISTA=DEV . $CERN/$CERN_LEVEL/mgr/plienv.sh
We then reexecute the .profile and switch to the CERN manager directory.
Preparing to build the CERN software
. .profile cd $CERN/$CERN_LEVEL/mgr
We now create 3 directories and 1 link and are then ready to start the installation.
Completing the pre-installation phase
zfatal:/cernlib/tmp (160) cd $CERN/$CERN_LEVEL zfatal:/cernlib/kern/93d (161) mkdir bin zfatal:/cernlib/kern/93d (162) mkdir lib zfatal:/cernlib/kern/93d (163) mkdir log zfatal:/cernlib/kern/93d (164) mkdir doc zfatal:/cernlib/kern/93d (165) zfatal:/cernlib/kern/93d (166) cd src zfatal:/cernlib/kern/93d/src (165) ln -sf car cra zfatal:/cernlib/kern/93d/src (166)
N.B. the source code of the package MPA is not available for distribution. For make all to work, the dummy link mpa.car in the src/car directory must be removed.
Removing dummy mpa.car file
rm /cernlib/kern/93d/src/car/mpa.car # as root if all else fails touch /cernlib/kern/93d/src/car/mpa.car
We may now rebuild the entire CERN library using make all or one component, as shown below.
Building the FATMEN module
zfatal:/cernlib/kern/93d/mgr (181) make -n fatmen [ "n" = "n" -o "n" = "bn" ] && make -n -f userlib -f grouplib -f /cernlib/kern/93d/mgr/mkf /cernlib -f /cernlib/kern/93d/mgr/mkf/geant fatmen \\ || make -n -f userlib -f grouplib -f /cernlib/kern/93d/mgr/mkf/cernlib -f /cernlib/kern/93d/mgr/mkf/geant fatmen >>/cernlib/kern/93d/log/fatmen 2>&1 makepack -p kuipc makepack -s -c kuipc makepack -o kuipc kuipc makepack -p fatmen makepack -s -c fatmen makepack -p cspack makepack -s cspack makepack -l packlib -c cspack makepack -p cdlib makepack -s cdlib makepack -l packlib -c cdlib makepack -p epio makepack -s epio makepack -l packlib -c epio makepack -p fatlib makepack -s fatlib makepack -l packlib -c fatlib makepack -p ffread makepack -s ffread makepack -l packlib -c ffread makepack -p hbook makepack -s hbook makepack -l packlib -c hbook makepack -p kapack makepack -s kapack makepack -l packlib -c kapack makepack -p kuip makepack -s kuip makepack -l packlib -c kuip makepack -p minuit makepack -s minuit makepack -l packlib -c minuit makepack -p zbook makepack -s zbook makepack -l packlib -c zbook makepack -p zebra makepack -s zebra makepack -l packlib -c zebra makepack -p kerngen makepack -s -c kerngen makepack -p kernnum makepack -s -c kernnum makepack -p kernasw makepack -s -c kernasw makepack -l kernlib makepack -l packlib makepack -o fatmen fatmen
CERNLIB software is installed on VMS systems using the CERN_ROOT:[MGR]MAKE.COM procedure. The symbol MAKE is defined as @CERN_ROOT:[MGR]MAKE by the procedure PLIENV, described on page . The following examples show how one may build library components, complete libraries or packages.
Complete libraries may be built using the syntax make target. For example, KERNLIB is built as follows:
Building KERNLIB
vxcrna:/cernlib > make -n kernlib makepack -p KERNASW makepack -s KERNASW makepack -c KERNASW makepack -p KERNNUM makepack -s KERNNUM makepack -c KERNNUM makepack -p KERNGEN makepack -s KERNGEN makepack -c KERNGEN makepack -l KERNLIB
As for the standard Unix make, the option -n tells make just to list what it would do and not actually execute the commands.
PACKLIB may be built in a similar manner, as shown below.
Building PACKLIB
vxcrna:/cernlib > make -n packlib makepack -p CSPACK makepack -s CSPACK makepack -c CSPACK makepack -p EPIO makepack -s EPIO makepack -c EPIO makepack -p FATLIB makepack -s FATLIB makepack -c FATLIB makepack -p FFREAD makepack -s FFREAD makepack -c FFREAD makepack -p HBOOK makepack -s HBOOK makepack -c HBOOK makepack -p KAPACK makepack -s KAPACK makepack -c KAPACK makepack -p KUIP makepack -s KUIP makepack -c KUIP makepack -p MINUIT makepack -s MINUIT makepack -c MINUIT makepack -p ZBOOK makepack -s ZBOOK makepack -c ZBOOK makepack -p ZEBRA makepack -s ZEBRA makepack -c ZEBRA makepack -p CDLIB makepack -s CDLIB makepack -c CDLIB makepack -l PACKLIB
Both KERNLIB and PACKLIB contain a number of components. Let us first examine how a library containing only one component is built.
Building JETSET
vxcrna:/cernlib > make -n jetset makepack -p JETSET makepack -s JETSET makepack -c JETSET makepack -l JETSET
JETSET is built in four steps:
A complex library, such as KERNLIB or PACKLIB, may be built in one go, as shown above, or component by component. The former is useful when one wishes to install a new release of CERNLIB, or install CERNLIB from scratch. The latter is more appropriate if only one or a few packages have changed.
For example, if a routine in ZEBRA has been modified, we may rebuild PACKLIB using the following steps:
Modules are built in a similar manner. For example, the HEPDB server CDSERV is built as follows:
Building the HEPDB server CDSERV
vxcrna:/cernlib > make -n cdserv makepack -p CDSERV makepack -c CDSERV makepack -o CDSERV CDSERV
Here we see that three steps are involved.
One may also build multiple modules in one go. For example, rather than rebuild all different versions of PAW individually, one may request that they are all rebuilt, as follows:
Building multiple modules
vxcrna:/cernlib > make -n pawall makepack -p PAWMDNET makepack -s PAWMDNET makepack -c PAWMDNET makepack -o PAWX11 PAWMDNET makepack -p PAWMDNET makepack -s PAWMDNET makepack -c PAWMDNET makepack -o PAWDECW PAWMDNET makepack -p PAWMDNET makepack -s PAWMDNET makepack -c PAWMDNET makepack -o PAWGKS PAWMDNET makepack -p PAWPP makepack -s PAWPP makepack -c PAWPP makepack -o PAWPP PAWPP makepack -p KXTERM makepack -s KXTERM makepack -c KXTERM makepack -o KXTERM KXTERM makepack -p PAWM makepack -s PAWM makepack -c PAWM makepack -o PAWGKS_T PAWM makepack -p PAWM makepack -s PAWM makepack -c PAWM makepack -o PAWX11_T PAWM
In this case, KXTERM is also rebuilt as it is required by PAW++.
As we are not using a true make utility on VMS systems, the installer must be aware of the dependencies of various components of CERNLIB. This has the following consequences:
N.B. if there has been no previous installation of CERNLIB on your system, see section .
All of the libraries and modules can be rebuilt using the following command file.
MAKEALL.COM
$! $! Make complete CERNLIB $! $ set noon $ save_message = f$environment("MESSAGE") $! $ warnings_from = "." $ errors_from = "." $ severe_from = "." $! $ cernlib = - "KERNLIB,MATHLIB,PACKLIB,GRAFLIB,GRAFGKS,GRAFDGKS,GRAFX11,PAWLIB" + - ",CERNPGM,USERPGM,MCLIBS,GEANT321" $ if p1 .nes. "" then cernlib = p1 $ count = 0 $ packages: $ set message 'save_message' $ package = f$element(count,",",cernlib) $ if package .eqs. "," then goto end $ write sys$output "Building ''package' at ''f$time()'" $ make 'package' $ wait 0:0:10 $ set message/nofacility/noidentification/noseverity/notext $ p_wait: $ show process/nooutput 'package' $ if $severity .eq. 0 $ then $ write sys$output "''package' complete at ''f$time()'" $ search cern:[new.log]'package'.log "*** " $! $ search/nooutput cern:[new.log]'package'.log "*** WARNING EXIT from" $ if $severity .eq. 1 then warnings_from = warnings_from + package + "." $ search/nooutput cern:[new.log]'package'.log "*** ERROR EXIT from" $ if $severity .eq. 1 then errors_from = errors_from + package + "." $ search/nooutput cern:[new.log]'package'.log "*** SEVERE ERROR EXIT from" $ if $severity .eq. 1 then severe_from = severe_from + package + "." $! $ count = count + 1 $ goto packages $ endif $ wait 0:1 $ goto p_wait $ end: $ write sys$output "CERNLIB build complete at ''f$time()'" $ set message 'save_message' $ if warnings_from .nes. "." then write sys$output - "Warnings from ''warnings_from'" $ if errors_from .nes. "." then write sys$output - "Errors from ''errors_from'" $ if severe_from .nes. "." then write sys$output - "Severe errors from ''severe_from'"
All of the PAW modules, libraries and associated packages can be rebuilt using the following command file.
Command file to rebuild PAW
$! $! Rebuild PAW $! $ set noon $ save_message = f$environment("MESSAGE") $! $ warnings_from = "." $ errors_from = "." $ severe_from = "." $! $ cernlib = "PAWLIB,GRAFLIB,GRAFGKS,GRAFDGKS,GRAFX11,KUIP,PACKLIB,PAWALL" $ if p1 .nes. "" then cernlib = p1 $ count = 0 $ packages: $ set message 'save_message' $ package = f$element(count,",",cernlib) $! $! Treat PACKLIB specially $! $ if package .eqs. "PACKLIB" $ then $ makepack -l packlib $ count = count + 1 $ goto packages $ endif $! $ if package .eqs. "," then goto end $ write sys$output "Building ''package' at ''f$time()'" $ make 'package' $ wait 0:0:10 $ set message/nofacility/noidentification/noseverity/notext $ p_wait: $ show process/nooutput 'package' $ if $severity .eq. 0 $ then $ write sys$output "''package' complete at ''f$time()'" $ search cern:[new.log]'package'.log "*** " $! $ search/nooutput cern:[new.log]'package'.log "*** WARNING EXIT from" $ if $severity .eq. 1 then warnings_from = warnings_from + package + "." $ search/nooutput cern:[new.log]'package'.log "*** ERROR EXIT from" $ if $severity .eq. 1 then errors_from = errors_from + package + "." $ search/nooutput cern:[new.log]'package'.log "*** SEVERE ERROR EXIT from" $ if $severity .eq. 1 then severe_from = severe_from + package + "." $! $ count = count + 1 $ goto packages $ endif $ wait 0:1 $ goto p_wait $ end: $ write sys$output "PAW build complete at ''f$time()'" $ set message 'save_message' $ if warnings_from .nes. "." then write sys$output - "Warnings from ''warnings_from'" $ if errors_from .nes. "." then write sys$output - "Errors from ''errors_from'" $ if severe_from .nes. "." then write sys$output - "Severe errors from ''severe_from'"
KERNLIB can be built using the command make kernlib.
MATHLIB can be built using the command make mathlib. This will execute the following commands: Building MATHLIB
vxcrna:/cernlib > make -n mathlib makepack -p LAPACK makepack -s LAPACK makepack -c LAPACK makepack -p BVSL makepack -s BVSL makepack -c BVSL makepack -p MPA makepack -s MPA makepack -c MPA makepack -p GEN makepack -s GEN makepack -c GEN makepack -l MATHLIB
PACKLIB can be built using the command make packlib. PACKLIB currently consists of the following packages:
The graphics libraries are divided into a kernel library, GRAFLIB, and package specific libraries:
These may be made using the command make target. Note that some of the packages are available in several versions. For example, versions 6.3, 7.3 and 7.4 of JETSET are all available at the time of writing. The available versions can be found as shown below.
Listing the available versions of a given package
vxcrna:/cernlib > dir cern:[new.src.car]jetset*.car Directory CERN:[NEW.SRC.CAR] JETSET63.CAR;1 JETSET73.CAR;1 JETSET74.CAR;1 Total of 3 files.
Version 7.4 of JETSET is installed by typing make jetset74.
In a number of cases, the documentation is extracted by typing make targetD, e.g. make herwig54D. If this is the case, you will find an appropriate cradle in the CERN_LEVEL:[SRC.CAR] area, e.g. herwig54D.cra.
The PAW library PAWLIB is required if you wish to build PAW or if you intend to link your own applications with the PAW routines. It is built using the command make pawlib. This will extract and compile the various components, as shown below.
Building PAWLIB
vxcrna:/cernlib > make -n pawlib makepack -p PAW makepack -s PAW makepack -c PAW makepack -p COMIS makepack -s COMIS makepack -c COMIS makepack -p SIGMA makepack -s SIGMA makepack -c SIGMA makepack -l PAWLIB
All of the following modules can be built using the syntax make target except where indicated. Some modules can be built together, e.g. the various versions of PAW.
Some of the CERNLIB modules require TCP/IP socket libraries. The list of these modules is defined by the symbol need_tcp in makepack.com. At the time of writing, this is defined as shown below.
List of modules requiring TCP/IP
$ need_tcp = ".ZFTP.ZSERV.PAWM.PAWPP.PAWSERV.TELNETG.SYSREQ.FATMEN."
The CERNLIB installation procedures attempt to chose the correct version of TCP/IP and act accordingly. This is done in the command file f$tcpip.com as follows:
Determining the TCP/IP version
$ If F$TRNLNM("TWG$ETC").nes."" Then tcpip_var="Wollongong WINTCP" $ If F$TRNLNM("MULTINET").nes."" Then tcpip_var="MultiNet TCPIP" $ If F$TRNLNM("UCX$NETWORK").nes."" Then tcpip_var="UCX TCPIP"
If you do not have one of these systems installed, then you will need to modify f$tcpip.com and makepack.com accordingly.
There are 3 areas that might require modification:
$ If pack.eqs."TELNETG" $ Then If tcppg.eqs."_W" $ Then TCPDIR="TWG$TCP:[netdist.include" $ assign/user_mode 'TCPDIR'],'TCPDIR'.sys],'TCPDIR'.net],- 'TCPDIR'.netinet],sys$library vaxc$include $ assign/user_mode 'TCPDIR'.net] net $ assign/user_mode 'TCPDIR'.arpa] arpa $ Endif $ If tcppg.eqs."_M" $ Then TCPDIR="MULTINET_ROOT:[Multinet.include" $ assign/user_mode 'RDIR'.src.cfs.cspack] arpa $ Endif $ If tcppg.eqs."_U" $ Then TCPDIR="UCX??" $ Endif $ assign/user_mode 'TCPDIR'.sys] sys $ assign/user_mode 'TCPDIR'.netinet] netinet $ Endif
Definitions for the C preprocessor
$ If tcppg.eqs."_W" Then cco=cco+"/DEF=TWG" $ If tcppg.eqs."_M" Then cco=cco+"/DEF=TGV"
Link options file for Multinet, UCX and Wollongong
:::::::::::::: vmslib_m.opt :::::::::::::: SYS$LIBRARY:vaxcrtl/share multinet_socket_library/share :::::::::::::: vmslib_u.opt :::::::::::::: SYS$LIBRARY:ucx$ipc/lib SYS$LIBRARY:vaxcrtl/share :::::::::::::: vmslib_w.opt :::::::::::::: CERN_ROOT:[lib]VMSLIB/lib SYS$LIBRARY:vaxcrtl/share
This chapter describes how CERNLIB software is installed on systems running VM/CMS. It assumes that the environment has been set up as described in section .
The actual software installation is performed in batch and is controlled by a service machine. Commands are sent to this service machine using the SLIB exec. The commands used are similar to those used on VMS systems, except that they are prefixed by SLIB.
The following diagram shows the structure and components of the CERN libraries on VM systems. This structure is reflected in the MAKELIB NAMES file.
CERNLIB structure on VM
//CERN/CNDIV/CERNLIB /ALL /CERNLIBS /KERNLIB /KERNASW /KERNNUM /KERNGEN /PACKLIB /EPIO /FFREAD /IOPACK /KAPACK /KUIP /HBOOK /MINUIT /VMIO /ZBOOK /ZEBRA /CDLIB /FATLIB /MATHLIB /LAPACK /MPA /BVSL /GEN /GRAFLIBS /GRAFLIB /GRAFGKS /GRAFGDDM /GRAFX11 /PAWLIB /PAW /COMIS /SIGMA /MCLIBS /COJETS /COJETS /COJETSD /EURODEC /EURODEC /EURODECD /HERWIG /ISAJET /JETSET /JETSET /PYTHIA /LEPTO /PHOTOS /PDFLIB /TWISTER /FRITIOF /ARIADNE /MCDOC /COJETSD /EURODECD /HERWIGD /ISAJETD /JETSETD /PYTHIAD /PHOTOSD /PDFLIBD /FRITIOFD /ARIADNED /CERNPGM /PAWM /PAWGKS /PAWGDDM /PAWX11 /KUIPC /FATSET /FATMEN /FATNEW /FATSRV /FATSEND /RZCONV /RTOA /RFRA /RTOX /RFRX /FLOP /TREE /ZSERV /PAWSERV /ZFTP /TELNETG /DZEDIT /DZEGKS /DZEGDDM /DZEX11 /HIGZCONV /GRTREE /GRTGKS /GRTPS /USERPGM /BANNER /GARFIELD /MAGNET /POISSON /TRSPRT /TURTLE
Complete libraries are built using the syntax make target. For example, KERNLIB is built by typing SLIB MAKE KERNLIB. Again, this is similar to the VMS case, except that the SLIB exec sends the command to the LIBSERV service machine. This service machine runs the appropriate MAKELIB job in batch. MAKELIB is controlled by a configuration file MAKELIB NAMES on the PUBCR 197.
To explain how this works, let us examine the case of KERNLIB in more detail.
The command MAKE KERNLIB corresponds to an entry in the MAKELIB NAMES file as shown below.
MAKE_KERNLIBentry in MAKELIB NAMES file
************************************************************************ * KERNLIB Library * ************************************************************************ :NICK.MAKE_KERNLIB :JOB.KERNLIB :BOPT.TIME 0:10 JOBID KERNLIB :QSUB. :TXTLIB.KERNASW KERNNUM KERNGEN :FROM. KERNASW KERNNUM KERNGEN
In this case, make kernlib will rebuild KERNLIB from the individual TXTLIBs KERNASW, KERNNUM and KERNGEN. To rebuild the individual TXTLIBs, make from kernlib should be used. In this case, one must ensure that the jobs terminate correctly before rebuilding KERNLIB from its components.
PACKLIB is built in a similar manner. The entry in MAKELIB names is as follows:
MAKE_PACKLIBentry in MAKELIB NAMES file
************************************************************************ * PACKLIB Library * ************************************************************************ :NICK.MAKE_PACKLIB :JOB.PACKLIB :BOPT.TIME 0:15 JOBID PACKLIB :QSUB. :TXTLIB.CSPACK EPIO FFREAD IOPACK KAPACK KUIP HBOOK MINUIT VMIO ZBOOK ZEBRA KERNASW KERNNUM KERNGEN CDLIB FATLIB :FROM. CSPACK EPIO FFREAD IOPACK KAPACK KUIP HBOOK MINUIT VMIO ZBOOK ZEBRA CDLIB FATLIB
If we were installing the libraries under a flavour of Unix known as OBELIX, we would add the following line to the cradle.
Selecting Unix code on the OBELIX system
+USE,UNIX,IF=OBELIX.
Should you wish to install the CERN program library on a machine to which it has not already been ported, the following tips may prove useful.
Start from a system as close as possible to the new system. For example, if you were porting the library to Alpha/VMS, an appropriate starting point would be the VAX/VMS version.
Most Unix systems use .f for Fortran files, although the Apollo uses .ftn.
The Fortran compiler is typically invoked using the f77 command on Unix systems, although the RS6000 uses xlf and the Convex fc.
As the CERNLIB installation procedures currently use PATCHY, you will either have to port PATCHY and possibly also the splitting program FCASPLIT, or extract the code on a system to which these programs have already been ported.
If it is necessary to modify the compiler and/or options, one should also remove the check of the file p4boot.sh against p4boot.sh0. If there is a mismatch, the installation procedure will exit.
Fortran installation packages. It may be necessary to make modifications to the files rceta.f or fcasplit.f
There are a number of areas where incompatibilities between machines are likely to arise. These include:
The following modifications were required to port the CERN libraries from Sun OS to Solaris.
Cradle for KERNGEN
+EXE. +USE,*KERNGEN,$PLINAME. +ASM,22 ,IF=CRAY,IBMVM,VAXVMS. +ASM,23,T=A,IF=IBMVM.kerngensh.sh +ASM,24. +ASM,31,T=A.:kerngen2F.f +USE,QSYSBSD ,T=I,IF=SOLARIS. +USE,QENVBSD ,T=I,IF=SOLARIS. +USE,QSIGJMP ,IF=SOLARIS. +USE,QGETCWD ,IF=SOLARIS. +USE,QSIGPOSIX ,IF=SOLARIS. +DIV,P=TCGEN,D=UCOPY2,IF=SOLARIS. +DEL,P=SUNGS,D=JUMPAD,C=1-9,IF=SOLARIS. +DEL,P=SUNGS,D=JUMPX2,C=1-46,IF=SOLARIS. +PAM,11,T=C,A.$CERN_ROOT/src/car/kerngen +PAM,12,T=C,A.$CERN_ROOT/src/car/kern$PLIUWC +PAM,13,T=C,A,IF=IBMVM.$CERN_ROOT/src/car/kerncms +PAM,14,T=C,A.$CERN_ROOT/src/car/kernfor +QUIT.
The above cradle has been slightly simplified for clarity. However, we see that the main changes have been the selection of certain flags that characterise the operating system. These flags are described in appendix on page .
We repeat those selected for Solaris below.
The FACOM VPX series run a Unix System V system. However, the floating point representation is that of IBM mainframes.
We start with the Sun Solaris versions of the libraries, e.g. KERNSUN with the flag SOLARIS.
In ZEBRA, we must ensure that data is correctly converted on input and output.
For IBM mainframes, the required definitions are in the deck IBM of patch FQ in the Zebra pam file. The conversion of data on input and output is performed in the routines FZICV and FZOCV respectively. The conversion is performed by sequences as shown below (plus the corresponding sequences for input). For the FACOM, the following is probably sufficient:
Selecting correction input/output conversion
+USE, FQIE3FSC. use default CALL IE3FOS for output single prec. +USE, FQIE3FDC. use default CALL IE3FOD for output double prec. +USE, FQIE3TSC. use default CALL IE3FOS for input single prec. +USE, FQIE3TDC. use default CALL IE3FOD for input double prec.
which will call the KERNLIB conversion routines (which must of course be provide) for floating point data and copy as is for all other data. (The VPX series uses the ASCII character set and is big endian).
In this respect, the PATCH IBX, which is for AIX on IBM mainframes, and KERNIBX CAR, which contains Fortran versions of the floating point conversion routines, may work directly on the FACOM.
On occasion, one may need to rebuild a component of the CERN library. This typically happens when there is a different version of the operating system, compiler or shared library on the local system to that used at CERN. Alternatively, one may wish to link to a licensed product that is either not available at CERN or cannot be distributed. A typical example is PAW.
Example of rebuilding PAW on VMS systems
$! $! Build various versions of \PAW{} $! $ set noon $! $ architecture=f$edit(f$getsyi("ARCH_NAME"),"UPCASE") $! $ if architecture .eqs. "ALPHA" $ then $ cc:==cc/standard=vaxc $ link:==link/nonative $ endif $! $ ypatchy cern:['cern_level'.src.car]paw.car pawmain.for :go +USE,CZ. +USE,MAIN. +USE,P=PAW,D=0PAMAIN. +EXE. +KEEP,PAWSIZ. PARAMETER (NWPAW=500000) +PAM,T=C. +QUIT. $! $ ypatchy cern:['cern_level'.src.car]paw.car pawpp.for :go +USE,CZ. +USE,MAIN,MOTIF. +USE,P=PAW,D=0PAMAINM. +EXE. +KEEP,PAWSIZ. PARAMETER (NWPAW=500000) +PAM,T=C. +QUIT. $! $ create czdummy.for subroutine czdummy entry czopen entry czclos entry czputa entry czgeta entry czputc entry czgetc entry cztcp entry CONNECT entry GETHOSTBYNAME entry GETSERVBYNAME entry HTONS entry INET_ADDR entry RECV entry SELECT entry SEND entry SETSOCKOPT entry SHUTDOWN entry SOCKET entry multinet_get_socket_errno_addr entry socket_close entry socket_ioctl entry socket_perror end $! $ create gethostname.c /* * return the node name */ #include <descrip.h> #include <lnmdef.h> int gethostname( node, len ) char *node; int len; { $DESCRIPTOR( tabnam, "LNM$SYSTEM" ); $DESCRIPTOR( lognam, "SYS$NODE" ); int length = 0; struct { short buffer_length; short item_code; char *buffer_address; int *return_length; int item_list_end; } itmlst; /* Disabled auto initialization = { len - 1, LNM$_STRING, node, &length, 0 }; */ char *p = node; /* Manual initialization code inserted by CRL on 931206 */ itmlst.buffer_length = (len - 1); itmlst.item_code = LNM$_STRING; itmlst.buffer_address = node; itmlst.return_length = &length; itmlst.item_list_end = 0; sys$trnlnm( 0, &tabnam, &lognam, 0, &itmlst ); while( p[0] != '\\ 0' && p[0] != ':' ) p++; p[0] = '\\ 0'; return( 0 ); } $! $! Compile the main program(s) if found $! $ if f$search("PAWMAIN.FOR") .nes. "" $ then $ write sys$output "Compiling PAWMAIN..." $ fortran pawmain $ endif $! $ if f$search("PAWPP.FOR") .nes. "" $ then $ write sys$output "Compiling PAWPP..." $ fortran pawpp $ endif $! $ if f$search("GETHOSTNAME.C") .nes. "" $ then $ write sys$output "Compiling GETHOSTNAME..." $ cc gethostname $ endif $! $ if f$search("CZDUMMY.FOR") .nes. "" $ then $ write sys$output "Compiling CZDUMMY (dummy TCP/IP routines)..." $ fortran czdummy $ endif $! $! Linking of PAW/GKS version $! $! Licensed software required: GTS-GRAL GKS (installed and distributed by CERN) $! $ if architecture .eqs. "ALPHA" $ then $ write sys$output "PAW/GKS only available on VAX/VMS" $ else $ write sys$output "Link GTS-GRAL GKS version of PAW..." $ cernlib pawlib,mathlib,packlib,graflib,packlib $ link/exe=pawgks pawmain,czdummy,'LIB$ $ endif $! $! Linking of PAW/DEC-GKS $! Licensed software required: DEC-GKS from Digital $! $ write sys$output "Link DEC-GKS version of PAW..." $ cernlib pawlib,mathlib,packlib,graflib/dgks,packlib $ link/exe=pawdgks pawmain,czdummy,'LIB$ $! $! Linking of PAW/X11 $! Licensed software required: Motif 1.1 $! $ write sys$output "Link PAW/X11..." $ cernlib pawlib,mathlib,packlib,graflib/x11,packlib $ link/exe=pawx11 pawmain,gethostname,czdummy,'LIB$ $! $! Linking of PAW/X11_M $! Licensed software required: Motif 1.1, Multinet TCP/IP $! $ write sys$output "Link PAW/X11_M..." $ cernlib pawlib,mathlib,packlib,graflib/x11,packlib $ if architecture .eqs. "ALPHA" $ then $ link/exe=pawx11_m - pawmain,'LIB$',sys$input/opt multinet_socket_library/share sys$library:decc$shr/share $ else $ link/exe=pawx11_m - pawmain,'LIB$',sys$input/opt multinet_socket_library/share sys$library:vaxcrtl/share $ endif $! $! Linking of PAW/X11_U $! Licensed software required: Motif 1.1, DEC TCP/IP (UCX) $! $ write sys$output "Link PAW/X11_U..." $ cernlib pawlib,mathlib,packlib,graflib/x11,packlib $ if architecture .eqs. "ALPHA" $ then $ link/exe=pawx11_u - pawmain,'LIB$',sys$library:ucx$ipc/lib,sys$input/opt sys$library:ucx$ipc_shr/share sys$library:decc$shr/share $ else $ link/exe=pawx11_u - pawmain,'LIB$',sys$library:ucx$ipc/lib,sys$input/opt sys$library:ucx$ipc_shr/share sys$library:vaxcrtl/share $ endif $! $! Linking of PAW/X11_DECW $! Licensed software required: DECWindows $! $ write sys$output "Link PAW/X11_DECW..." $ if architecture .eqs. "ALPHA" $ then $ write sys$output "This option only available on VAX/VMS" $ else $ lib$:==CERN:['cern_level'.LIB]PAWLIB/LIB,PACKLIB/LIB,MATHLIB/LIB,- GRAFLIB/LIB,GRAFX11/LIB,PACKLIB/LIB,KERNLIB/LIB" $ link/exe=pawx11_decw - pawmain,gethostname,czdummy,'LIB$',sys$input/opt cern:[decw]decw$xlibshr/share cern:[decw]decw$dwtlibshr/share cern:[decw]decw$transport_common/share sys$library:vaxcrtl/share $ endif $! $! Linking of PAW/X11_DECW_M $! Licensed software required: DECWindows, Multinet $! $ write sys$output "Link PAW/X11_DECW_M..." $ if architecture .eqs. "ALPHA" $ then $ write sys$output "This option only available on VAX/VMS" $ else $ lib$:==CERN:['cern_level'.LIB]PAWLIB/LIB,PACKLIB/LIB,MATHLIB/LIB,- GRAFLIB/LIB,GRAFX11/LIB,PACKLIB/LIB,KERNLIB/LIB" $ link/exe=pawx11_decw_m - pawmain,'LIB$',sys$input/opt multinet_socket_library/share cern:[decw]decw$xlibshr/share cern:[decw]decw$dwtlibshr/share cern:[decw]decw$transport_common/share sys$library:vaxcrtl/share $ endif $! $! Linking of PAW++ with Multinet $! $ write sys$output "Link PAW++ with Multinet..." $ cernlib pawlib,mathlib,packlib,graflib/motif,packlib $ if architecture .eqs. "ALPHA" $ then $ link/exe=pawpp - pawpp,'LIB$',sys$input/opt multinet_socket_library/share sys$library:decc$shr/share $ else $ link/exe=pawpp - pawpp,'LIB$',sys$input/opt multinet_socket_library/share sys$library:vaxcrtl/share $ endif $! $! Linking of PAW++ with DEC TCP/IP (UCX) $! $ write sys$output "Link PAW++ with UCX..." $ cernlib pawlib,mathlib,packlib,graflib/motif,packlib $ if architecture .eqs. "ALPHA" $ then $ link/exe=pawpp_u - pawpp,'LIB$',sys$input/opt sys$library:ucx$ipc_shr/share sys$library:decc$shr/share $ else $ link/exe=pawpp_u - pawpp,'LIB$',sys$library:ucx$ipc/lib,sys$input/opt sys$library:ucx$ipc_shr/share sys$library:vaxcrtl/share $ endif $! $! $! Linking of PAW++ without Multinet $! $ write sys$output "Link PAW++ without Multinet..." $ cernlib pawlib,mathlib,packlib,graflib/motif,packlib $ if architecture .eqs. "ALPHA" $ then $ link/exe=pawpp_dnet - pawpp,czdummy,gethostname,'LIB$',sys$input/opt sys$library:decc$shr/share $ else $ link/exe=pawpp_dnet - pawpp,czdummy,gethostname,'LIB$',sys$input/opt sys$library:vaxcrtl/share $ endif
The following section describes how to relink PAW on systems running VM/XA or VM/ESA. It assumes that the CERN libraries, e.g. PACKLIB, PAWLIB, are already installed on your system.
The main program can be extracted as shown below:
Extracting the PAW main program
/* Extract PAWMAIN */ /* PAWMAIN EXEC */ queue "+USE,CZ." queue "+USE,MAIN." queue "+USE,P=PAW,D=0PAMAIN." queue "+EXE." queue "+KEEP,PAWSIZ." queue " PARAMETER (NWPAW=500000)" queue "+PAM,11,T=C." queue "+QUIT." exec ypatchy, 'pam="PAW CAR *"', 'asm="PAWMAIN FORTRAN"'
This results in the following Fortran file:
PAW main program
*CMZ : 2.04/08 30/11/93 14.07.07 by Rene Brun *-- Author : Rene Brun 03/01/89 PROGRAM PAMAIN * * MAIN Program for basic PAW * PARAMETER (NWPAW=500000) * COMMON/PAWC/PAWCOM(NWPAW) * CALL PAW(NWPAW,IWTYP) * CALL KUWHAG * CALL PAEXIT * STOP END SUBROUTINE QNEXT END
The ENDMODU routine shown below is used in order to reduce the size of the PAW module.
ENDMODU FORTRAN
BLOCK DATA ENDMODU END
This requires the GTS-GRAL GKS software, which is installed and distributed by CERN.
Building the GKS version of PAW
VFORT PAWMAIN VFORT ENDMODU CERNLIB PAWLIB GRAFLIB ( GTS2D LINK LOAD PAWMAIN ( CLEAR NOAUTO INCLUDE ENDMODU GENMOD PAWGKS ( FROM PAMAIN TO ENDMODU RMODE ANY AMODE ANY
This requires the GDDM software from IBM.
Building the GDDM version of PAW
VFORT PAWMAIN VFORT ENDMODU CERNLIB PAWLIB GRAFLIB ( GDDM LINK LOAD PAWMAIN ( CLEAR NOAUTO INCLUDE ENDMODU GENMOD PAWGDDM ( FROM PAMAIN TO ENDMODU RMODE ANY AMODE ANY
This requires IBM's X11 software, which is bundled together with TCP/IP.
Building the X11 version of PAW
VFORT PAWMAIN VFORT ENDMODU CERNLIB PAWLIB GRAFLIB ( X11 LINK LOAD PAWMAIN ( CLEAR NOAUTO INCLUDE ENDMODU GENMOD PAWX11 ( FROM PAMAIN TO ENDMODU RMODE ANY AMODE ANY