next up previous contents
Next: update_sifdec Up: Installing and managing SifDec Previous: Installing and managing SifDec   Contents

install_sifdec

This script serves the dual purposes of installing the initial instance of SifDec on your system and of installing an additional instance, for a different architecture, where by architecture, we mean the combination machine-operating system-compiler-size-precision. Assume you wish to install all your different instances of SifDec in the directory $SIFDEC = /usr/share/sifdec/. Unpacking the SifDec distribution in the $SIFDEC directory and launching the initial installation, say for the SUN Ultra machine, is done by simply typing

prompt% install_sifdec

at the command prompt. However, before issuing the install command, we recommend that you check the files system.cf in $SIFDEC/config, where `system' represents your operating system, to make sure the commands there are correctly defined for your environment, and that the temporary directory is correctly set. The current directory `.' must not be used as temporary directory. Once you have issued the install_sifdec command, you will be prompted for information regarding the instance of SifDec you wish to install. The first question concerns your machine. In this case, select ``Sun workstation'' (7). Next, select the operating system your machine is running. Here, we select ``Solaris'' (1). You are then faced with a list of available compilers for your machine (without any guarantee that these compilers are actually installed on your machine, simply those we know are available for the machine-operating system combination you have selected). We want to select ``Sun f90'' (8). Select next the precision of the SifDec tools (single or double), and their size (small, medium, large or customized).

Once this information has been provided to the installation script, you are given a default directory name where the selected instance of SifDec will be installed. This directory is a subdirectory of $SIFDEC that you chose earlier (in this case, /usr/share/sifdec/). For the present instance, the default directory is

/usr/share/sifdec/SifDec.large.sun.sol.f90

reflecting the selections you made during the early installation phase. This directory name should be self-explanatory and should help you and other users determine where each installed instance of SifDec is actually stored. Notice that the precision is not reflected in the directory name. The reason is that both single and double precision instances of SifDec may be installed for the same machine-operating system-compiler-size combination; these will be stored in the single/ and double/ subdirectories of the above directory. If you wish, you may redefine the directory name and give it whatever name you like--it need not be a subdirectory of $SIFDEC. Note however that you should give the full pathname of the new directory that you choose, e.g.

/home/mjdpowell/software/yetAnotherSifdec

even if this new directory is a subdirectory of the $SIFDEC directory:

/usr/share/sifdec/aCustomSifdec

It is probably good practice to be content with the default name or not to give it a cryptic or ambiguous name. After checks to see if a similar distribution has already been installed and for the existence of the specified directory, the installation itself begins.

The script install_sifdec then creates the necessary directory structure, Umakefiles and configuration files. The final step of the installation is left to the user and is described below.

Once this phase is complete, install_sifdec reminds you of what you should add to your .cshrc, .bashrc, or whichever UNIX configuration file corresponds to the shell you use. The directory structure after the initial installation is as described in the CUTEr/SifDec paper provided in the SifDec distribution and in §1.2 and Fig.1.1. In the case we are concerned with, the SIFDEC environment variable should be set to /usr/share/sifdec and MYSIFDEC to /usr/share/sifdec/SifDec.large.sun.sol.f90 (or the alternative directory you specified during the installation phase).

The script install_sifdec also advises you to read the various README files scattered over the directory tree under $MYSIFDEC. We now describe the final step of the installation using Umakefiles. There is a Umakefile in each subdirectory of $MYSIFDEC. Each of these Umakefiles needs to appropriately use the configuration files stored in $MYSIFDEC/config so as to generate Makefiles suited to your local system. This process is usually referred to as bootstrapping. This is done by changing to $MYSIFDEC and issuing the command

prompt% ./install_mysifdec

at the command prompt. Please note that if both single and double precision were installed, the script install_mysifdec requires a command-line argument, telling it for which precision it should bootstrap the Umakefiles. In an attempt to follow the main guidelines for the CPP -- the C preprocessor, on which Umakefiles are based -- the argument to install_mysifdec takes the form of a symbol definition. More precisely, if the user wishes to remake the double precision version of SifDec, the command is

prompt% ./install_mysifdec -DDoublePrecision

and similarly, for the single precision version,

prompt% ./install_mysifdec -DSinglePrecision

Refer to the file IMPORTANT for the latest details. Do not let make's output confuse you. On a Linux system, and because make is usually accompanied by the -w command-line option, using the standard g77 compiler, the output of the above command looks like

