CAVERNsoft G2 ver. 1.2 Release

Table of Contents

  1. Introduction
  2. Directory Structure
  3. System Requirements
  4. Downloading and uncompressing into a temporary directory
  5. Building CAVERNsoft Libraries
  6. Building Demo Programs
  7. Building Modules
  8. Installing in the Destination Directory
  9. Building the User's Application
  10. Contact

Introduction

The CAVERNsoft G2 distribution contains three main components: the core library itself consisting of mainly networking calls; the demo programs that demonstrate the use of the networking API; and the modules which are higher level APIs specifically for building collaborative VR applications. These higher level modules are currently available for IRIX and Linux only since they rely heavily on SGI products such as IRIS Performer.

Directory Structure

CAVERNsoft distribution is organized into several subdirectories. Following are the descriptions for each subdirectory.
demos
contains all example programs using CAVERNsoft G2.
docs
contains documentations for CAVERNsoft G2.
globus
contains all header files and pre-compiled library files of globus for SGI IRIX and Linux.
globus_all
contains globus distribution
include
contains header files for CAVERNsoft G2
lib
    contains pre-compiled library files of CAVERNsoft G2 for SGI IRIX, Linux, Solaris, Free BSD and Microsoft Windows
perf_daemon
contains performance monitoring daemon server and a simple performance monitoring client.
src
contains source code for CAVERNsoft G2.

System Requirements

IRIX 6.5 or higher.
MIPSPro Compilers 7.30 or higher

It may work on earlier version of operating system and compilers but above requirement shows what have been used for building and testing.

Downloading and Uncompressing the distribution into a temporary directory

Uncompress the CAVERN distribution to a temporary directory that must be different from the directory to which you are going to install the library.

Modify the first line of Makefile.IRIX file, which contains DISTRIB_DIR macro to indicate the temporary directory where you want to put the distribution. For example, if you want to install the distribution in /usr/tmp/CAVERN, then modify the first line of the makefile like following:

       DISTRIB_DIR = /usr/tmp/CAVERN

Building the CAVERNsoft Libraries

  1. Type "./SETUP.IRIX" and press Enter key.

  2. This will set up all required makefiles and compile scripts for IRIX platform.
  3. Edit the CAVERN line in CAVERN_MAKEFILE_INCLUDES to point to exact location where CAVERNsoft is installed.
  4. Edit the CPPCOMPILER macro to specify the compiler if you want to use different compiler.
  5. CAVERNsoft G2 library for SGI IRIX platform provides two different types of libraries; one of them needs to be used with Globus library and the other can be used alone without Globus. Cavern library that requires Globus have six different flavors depending on the binary type of the library and thread/process library that is used in the library: 64bit sproc, 32bit sproc, n32 (new 32bit) sproc, 64bit pthreads, 32bit pthreads, and n32 (new 32bit) pthreads.

  6. The other library can be used without Globus library and has three different flavors: 64bit pthreads, 32bit pthreads, and n32 (new 32bit) pthreads. When you are creating applications with this kind of library, you must define CAVERN_DO_NOT_USE_GLOBUS when your application is compiled.
  7. By default, if you just type make without any options, 32bit pthreads and n32 pthreads version of library will be created. If you want to build different set of libraries, you need to consult following table to get the right option.



Set of libraries Commands to use
All CAVERNsoft G2 Library that does not rely on Globus make everything
All CAVERNsoft G2 with Globus Libraries make everything_with_globus

Following table shows the commands that you can use to build specific libraries.


Types of libraries Commands to use
32bit Globus Library with pthreads make globus_pthreads_32
64bit Globus Library with pthreads make globus_pthreads_64
New 32bit Globus Library with pthreads make globus_pthreads_n32
32bit Globus Library with sproc make globus_sproc_32
64bit Globus Library with sproc make globus_sproc_64
New 32bit Globus Library with sproc make globus_sproc_n32
32bit CAVERNsoft G2 Library with pthreads version of Globus make cavern_pthreads_32
64bit CAVERNsoft G2 Library with pthreads version of Globus make cavern_pthreads_64
New 32bit CAVERNsoft G2 Library with pthreads version of Globus make cavern_pthreads_n32
32bit CAVERNsoft G2 Library with sproc version of Globus make cavern_sproc_32
64bit CAVERNsoft G2 Library with sproc version of Globus make cavern_sproc_64
New 32bit CAVERNsoft G2 Library with sproc version of Globus make cavern_sproc_n32
32bit CAVERNsoft G2 without Globus make cavern_pthreads_32_without_globus
64bit CAVERNsoft G2 without Globus make cavern_pthreads_64_without_globus
New 32bit CAVERNsoft G2 without Globus make cavern_pthreads_n32_without_globus

 

