modulefiles / gaussian / g09-A02

Full commit
#%Module 1.0

module-whatis "Sets up Gaussian 09 v A.02"

# check if the user is in the gaussian group
set return [system /usr/bin/groups | /bin/grep -q gaussian]
if { $return != 0 } {
  puts stderr "All users of Gaussian09 need to belong to the gaussian group."
  puts stderr "Please contact the Helix staff ( for more information."
  puts stderr ""

# don't allow jobs on biowulf head node
set hostname [exec /bin/uname -n]
if { $hostname == "" }  {
  puts stderr "NO RUNNING ON!  Please use an interactive node or submit this through the batch system."

prepend-path LD_LIBRARY_PATH /usr/local/gaussian09-A02-64/g09/bsd:/usr/local/gaussian09-A02-64/g09/local:/usr/local/gaussian09-A02-64/g09/extras:/usr/local/gaussian09-A02-64/g09

# gv lib has to be at the end
append-path LD_LIBRARY_PATH /usr/local/gaussian09-A02-64/gv/lib

setenv g09root /usr/local/gaussian09-A02-64
setenv G09BASIS /usr/local/gaussian09-A02-64/g09/basis
setenv GAUSS_ARCHDIR /usr/local/gaussian09-A02-64/g09/arch
setenv GAUSS_BSDDIR /usr/local/gaussian09-A02-64/g09/bsd
setenv GAUSS_EXEDIR /usr/local/gaussian09-A02-64/g09/bsd:/usr/local/gaussian09-A02-64/g09/local:/usr/local/gaussian09-A02-64/g09/extras:/usr/local/gaussian09-A02-64/g09
setenv GAUSS_LEXEDIR /usr/local/gaussian09-A02-64/g09/linda-exe
setenv GV_DIR /usr/local/gaussian09-A02-64/gv
setenv LINDA_FORTRAN_LINK "pgf77 -Bstatic_pgi -mp=nonuma -tp k8-64 -i8 -r8 -mcmodel=medium"
setenv LINDA_FORTRAN "pgf77 -Bstatic_pgi -mp=nonuma -tp k8-64 -i8 -r8 -mcmodel=medium"
setenv MAKEFLAGS "CSIZE=1048576 CSIZEW=128 OPTOI= MMODEL='-mcmodel=medium' I8FLAG=-i8 R8FLAG=-r8 I8CPP1=-DI64 I8CPP2=-DP64 I8CPP3=-DPACK64 I8CPP4=-DUSE_I2 MACHTY=k8-64 GAULIBU=util.a BLAS1=bsd/libf77blas-amd64.a BLAS2=bsd/libatlas-amd64.a"

append-path PATH /usr/local/gaussian09-A02-64/g09/bsd:/usr/local/gaussian09-A02-64/g09/local:/usr/local/gaussian09-A02-64/g09/extras:/usr/local/gaussian09-A02-64/g09

append-path PERLLIB /usr/local/gaussian09-A02-64/g09/bsd
append-path PERL5LIB /usr/local/gaussian09-A02-64/g09/bsd

setenv PGIDIR /usr/pgi/unknown
setenv PGI_TERM trace,abort
setenv PGI /usr/pgi
setenv POSTFL_FORTRAN "pgf77 -Bstatic_pgi -mp=nonuma -tp k8-64 -i8 -r8 -mcmodel=medium"
setenv _RLD_ARGS "-log /dev/null"

# set GAUSS_SCRDIR if not assigned and directory exists
if {![info exists ::env(GAUSS_SCRDIR)]} {
  setenv GAUSS_SCRDIR /scratch
} else {
  if {![file exists $::env(GAUSS_SCRDIR)]} {
    puts stderr "GAUSS_SCRDIR ($env(GAUSS_SCRDIR)) does not exist"
    puts stderr "GAUSS_SCRDIR set to /scratch"
    setenv GAUSS_SCRDIR /scratch
  } else {
    if {![file isdirectory $::env(GAUSS_SCRDIR)]} {
      puts stderr "GAUSS_SCRDIR ($env(GAUSS_SCRDIR)) is not a directory"
      puts stderr "GAUSS_SCRDIR set to /scratch"
      setenv GAUSS_SCRDIR /scratch

# set GAUSS_LFLAGS if on a node
if {[info exists ::env(PBS_NODEFILE)]} {
  set nodelist [exec /usr/bin/tr "\n" " " < $::env(PBS_NODEFILE) ]
  setenv GAUSS_LFLAGS "-nodelist $nodelist"

set-alias g09 /usr/local/gaussian09-A02-64/g09/g09
set-alias gaussview /usr/local/gaussian09-A02-64/gv/gview