CAVERNsoft G2 Unix/Linux/Solaris Installation Guide

Introduction

This guide shows you how to build the networking libraries and the demo programs in the CAVERNsoft G2 distribution. You can also install the CAVERNsoft modules  (follow this link) which use the networking modules. If you are already familiar with CAVERNsoft, take a look at the appendices to see how the Globus libraries can be used and how you can build the libraries with other options.

Table of Contents

  1. System Requirements
  2. Building and installing the CAVERNsoft libraries
  3. Building your own application
  4. Support
  5. Appendix A : Directory Structure
  6. Appendix B : Building the CAVERNsoft libraries with other options
  7. Appendix C : Compiling the demo programs with other options

 System Requirements

 The networking modules of CAVERNsoft G2 were tested on the platforms listed below.
 
Platform  Version
SGI Irix Version 6.5
Linux Red Hat 6.1
Sun Solaris Version 5.6

Building and installing the CAVERNsoft libraries

The process has 4 main steps.

1. Downloading the distribution into a working directory

  1. Download the CAVERN distribution to a working directory. You should see the file CAVERNG2_xxx.tar.gz ( where xxx is the version number) in your working directory.
  2. Uncompress the distribution by using the command :  gunzip CAVERNG2_xxx.tar.gz

  3. Untar the distribution with the command : tar -xvf CAVERNG2_xxx.tar
  4. The entire distribution will be placed in your working directory under the sub directory CAVERNG2_xxx.  If your working directory is /usr/tmp/CAVERN, then you will see the distribution in /usr/tmp/CAVERN/CAVERNG2_xxx. (where xxx is the version number of the distribution).
Note : A brief description of the directories in the distribution is available in Appendix A

Now you can install the pre compiled CAVERNsoft G2 library that is contained in the distribution (go to Step 3 directly). If you want to first build the CAVERNsoft G2 libraries, go on to Step 2.

2. Building the CAVERNsoft libraries

  1. You will have to define an environment variable CAVERN_DISTRIB which should point to the location of the distribution. So if your working directory is /usr/tmp/CAVERN, then CAVERN_DISTRIB should point to /usr/tmp/CAVERN/CAVERNG2_xxx.

  2. For the Bourne and Korn shells you would use:
    CAVERN_DISTRIB=/usr/tmp/CAVERN/CAVERNG2_xxx;export CAVERN_DISTRIB
    For C shell and tcsh, use:
    setenv CAVERN_DISTRIB /usr/tmp/CAVERN/CAVERNG2_xxx
  3. Run the SETUP.yyyy file. This will set up the makefiles and compile scripts for your platform. Refer to the list below to find out which command you need to use.

  4.  
    Platform SETUP File to Use
    SGI Irix SETUP.IRIX
    Linux SETUP.LINUX_X86
    Sun Solaris SETUP.SOLARIS
  5. The table below lists the default compilers used to build the libraries.

  6.  
    Platform Default compiler
    SGI Irix CC
    Linux g++
    Sun Solaris g++

    Edit the CPPCOMPILER macro in the CAVERN.MAKEFILE.INCLUDES file to use a compiler of your choice.
     

  7. Type: make

  8. This is the default option and will create the 32 bit pthreads version (for SGI-IRIX, Linux and Solaris) and the n32 bit pthreads version for SGI-IRIX only.

    Advanced users, see Appendix B for more options on compiling the libraries.

    The networking libraries are now ready for use. Go to step 4 to build the demo programs.