umake -I./config -DIsg77 -DLargeSize -DDoublePrecision
+ /bin/rm -f Makefile.bak
+ /bin/mv Makefile Makefile.bak
umake -I./config  -DTOPDIR=. -DCURDIR=.  -DIsg77 -DLargeSize -DDoublePrecision
making Makefiles in bin...
make[1]: Entering directory `/home/do/Sifdec4Linux/bin'
make[1]: Nothing to be done for `Makefiles'.
make[1]: Leaving directory `/home/do/Sifdec4Linux/bin'
making Makefiles in double...
make[1]: Entering directory `/home/do/Sifdec4Linux/double'
making Makefiles in double/bin...
make[2]: Entering directory `/home/do/Sifdec4Linux/double/bin'
make[2]: Nothing to be done for `Makefiles'.
make[2]: Leaving directory `/home/do/Sifdec4Linux/double/bin'
making Makefiles in double/config...
make[2]: Entering directory `/home/do/Sifdec4Linux/double/config'
make[2]: Nothing to be done for `Makefiles'.
make[2]: Leaving directory `/home/do/Sifdec4Linux/double/config'
make[1]: Leaving directory `/home/do/Sifdec4Linux/double'

This is normal output and it indicates that everything worked out smoothly. make is simply echoing what it attempts to do in each subdirectory. A message like ``Nothing to be done for `Makefiles'.'' simply indicates that the subdirectory where make is currently working does not have further subdirectories. On most systems, make is less verbose.

The above command should be able to properly generate the Makefiles in each subdirectory. These Makefiles should also only contain standard commands, as every effort has been made to avoid using exotic Makefile features and capabilities, such as the $@@ construct. A README file accompanies every Makefile to describe what it does and which targets it recognizes. Users are advised to take a look at these files. You normally do not need to read Makefiles generated by umake as these are usually very long and contain hundreds of parameter definitions. The documentation files and a basic knowledge of make should be enough for you to feel comfortable with the (re)generation of the various parts of SifDec. Once the Makefiles are generated, the only thing that remains to be done is the usual make all. However, as users who have some experience with make know, make outputs a lot of information--it basically echoes to the standard output every action it takes. The -s command-line option to make lowers its verbosity level and basic information on how the build is progressing only is printed. Thus, users should build SifDec using the command

prompt% make -s all

This command completes the installation of SifDec, using Umakefiles. On my Linux system, the installation takes a couple of minutes and make's output looks like

 Getting UNIX commands right            [Ok]
 Casting      script.sed                [Ok]
 Casting      cast.sed                  [Ok]
 Casting      cast90.sed                [Ok]
 Casting      local.f                   [Ok]
 Adding       timer                     [Ok]
 Building     local.o                   [Ok]
making all in ./bin...
 Linking      slct                      [Ok]
 Linking      clsf                      [Ok]
 Casting      classall                  [Ok]
 Casting      classify                  [Ok]
 Casting      helpmsg                   [Ok]
 Casting      select                    [Ok]
 Casting      sifdecode                 [Ok]
 Installing   show.awk                  [Ok]
 Installing   param.awk                 [Ok]
making all in ./double...
making all in double/bin...
 Building     sifdec.o                  [Ok]
 Building     decode.o                  [Ok]
 Building     gps.o                     [Ok]
 Building     inlanc.o                  [Ok]
 Building     makefn.o                  [Ok]
 Building     mafnad.o                  [Ok]
 Building     makegr.o                  [Ok]
 Building     magrad.o                  [Ok]
 Building     printp.o                  [Ok]
 Building     rest.o                    [Ok]
 Building     trans.o                   [Ok]
 Building     utils.o                   [Ok]
 Linking      sifdec                    [Ok]
making all in double/config...

On workstations, the installation should be expected to take longer. During this phase, keep an eye on the screen and look for the [Ok] indicators. Should make come across some difficulty, this sequence of indicators should be interrupted by an error message. To know more about the problem, read the README file in the directory where the problem occured to try to indentify the target which make was attempting to build, and re-run make on that target without the -s option.

You may then install a new instance of SifDec, which may be for a different architecture, or one corresponding to an already-installed instance, with a different precision or size. In all cases, the environment variable MYSIFDEC should point to the current, working, instance of SifDec.

The install_sifdec script keeps track of all installed instances of SifDec on your system in the logfile $SIFDEC/log/install.log. This file may be used, for instance, to have MYSIFDEC point to the right distribution. For the purpose of illustrating the above, assume the three distributions given in Table 1.1 are installed in their default directory. Besides date information, the following will be found in $SIFDEC/log/install.log, where the exclamation mark (!) is a separator.

double large Sun-workstation sol f90 ! $SIFDEC/SifDec.large.sun.sol.f90
double medium Intel-like-PC lnx g77 ! $SIFDEC/SifDec.medium.pc.lnx.g77
double large Compaq-Alpha t64 f90 ! $SIFDEC/SifDec.large.alp.t64.f90


next up previous contents
Next: update_sifdec Up: Installing and managing SifDec Previous: Installing and managing SifDec   Contents
Dominique Orban 2004-09-16