The PSM Lab has a number of addition programs and libraries that may be of value to people working in the lab. While there is department-wide space provided to do so, this has proven troublesome in the past. Conflicting versions, out-of-date software, and poorly configured permissions has often made getting software in the department system more of a hassle than it is worth. The software we use most often is kept separate from the department-wide installs for tighter control.
This software is made available by extending the same UBC use
script as the department-wide system. The use
script searches a set of directories for programs, libraries, includes and documentation and will modify the appropriate environmental variables to make these available to you. The PSM lab employs the same system for making software available by adding more places for use
to search.
Consult man use
and http://www.cs.ubc.ca/local/computing/unix/software.shtml for full information on how to use
use
.
The software, system and documentation are maintained by Matthew Trentacoste. Please contact him with any questions or problems.
The only installation required is to set some environmental variables to instruct use
where to search for the additional software. Below is a section of csh
script that will set up all of the necessary environmental variables for you. If you are using the standard CS department configuration, can paste this into your ~/csh_init/environment
file. If you are using something non-standard or are using bash
, I trust that you can figure out the appropriate modifications to make it work with your setup.
Because the system has to work for multiple operating systems and hardware platforms, a bit of work is involved to determine what system the user is currently on. Binaries must be installed for each OS and hardware, and because we don't have the luxury of picking different NFS shares to mount to the same place, we need to choose the right architecture. After that is accomplished, the necessary paths are set up and things should work.
#=== Determine our system ========== # Determine what operating system we are using set OS_DIST=`uname -s` # Figure out what distro and version we are running if ("$OS_DIST" == 'Linux') then if (-f /etc/SuSE-release) then # If Suse set OS_NAME='Suse' set OS_VERS=`head -n 1 /etc/SuSE-release | awk '{print $3; }'` else if (-f /etc/fedora-release) then # If Fedora set OS_NAME='Fedora' set OS_VERS=`head -n 1 /etc/fedora-release | awk '{print $5; }'` else if (-f /etc/redhat-release) then # If Redhat set OS_NAME='Redhat' set OS_VERS=`head -n 1 /etc/redhat-release | awk '{print $5; }'` elseif (-f /etc/debian_version) then # If Debian set OS_NAME='Debian' set OS_VERS=`head -n 1 /etc/debian_version | awk '{print $1; }'` else set OS_NAME='None' set OS_VERS='0' endif else # If other (namely Sun and Apple), then use the uname results set OS_NAME=$OS_DIST set OS_VERS=`uname -r` endif # Set the system name to locate our binaries with setenv USERPKGARCHSYS $OS_NAME$OS_VERS #=== Set use system ================ # Set generic location and description setenv USERPKGBASE /imager/project/ModelingAndRendering/Packages setenv USERPKGROOT $USERPKGBASE/Generic setenv USERPKGDESC 'PSM Lab software' # Set architecture directory based on what system you are on setenv USERPKGARCH $USERPKGBASE/Arch/$USERPKGARCHSYS
If this was accomplished correctly, you should be able to open a new shell or type source ~/.cshrc
, then the command env
and see something similar to at the bottom of the output:
USERPKGBASE=/imager/project/ModelingAndRendering/Packages USERPKGROOT=/imager/project/ModelingAndRendering/Packages/Generic USERPKGDESC=PSM Lab software USERPKGARCHSYS=Suse9.1 USERPKGARCH=/imager/project/ModelingAndRendering/Packages/Arch/Suse9.1
Usage of the system follows exactly like the normal use
script. To get a full listing of all use
software, you type use -L
. You should see the CS local and public sections as normal and the bottom of the list, there should be something similar to:
------------------------------------------------------------------------ PSM Lab software Description (* production version) ------------------------------------------------------------------------ OGLutil OpenGL utility library OpenEXR-1.2.2 OpenEXR high dynamic range image library RenderOGL RenderOGL Rendering package pfstools-1.2.1 MPI high dynamic range toolkit ------------------------------------------------------------------------
From there, use PACKAGE_NAME
will give you access to that software is normal.
One cautionary note is that the use
scripts will pick packages from the CS local section before the PSM section. If there is a collision, like with OpenEXR-1.2.2, then the CS local one will be chosen. This hasn't been a problem, but if it is, it is always possible to tag our packages as PSM-PACKAGE_NAME
to differentiate. Talk to Matthew Trentacoste if there are any issues.
While the use
script will add things to the $PATH variable, it does not automatically configure everything necessary to compile software with libraries and header in the PSM use
software. Additional environmental variables can be set to instruct GCC to search in the proper places. Paste the following code below the other section in your ~/csh_init/environment
file.
#=== Add gcc libs/includes ========= # Set the include directory list to search for PSM libraries if ($?C_INCLUDE_PATH) then setenv C_INCLUDE_PATH ${C_INCLUDE_PATH}:$USERPKGROOT/include else setenv C_INCLUDE_PATH $USERPKGROOT/include endif # Set the include directory list to search for PSM libraries if ($?CPLUS_INCLUDE_PATH) then setenv CPLUS_INCLUDE_PATH ${CPLUS_INCLUDE_PATH}:$USERPKGROOT/include else setenv CPLUS_INCLUDE_PATH $USERPKGROOT/include endif # Set the library directory list to search for PSM libraries if ($?LIBRARY_PATH) then setenv LIBRARY_PATH ${LIBRARY_PATH}:$USERPKGARCH/lib else setenv LIBRARY_PATH $USERPKGARCH/lib endif
NOTE: These instructions are provided as an example, and aren't guaranteed to work if you have multiple additions to the use
search system configured. Make sure to check. If at all in doubt, contact Matthew Trentacoste.
Installing additional software in the PSM space is similar to the instructions provided at http://www.cs.ubc.ca/local/computing/unix/software.shtml with the exception of where exactly the software is placed. Following the example on the CS department page,
instead of /cs/public/generic/src/whizzy-3.14
use $USERPKGBASE/Source/whizzy-3.14
instead of /cs/public/generic/lib/pkg/whizzy-3.14
use $USERPKGROOT/whizzy-3.14
instead of /cs/public/lib/pkg/whizzy-3.14
use $USERPKGARCH/whizzy-3.14
Following the directions with those revised paths will install it in the PSM space.
-- Main.mmt - 07 Mar 2006