3. Installing CAVERNsoft G2 in the deployment directory
If you need to make the CAVERNsoft networking APIs available to other users, you should install CAVERNsoft in a deployment directory which is separate from the working directory used in Step 2 . Alternatively, you may have skipped Step 2  and you may want to simply install the recompiled CAVERNsoft G2 library on your system. To do so follow the instructions below:
  1. Define an environment variable CAVERN_DISTRIB which points to the deployment directory.

  2. For example, if you want to deploy the distribution in /usr/local/CAVERNG2, then
    For the Bourne and Korn shells use:
    CAVERN_DISTRIB=/usr/local/CAVERNG2;export CAVERN_DISTRIB
    For C shell and tcsh, use:
    setenv CAVERN_DISTRIB /usr/local/CAVERNG2
  3. Run the SETUP.yyyy file where 'yyyy' stands for the platform(See the table in Step 2.2). This will set up the Makefiles and compile scripts for your platform.

  4.  
  5. Type "make install" at the command prompt in the working directory. This will copy all the required files to the /usr/local/CAVERNG2 directory. Go to Step 4 to build the demo programs.
4. Building the demo programs
The demo programs are a set of sample programs located in the 'demos' sub directory of the distribution. These demo programs are strictly for CAVERNsoft networking APIs. The demo programs exist in four directories under the demos sub directory (db, network, misc, threads). A 'README' file in each directory (located in the 'docs' sub directory) describes the demo programs.

You should make sure that the  environment variable CAVERN_DISTRIB points to the location of the CAVERNsoft distribution (either the directory where it was compiled in Step 2 or the deployment directory used in Step 3).

To build the demo programs with the default options (32 bit pthreads) type
compile_demos pthreads 32
    Advanced users, see Appendix C for more options on compiling the demo programs.
The demo programs should now compile all the way through. Look into each directory and use the docs/README.html file to understand how the demos should be run.

 Building your own application

    You are now ready to write your own applications with CAVERNsoft G2. Click here to see a Sample Makefile.  It demonstrates how you can compile and link a program 'test.cxx' with CAVERNsoft G2. Type make  to build your program.

 Support

If you have any problems, questions, or feedback please send email to cavern@evl.uic.edu

 Appendix A : Directory Structure

The CAVERNsoft distribution is organized into several sub directories. Each sub directory is described below.
 
Directory Description
demos contains sample programs that use the CAVERNsoft G2 version 1.2 networking APIs. 
globus contains the header files (for pthreads and sprocs) and pre compiled globus libraries for SGI IRIX and Linux.
globus_all, globus_build contains the globus distribution
include contains header files for CAVERNsoft G2 version 1.2
lib contains pre compiled library files of CAVERNsoft G2 for SGI IRIX, Linux, Solaris and Microsoft Windows
perf_daemon contains performance monitoring daemon server and a simple performance monitoring client.
src contains source code for CAVERNsoft G2 version 1.2
WIN32 contains the pthreads library

Appendix B : Building the CAVERNsoft libraries with other options

CAVERNsoft libraries can be built with the Globus libraries also. You can also build the libraries using different thread types (pthreads or sproc) or different binary types (32 bit, 64 bit or n32 bits). These options are not available for all platforms. The table below specifies the command to be used to build a certain type of library and also indicates whether a certain library type is available/relevant to that platform. However, the table does not specify how you can use the Globus library with CAVERNsoft or how you can use sprocs. If you want detailed instructions on how you can work with Globus click on the link below the table.

 (Y indicates that you can use the command for that platform, N implies that you cannot)
 

 Set of libraries 

Commands to use 

SGI -IRIX Linux Solaris
All CAVERNsoft G2 libraries without using the globus libraries  make everything Y Y Y
32 bit CAVERNsoft G2 without Globus make cavern_pthreads_32 Y N N
64 bit CAVERNsoft G2 without Globus make cavern_pthreads_64 Y N N
New 32 bit CAVERNsoft G2 without Globus make cavern_pthreads_n32 Y N N

Working with Globus

Appendix C: Compiling the demo programs with other options

The table below lists the command you should use to compile the demo programs with a certain binary type It is assumed that you are not using the Globus library .
(Y indicates that you can use the command for that platform , N implies that you cannot)
 
Description 
(binary type - thread type - without globus)
Command to use SGI - IRIX Linux Solaris
32 bit pthreads without globus compile_demos pthreads 32 Y Y Y
64 bit pthreads without globus compile_demos pthreads 64 Y N N
n32 bit pthreads without globus compile_demos pthreads n32 Y N N