Source

modulefiles / R / 2.14

#%Module 1.0
#
#  R module for use with 'environment-modules' package on helix:
# 

module-whatis "Sets up R 2.14 on helix/biowulf cluster"

# Define LD_LIBRARY_PATH
prepend-path LD_LIBRARY_PATH /usr/lib64
prepend-path LD_LIBRARY_PATH /usr/local/GSL/1.15/lib
prepend-path LD_LIBRARY_PATH /usr/local/ROOT/lib/root
prepend-path LD_LIBRARY_PATH /usr/local/graphviz/lib64
prepend-path LD_LIBRARY_PATH /usr/local/netcdf/4.1.2/lib

# Define PATH
prepend-path PATH /usr/local/netcdf/4.1.2/bin
prepend-path PATH /usr/local/GSL/1.15/bin
prepend-path PATH /usr/local/ROOT/bin
prepend-path PATH /usr/local/graphviz/bin

# Define environment variables
setenv PERL /usr/local/perl-5.8.9/bin/perl
setenv GSL_INC /usr/local/GSL/1.15/include/gsl

if { [file exists "/bin/uname"] } {
  set hostname [exec /bin/uname -n]
  if { $hostname == "helix.nih.gov" }  {
    prepend-path LD_LIBRARY_PATH /usr/local/ATLAS/current/intel_X5550
    setenv JAGS_INCLUDE /local/JAGS-3.2.0/include/JAGS
    setenv JAGS_LIB /local/lib64
    setenv JAGS_MODULES /local/lib64/JAGS/modules-3
    # Set aliases for R
    set-alias "R" "/usr/local/R-2.14-64/bin/R"
    set-alias "Rscript" "/local/R-2.14-64/bin/Rscript"
 } elseif { $hostname == "biowulf.nih.gov" } {
       # R should not run on the biowulf head node
       puts stderr "R sessions are not allowed on the Biowulf login node."
       puts stderr "Please submit a batch job, or allocate an interactive"
       puts stderr "node. See http://biowulf.nih.gov/apps/R.html for"
       puts stderr "information on using R on Biowulf."
       puts stderr " "
       break
   } else {
       prepend-path LD_LIBRARY_PATH /usr/local/ATLAS/current/default
       prepend-path LD_LIBRARY_PATH /usr/local/openmpi/lib
       prepend-path PATH /usr/local/openmpi/bin
       setenv JAGS_INCLUDE /usr/local/JAGS-3.2.0/include/JAGS
       setenv JAGS_LIB /usr/local/lib64
       setenv JAGS_MODULES /usr/local/lib64/JAGS/modules-3
       set-alias "R" "/usr/local/R-2.14-64_cluster/bin/R"
       set-alias "Rscript" "/usr/local/R-2.14-64_cluster/bin/Rscript"       
      }
  }