Building Demo Programs

You can build the demo programs that can be linked with different types and flavors of libraries with single script called "compile_demos". The script takes at least two command line arguments and may take one more optional argument. The first argument specifies whether you want to link with pthread or sproc version of the CAVERNsoft G2 library. The following table shows all different commands you can use to build the demo programs with different set of libraries. Note that you may have to modify CAVERN_DEMO_INCLUDES.IRIX and CAVERN_DEMO_INCLUDES.IRIX.WITHOUTGLOBUS to indicate where CAVERNsoft G2 is located before running the script.
 


Thread/Process Library Binary Type Use Globus Commands
pthread 32bit No compile_demos pthreads 32
pthread 64bit No compile_demos pthreads 64
pthread New 32bit No compile_demos pthreads n32
sproc 32bit No compile_demos sproc 32
sproc 64bit No compile_demos sproc 64
sproc New 32bit No compile_demos sproc n32
pthread 32bit Yes compile_demos pthreads 32 USE_GLOBUS
pthread 64bit Yes compile_demos pthreads 64 USE_GLOBUS
pthread New 32bit Yes compile_demos pthreads n32 USE_GLOBUS

Building the Modules


Each module is stored in different directories. You can change into each directory and type make to build each module.The Make.script in the modules directory will use the appropriate makefiles in each directory and makes everything.
By default, it will use pthread version of CAVERNsoft G2 library that requires Globus. If you want to build modules with different version of CAVERNsoft G2 library, please read the section on Building User's Application . It will explain how to modify existing makefile or create a new one to use different version of CAVERNsoft library.

Installing the distribution in the destination directory

Modify the first line of Makefile, which contains DISTRIB_DIR macro to indicate the destination directory where you want to put the distribution.
For example, if you want to install the distribution in /usr/local/CAVERN, then modify the first line of the makefile like following:
               DISTRIB_DIR = /usr/local/CAVERN

Type "make install" at the command prompt in the temporary CAVERNsoft directory to copy all required files for IRIX platform to /usr/local/CAVERN directory.

After executing the previous step, make sure to change the CAVERN macro in CAVERN_APPLICATION_INCLUDES to indicate the directory where the CAVERN G2 distribution is installed. Thus, in this example, CAVERN macro in CAVERN_APPLICATION_INCLUDES must be like following:

                CAVERN=/usr/local/CAVERN

Building User's Application

  1. The first thing you want to do might be choosing whether you want to use ptheads or sproc thread/process library. Then you need to decide what kind of binary format among 32bit, 64bit, and n32 (new 32bit) for your application.
  2. After you decided, you need to define them in your makefile like following:
  3.    CAVERN_THREAD_TYPE=pthreads 
       CAVERN_BIN_TYPE=32
    The above example shows that you want to use pthreads as your thread/process library and build 32bit application with this makefile.
  4. Once you define these macros in your makefile, the next thing you need to do is including CAVERN_APPLICATION_INCLUDES file that defines several common macros that would simplify your makefile. So the first part of your makefile would look similar to following:
  5.    # This should be part of your makefile
       CAVERN_THREAD_TYPE=pthreads
       CAVERN_BIN_TYPE=32
     
       include /usr/local/CAVERN/cavernG2_1.2/CAVERN_APPLICATION_INCLUDES
    Note that CAVERN G2 distribution at your work/institution may not be the same as the one shown above. If so, you need to change CAVERN macro in CAVERN_APPLICATION_INCLUDES to indicate the right directory where CAVERN G2 is stored.
     
  6. Then, you have to decide what kind of cavern libraries you are going to use with your application. We provide two different versions of cavern libraries: one requires globus and the other that doesn't rely on globus. If you decide to use cavern library without globus, then go to step 6. Otherwise, you can go to next step. Note the changes we made since 1.0 release version.
  7. With Globus:

  8. You need to include $(CAVERN_CFLAGS_WITH_GLOBUS) when you compile your code and $(CAVERN_LIB_WITH_GLOBUS) when you are generating executables.
       e.g.)
     
       CC $(CAVERN_CFLAGS_WITH_GLOBUS) -c source.C
       CC -o Executable source.o $(CAVERN_LIB_WITH_GLOBUS)
  9. Without Globus:

  10. You need to include $(CAVERN_CFLAGS) when you compile your source code and $(CAVERN_LIB) when you are creating executables.
       e.g.)
     
       CC $(CAVERN_CFLAGS) -c source.C
       CC -o Executable source.o $(CAVERN_LIB)
    Then, run make to make your program.

Contact

If you have any problems or questions, send e-mail to cavern@evl.uic.edu for direct support.