# .tcshrc for host-specific initialization # user can turn on/off package initializations for specific hosts # this is useful for example in case of MPI, where we have 2-3 distributions per cluster # and user can select the one that he preferes as a default # please send comments/suggestions to mcuma@chpc.utah.edu # currently works on all CHPC based clusters (Linux and OSF) and on Linux desktops #set echo # Test if UUFSCELL is defined, if not, see if uufs.csh exists and if it does source it - this fixed problems with crontab if (!($?UUFSCELL) && (-e /etc/profile.d/uufs.csh)) then source /etc/profile.d/uufs.csh endif if ($?UUFSCELL) then #UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU # Arches global initialization set GRP = `echo $UUFSCELL | cut -d . -f 2` if ( ($GRP == "arches") || ($GRP == "bridges") || ($GRP == "peaks") ) then # exit if .tcshrc was loaded by a parent shell # execute this only on the clusters since on desktops env. var. stays defined # for all new terminals# update Jan11 - screen does not inherit parent's LD_LIBRARY_PATH so if in screen, # load up the whole environment again - here we risk that the PATH will become too long though if ( $?TCSHRC_LOADED ) then if !($?TERM) exit if ($TERM != "screen" ) exit endif # if ( $?TCSHRC_LOADED ) exit setenv TCSHRC_LOADED 1 # # stacksize by default is very small, which causes programs with large static data to segfault limit stacksize unlimited # limit coredumpsize unlimited # create .pbs_spool if not created already if (!(-d $HOME/.pbs_spool)) mkdir $HOME/.pbs_spool # default path addon setenv PATH "/uufs/chpc.utah.edu/sys/bin:/uufs/$UUFSCELL/sys/bin:$PATH" if !($?MANPATH) then setenv MANPATH /uufs/chpc.utah.edu/sys/man:/uufs/$UUFSCELL/sys/man:`manpath` else setenv MANPATH "/uufs/chpc.utah.edu/sys/man:/uufs/$UUFSCELL/sys/man:$MANPATH" endif # Commenting/uncommenting source lines below will disable/enable specified packages # Packages not specified do not require shell modifications, but you may have to point # to /uufs/landscape.arches/sys/bin, lib or include in order to use them #source PGI defines source /uufs/chpc.utah.edu/sys/pkg/pgi/std/etc/pgi.csh #source Intel compilers environment - includes icc, ifort, mkl, idb, tbb source /uufs/chpc.utah.edu/sys/pkg/intel/ics/bin/compilervars.csh intel64 # Totalview source /uufs/chpc.utah.edu/sys/pkg/totalview/std/etc/totalview.csh # Matlab source /uufs/chpc.utah.edu/sys/pkg/matlab/std/etc/matlab.csh # TAU # source /uufs/chpc.utah.edu/sys/pkg/tau/std/etc/tau.csh # ITA # source /uufs/arches/sys/pkg/ita/std/etc/ita.csh # NWCHEM # source /uufs/chpc.utah.edu/sys/nwchem/etc/nwchem.csh #Babel # source /uufs/chpc.utah.edu/sys/openbabel/etc/babel.csh #Molpro # source /uufs/chpc.utah.edu/sys/molpro-serial/etc/molpro.csh #Dalton # source /uufs/chpc.utah.edu/sys/dalton-serial/etc/dalton.csh #Dock # source /uufs/chpc.utah.edu/sys/pkg/dock/etc/dock.csh #Autodock # source /uufs/chpc.utah.edu/sys/pkg/autodock/etc/autodock.csh # Cambridge Structural Database # source /uufs/chpc.utah.edu/sys/pkg/CSD/std/cambridge/etc/csd.csh # VMD # setenv PATH "/uufs/chpc.utah.edu/sys/pkg/vmd/vmd-std/bin:$PATH" endif # Follow specific cluster initializations #--------------------------------------------------------------------- # Do Ember specific initializations if ($UUFSCELL == "ember.arches") then source /uufs/chpc.utah.edu/sys/pkg/pgi/std_rh6/etc/pgi.csh # MVAPICH2 is the preferred MPI on Ember source /uufs/ember.arches/sys/pkg/mvapich2/std_intel/etc/mvapich2.csh # Another option is to use OpenMPI # source /uufs/ember.arches/sys/pkg/openmpi/std_intel/etc/openmpi.csh # GAUSSIAN09 - uncomment if you are a gaussian user! # source /uufs/chpc.utah.edu/sys/pkg/gaussian09/EM64T/etc/g09.csh #------------------------------------------------------------------------------ # Do Kingspeak specific initializations else if ($UUFSCELL == "kingspeak.peaks") then source /uufs/chpc.utah.edu/sys/pkg/pgi/std_rh6/etc/pgi.csh # source mpich2 defines source /uufs/kingspeak.peaks/sys/pkg/mvapich2/std/etc/mvapich2.csh # GAUSSIAN09 - uncomment if you are a gaussian user! # source /uufs/chpc.utah.edu/sys/pkg/gaussian09/EM64T/etc/g09.csh #------------------------------------------------------------------------------ # Do Lonepeak specific initializations else if ($UUFSCELL == "lonepeak.peaks") then # source PGI, different on RHEL6 source /uufs/chpc.utah.edu/sys/pkg/pgi/std_rh6/etc/pgi.csh # source mpich2 defines source /uufs/chpc.utah.edu/sys/pkg/mpich2/std/etc/mpich2.csh # GAUSSIAN09 - uncomment if a gaussian user # source /uufs/chpc.utah.edu/sys/pkg/gaussian09/EM64TL/etc/g09.csh #--------------------------------------------------------------------- # Do Ash specific initializations else if ($UUFSCELL == "ash.peaks") then # source PGI, different on RHEL6 source /uufs/chpc.utah.edu/sys/pkg/pgi/std_rh6/etc/pgi.csh # source mpich2 defines source /uufs/ash.peaks/sys/pkg/mvapich2/std/etc/mvapich2.csh # GAUSSIAN09 - uncomment if you are a gaussian user! # source /uufs/chpc.utah.edu/sys/pkg/gaussian09/EM64T/etc/g09.csh #--------------------------------------------------------------------- # do turretarch specific initializations else if ($UUFSCELL == "turretarch.arches") then setenv SSIHLM /uufs/turretarch.arches/sys/pkg/hlm/std #--------------------------------------------------------------------- # do hiddenarch specific initializations else if ($UUFSCELL == "hiddenarch.arches") then set met_include=met_include.csh # if ($?TERM != 0) then wget -q -T 4 -O ~/$met_include http://www.chpc.utah.edu/docs/manuals/getting_started/code/$met_include # curl times out correctly, but is not present on Icebox # curl --connect-timeout 5 http://155.101.3.221/for_users/scripts/$ips_file -o ~/$ips_file # endif set file_length=`wc -l ~/$met_include | cut -f1 -d/` # Count Lines @ fl = `expr $file_length + 0` # Change Type # in case transfer failed (file is there but size 0), get backup file if (-e ~/$met_include && $fl == 0) then cp ~/$met_include.bak ~/$met_include set file_length=`wc -l ~/$met_include | cut -f1 -d/` # Count Lines @ fl = `expr $file_length + 0` # Change Type endif # a in case we did find met_include, back it up and source it if (-e ~/$met_include && $fl > 0) then cp ~/$met_include ~/$met_include.bak source ~/$met_include endif # Do Telluride specific initializations else if ($UUFSCELL == "telluride.arches") then setenv MPI_SHELL /usr/bin/rsh # GAUSSIAN09 # source /uufs/chpc.utah.edu/sys/pkg/gaussian09/EM64TL/etc/g09.csh #--------------------------------------------------------------------- # Do Apex arch (HIPPA cluster) specific initializations else if ($UUFSCELL == "apexarch.bridges") then # source MPICH2 defines # this causes problems with FastX connect # source /uufs/chpc.utah.edu/sys/pkg/mpich2/std/etc/mpich2.csh # set prompt="HIPPA:%B%c2%b%#%" # command prompt endif #--------------------------------------------------------------------- # do turretarch specific initializations if ($UUFSCELL == "turretarch.arches") then # setenv SSIHLM /uufs/turretarch.arches/sys/pkg/hlm/std source /uufs/chpc.utah.edu/sys/pkg/mpich2/std_pgi/etc/mpich2.csh endif #--------------------------------------------------------------------- # do astro.utah.edu specific initializations if ($UUFSCELL == "astro.utah.edu") then limit stacksize unlimited # default path addon setenv PATH "/uufs/$UUFSCELL/sys/bin:$PATH" if !($?MANPATH) then setenv MANPATH /uufs/$UUFSCELL/sys/man:`manpath` else setenv MANPATH "/uufs/$UUFSCELL/sys/man:$MANPATH" endif # source MPICH2 defines source /uufs/chpc.utah.edu/sys/pkg/mpich2/std/etc/mpich2.csh # source IDL source /uufs/chpc.utah.edu/sys/pkg/idl/7.0/etc/idl.csh source /uufs/astro.utah.edu/sys/pkg/sm/std/etc/sm.csh endif #--------------------------------------------------------------------- # do stats specific initializations if ($UUFSCELL == "stats") then limit stacksize unlimited # default path addon setenv PATH "/uufs/$UUFSCELL/sys/bin:$PATH" endif #--------------------------------------------------------------------- # do chpc.utah.edu desktops specific initializations if ($UUFSCELL == "chpc.utah.edu") then limit stacksize unlimited # default path addon setenv PATH "/uufs/$UUFSCELL/sys/bin:$PATH" if !($?MANPATH) then setenv MANPATH /uufs/$UUFSCELL/sys/man:`manpath` else setenv MANPATH "/uufs/$UUFSCELL/sys/man:$MANPATH" endif #source PGI defines source /uufs/$UUFSCELL/sys/pkg/pgi/std/etc/pgi.csh #source Pathscale defines source /uufs/$UUFSCELL/sys/pkg/pscale/std/etc/pscale.csh #source Intel compilers environment - includes icc, ifort, mkl, idb, tbb source /uufs/chpc.utah.edu/sys/pkg/intel/ics/bin/compilervars.csh intel64 # Totalview source /uufs/$UUFSCELL/sys/pkg/totalview/std/etc/totalview.csh # Matlab source /uufs/$UUFSCELL/sys/pkg/matlab/std/etc/matlab.csh set met_include=met_include.csh wget -q -T 4 -O ~/$met_include http://www.chpc.utah.edu/docs/manuals/getting_started/code/$met_include # curl times out correctly, but is not present on Icebox # curl --connect-timeout 5 http://155.101.3.221/for_users/scripts/$ips_file -o ~/$ips_file set file_length=`wc -l ~/$met_include | cut -f1 -d/` # Count Lines @ fl = `expr $file_length + 0` # Change Type # in case transfer failed (file is there but size 0), get backup file if (-e ~/$met_include && $fl == 0) then cp ~/$met_include.bak ~/$met_include set file_length=`wc -l ~/$met_include | cut -f1 -d/` # Count Lines @ fl = `expr $file_length + 0` # Change Type endif # a in case we did find met_include, back it up and source it if (-e ~/$met_include && $fl > 0) then cp ~/$met_include ~/$met_include.bak source ~/$met_include endif endif #--------------------------------------------------------------------- # do CEMI desktops specific initializations if ($UUFSCELL == "cemi") then limit stacksize unlimited #source PGI defines source /uufs/chpc.utah.edu/sys/pkg/mpich2/std_rh6/etc/mpich2.csh #source PGI defines source /uufs/chpc.utah.edu/sys/pkg/pgi/std/etc/pgi.csh #source Intel compilers environment # source /uufs/chpc.utah.edu/sys/pkg/intel/ifort/std/bin/ifortvars.csh # source /uufs/chpc.utah.edu/sys/pkg/intel/icc/std/bin/iccvars.csh source /uufs/chpc.utah.edu/sys/pkg/intel/ics/bin/compilervars.csh intel64 # Totalview source /uufs/chpc.utah.edu/sys/pkg/totalview/std/etc/totalview.csh # Matlab source /uufs/chpc.utah.edu/sys/pkg/matlab/std/etc/matlab.csh # COMSOL setenv PATH "/uufs/chpc.utah.edu/sys/pkg/comsol/std/bin:$PATH" endif # end of UUFSCELL initializations #UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU else # below define your own machine(s), in case they mount your home on the same fileserver # as the CHPC machines # set echo set MYMACHINE # find out what OS we are running, inits are specific for those because # hostname uses different flags to return useful data based on the OS set MYOS = `uname` ###################################################################### # Start machine specific initializations ###################################################################### #--------------------------------------------------------------------- # Do Linux specific initializations #--------------------------------------------------------------------- if ($MYOS == "Linux") then # Find host-specific string. It is first 3 numbers of the host's IP set MYHOST = `hostname -i | cut -f 1-3 -d .` # Problem with Arches is, that all login nodes are on 172.17.10 net # we also save full IP and test if it's not one of the 6 login nodes # This is also used for user specified machine (e.g. desktop mounting # file server as a home) set MYIP = `hostname -i` # define hosts # for other (Linux) hosts, define a string with IP range here # we are getting the IP host list from CHPC's webserver # this enables us to change the IPs of the machines if necessary without # breaking this script # Sierra does not have wget, so, we have to do this inside Linux # Myrinet's mpirun complains about unknown vars. ICEBOX1,... - probably # does not source the file, but, direct ssh works OK # when disable wget and linuxips.sh is there, all is good # but then, sometimes all is good even with wget set ips_file=linuxips.csh # if ($?TERM != 0) then # Icebox nodes don't run name services, use webserver IP wget -q -T 4 -O ~/$ips_file http://www.chpc.utah.edu/for_users/scripts/$ips_file # curl times out correctly, but is not present on Icebox # curl --connect-timeout 5 http://155.101.3.221/for_users/scripts/$ips_file -o ~/$ips_file # endif set file_length=`wc -l ~/$ips_file | cut -f1 -d/` # Count Lines @ fl = `expr $file_length + 0` # Change Type # in case transfer failed (file is there but size 0), get backup file if (-e ~/$ips_file && $fl == 0) then cp ~/$ips_file.bak ~/$ips_file set file_length=`wc -l ~/$ips_file | cut -f1 -d/` # Count Lines @ fl = `expr $file_length + 0` # Change Type endif # a long if section in case we did find linux.ips, if (-e ~/$ips_file && $fl > 0) then cp ~/$ips_file ~/$ips_file.bak source ~/$ips_file endif # add user-specific host IPs set PORTAL="155.101.3.217" #------------------------------------------------------------------------------- # Do Skylinearch specific initializations if (($MYHOST == $SARCH)||($MYIP == $SARCHL)) then # stacksize by default is very small, which causes programs with large static data to segfault limit stacksize unlimited setenv CLUSTER skylinearch.arches # create .pbs_spool if not created already if (!(-d $HOME/.pbs_spool)) mkdir $HOME/.pbs_spool # default path addon setenv PATH "/uufs/$CLUSTER/sys/bin:$PATH" setenv MANPATH "/uufs/$CLUSTER/sys/man" #source Pathscale defines source /uufs/$CLUSTER/sys/pkg/pscale/std/etc/pscale.csh # source MPICH2 defines source /uufs/$CLUSTER/sys/pkg/mpich2/std/etc/mpich2.csh #-------------------------------------------------------------------------------------- # Do Portal specific initializations else if ($MYHOST == $PORTAL) then set autofill # additional user customizations below here #-------------------------------------------------------------------------------------- # Do MYMACHINE specific initializations else if ($MYIP == $MYMACHINE) then # additional user customizations below here else # echo Dont know this computer endif # if the IP file list was not found, we skipped all host specific init else if ($?TERM != 0) then echo "No IP alias file found, most likely due to CHPC webserver being down" echo "No host-specific environment is defined in this session" endif endif #--------------------------------------------------------------------- # Do OSF (Sierra) specific initializations #--------------------------------------------------------------------- else if ($MYOS == "OSF1") then set SIERRA sierra # Find host-specific string. It is first 6 characters of the host name for OSF set MYHOST = `hostname | cut -c 1-6` #--------------------------------------------------------------------- # Do Sierra specific initializations if ($MYHOST == $SIERRA) then # echo I am on Sierra setenv PATH "/uufs/sierra/sys/pkg/tv/std/bin:$PATH" endif endif #UUFSCELL else endif endif # User defined global terminal customizations valid also for non-interactive # terminals (PBS, MPI, cron) # Get out if terminal is not interactive or we're a root if ($?USER == 0 || $?TERM == 0) then exit endif # User defined global terminal customizations valid only on interactive terminals set autolist # list completions when the tab key is hit #load aliases #source ~/.aliases if ( `groups $USER | grep " sdss"` != "" ) then source /uufs/chpc.utah.edu/sys/pkg/modules/init/tcsh endif