|
|
|||
|
||||
The source code distribution requires that you compile the code on your system. The source code distribution contains all tables and files necessary to build, and run the GEMPAK programs.
A binary distribution contains the GEMPAK executables and only those
tables and files necessary to run the programs.
The binary
distributions do not contain source code.
If you are installing a binary distribution, you can skip the section entitled Building the Package.
At this point, it would be a good idea to create a user 'gempak' and install the distribution as that user. In this document, the user installing GEMPAK is assumed to have a home directory /home/gempak.
Download the appropriate distribution (source or binary) into the top level directory of the gempak account (/home/gempak).
Unpack the GEMPAK distribution.
The distribution is provided as a compressed (gzipped) tar file. To untar the distribution from the gempak home directory, issue the command:
The distribution will unpack into a directory named GEMPAKversion, eg GEMPAK5.10.1.
When the files have been successfully untarred, you can remove the original tar file(s). It's pretty big, and you don't need it anymore.
This section describes the process of building the Unidata distribution of GEMPAK version 5.10. If you have downloaded a binary release, then skip to the section entitled Runtime Configuration.
Configure your setup
When you unpacked the distribution, a subdirectory containing the GEMPAK distribution tree was created in the current working directory. We will refer to this directory as the top of the GEMPAK tree, and identify the location of this directory using the environmental variable NAWIPS.
You will need to edit and verify the settings of the following files before building the distribution:
The Gemenviron and Gemenviron.profile files contain definitions for the locations of various components used by GEMPAK/NAWIPS. This file should be sourced by each user (Gemenviron for csh/tcsh users, Gemenviron.profile for sh/bash/ksh users) in their shell environment configuration (eg .cshrc or .profile depending on shell preference).
For simplicity, the Gemenviron files attempt to determine the architecture of the machine it is run on which simplifies the installation and use of the package. To build the distribution, you must set the variable NAWIPS at the top of the file to the proper location where you have untarred your distribution. The other variables such as the location of data directories can be tailored at your lesiure. All other package variables are relative to the top of the $NAWIPS tree so they should be correct for this setup.
The config/Makeinc.common contains general definitions used in compiling the distribution. The config/Makinc.(sol, x86, hpux, linux, osf, irix, aix, freebsd, darwin) file contains information specific to the individual platform you will be installing on. Considerable effort has been made to ensure that you will not need to change any settings if your system uses standard locations for its compilers, X11 and Motif libraries, and make utilities. This installation assumes you have both an ansi compatible C compiler, and a Fortran 77 compatible compiler.
NOTE: SunOS users, bundled cc is not ansi compatible. Solaris users should make sure SUNWspro/bin/cc is found BEFORE /usr/ucb/cc in your path. Also, you will need to ensure that /usr/ccs/bin is in your path.
Building GEMPAK requires that MOTIF be installed on your system. Most operating systems provide MOTIF (though some install it as an option). Linux does not provide MOTIF. If you are a Linux user, and do not have MOTIF, then you can obtain the binary distribution of GEMPAK, or obtain the OpenMotif package for your system (Lesstif 0.x is not adequate)!
Special Note for Linux! GEMPAK can be built using either g77 or gfortran(4.1+). Edit the Gemenviron configuration file to define which compiler will be used. To build locally, you must have installed the developer environments for X11, OpenMotif and libXp.
Source the Gemenviron file
Once the above files are consistent with your hardware and desired directory structure, issue the command to read the variables into your environment:
csh/tcsh users: source Gemenviron
sh/bash/ksh users: . Gemenviron.profile
This command "sets up" the environment as defined in Gemenviron/Gemenviron.profile. You will want to put this command in your .cshrc/.profile file so that it happens automatically each time you start a new shell. See the section on Configuration below regarding creating symbolic link from the GEMPAKversion directory in /home/gempak so that new versions can be installed without disrupting users. An environmental variable NA_OS is created based on the operating system you are using so that the same GEMPAK distribution can be installed and used on a number of platforms that share the same filesystem.
Now you are ready to begin installation. To compile and build the libraries, and compile and link all programs, from the top level (aka $NAWIPS) directory simply issue the command:
make all >& make.out &
If there are any errors, make will abort, so there is no need to watch the installation process. However, you should keep a copy of the output that comes from the make process. That way if anything goes wrong you can examine the output to help determine where the error is.
If you want to watch the compilation, type:
tail -40f make.out
This command will scroll the make.out file on your screen as output is written to it. To stop the scrolling, use ctrl-C.
If you have any trouble during the installation and need help from Unidata, please send me a copy of the "make.out" file. Note that with the Makefile installation, only fatal errors (errors that cause the "make all" to quit) are significant.
The "make all" command will automatically descend through all the directories that require compilation and linking. When the "make all" command is done, you have generated all the GEMPAK executables and libraries.
Install the distribution
To install the newly generated executables, from the top level directory simply issue the command:
make install >& install.out &
Here again, we have saved the output of the make install in a file called install.out. This is only to help with diagnosing any problems and is not required. The command 'make install' will work just as well.
Clean up the directories
Finally, to clean the build tree of files that are no longer needed after installation, simply issue the command:
make clean >& clean.out &
The libraries are installed under $NAWIPS/lib/$NA_OS and the executable binaries are installed under $NAWIPS/bin/$NA_OS. Additionally, usefull shell scripts are installed under $NAWIPS/bin/scripts.
If you are installing GEMPAK on more than one platform, be sure you have run "make clean" before building on the next platform. By using a single source tree, maintanence of station tables, color enhancement tables, etc. is made easier. Morover, if each user account sources the $NAWIPS/Gemenviron[.profile] file, the appropriate paths will be added to their environment as well.
You're done!
See how easy that was. Depending on the configuration of you machine, how much memory you have, what kind of load is on the machine, etc. your installation may take a while. The installation can vary from a few minutes to overnight. Be patient!
Building GEMPAK for multiple platforms
Using a single source tree for GEMPAK is possible since the libraries and binaries are stored under the $NA_OS subdirectories dependent on the architecture. To ensure that all platforms can utilize the same tree structure, the $NAWIPS top directory should be named the same on all platforms. If necessary, a symbolic links can be used. Since the Gemenviron scripts identifies the machine architecture to set $NA_OS, users should not need to be concerned with multiple launch scripts.
Final comments about the installation process
The files make.out, install.out and clean.out can be deleted once the installation is complete. However, I recommend keeping them around for at least a short while until you've run GEMPAK a few times. If you happen to run across any execution errors, you can go back and check that everything has been installed properly.
An alternate target: make everything can be used to combine the steps of building and installing the package. This target also runs the "make programs_nc" and "make programs_gf" targets to build versions of several programs that are linked directly to the device drivers and eliminates the gplt/message queue interface. These are primarily used by sites for scripts that are run at scheduled times without user interaction
If you modify your distribution, such as may be necessary with patches, most of the compilation time will be bypassed since the libraries which took the majority of the compilation time to build will already exist. However, if you change any core definitions, you should completely remove the old libraries and rebuild from scratch. This can be accomplished by executing:
make distclean
The distclean target will perform the standard make clean options, as well as delete all existing libraries built during the installation process.
The Makefile installation recursively travels down through all the necessary directories. However, this is not the only way to run the make program. You may also run make in any of the GEMPAK subdirectories. For example, let's say you've made a small change to a program like gdcntr, and you would like to install your change. Because the change you've made is isolated in the gdcntr program directory, and because the compilation done in that directory does not get linked to any other directory, you can run make just in the gdcntr directory. Simply change to the directory
cd $GEMPAK/source/programs/gd/gdcntr
and issue the 'make all' and 'make install' commands there. You're re- installation is that simple. You do not need to go to the GEMPAK home directory to issue the make command.
One thing to remember, however, is that not all changes are isolated in a single directory. If you had made a change to the GEMLIB library, for example, all the programs would need to be re-linked to that library so the change will take effect. In this case, it may be better to use the 'make all' from the $NAWIPS directory.
Create a symbolic link to your current version
The top level ($NAWIPS) directory of the version you just installed is /home/gempak/GEMPAKversion. You should create a symbolic link in the /home/gempak directory from GEMPAKversion to a directory called NAWIPS with
ln -s GEMPAKversion   NAWIPS
By creating the link, users can configure their .cshrc/.profile entries to source the /home/gempak/NAWIPS/Gemenviron[.profile] files without being modified when a new distribution is installed. Also, this allows the administrator to build and install a new version without interrupting current users. If you have a version of GEMPAK currently in use, remove the current /home/gempak/NAWIPS link and relink using the command above when you are ready for users to begin using the new release of GEMPAK.
Setup your local data directories and decoders
Once you have your distribution installed, setup your LDM decoders, and define your data directories in Gemenviron[.profile]. See the GEMPAK tutorial for information on setting up the N-PROGS and Garp. Pattern/Action examples for the LDM pqact.conf can be generated by typing $NAWIPS/ldm/etc/gen_pqact.csh. The gen_pqact.csh script will create a pqact.gempak files(s) in your current working directory where the paths appropriate to your $GEMPAK and $GEMTBL variables have been inserted. Copy or link the GEMPAK "dc" decoders from $GEMEXE into your ~ldm/decoders directory (the gen_pqact.csh script assumes the LDM will find your decoders under its decoders/ relative directory.
| Contact Us Site Map Search Terms and Conditions Privacy Policy Participation Policy | ||||||
|
||||||