# .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 # new system will have UUFSCELL variable and # ifdef $UUFSCELL # then source /uufs/$UUFSCELL/sys/etc/default.csh #set echo if ($?UUFSCELL) then #UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU # Arches global initialization set GRP = `echo $UUFSCELL | cut -d . -f 2` if ($GRP == "arches") then # 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/arches/sys/bin:/uufs/$UUFSCELL/sys/bin:$PATH" if !($?MANPATH) then setenv MANPATH /uufs/arches/sys/man:/uufs/$UUFSCELL/sys/man:`manpath` else setenv MANPATH "/uufs/arches/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/arches/sys/pkg/pgi/std/etc/pgi.csh #source Pathscale defines source /uufs/arches/sys/pkg/pscale/std/etc/pscale.csh # Totalview source /uufs/arches/sys/pkg/totalview/std/etc/totalview.csh # GAUSSIAN03 # source /uufs/arches/sys/pkg/gaussian03/std/etc/g03.csh # Matlab source /uufs/arches/sys/pkg/matlab/std/etc/matlab.csh # TAU # source /uufs/arches/sys/pkg/tau/std/etc/tau.csh # ITA # source /uufs/arches/sys/pkg/ita/std/etc/ita.csh # Intel compilers # source /uufs/arches/sys/pkg/intel/ifort/std/bin/ifortvars.csh # NWCHEM # source /uufs/arches/sys/nwchem/etc/nwchem.csh #Babel # source /uufs/arches/sys/openbabel/etc/babel.csh #Molpro # source /uufs/arches/sys/molpro-serial/etc/molpro.csh #Dalton # source /uufs/arches/sys/dalton-serial/etc/dalton.csh #Dock # source /uufs/arches/sys/pkg/dock/etc/dock.csh #Autodock # source /uufs/arches/sys/pkg/autodock/etc/autodock.csh # Cambridge Structural Database # source /uufs/arches/sys/pkg/CSD/std/cambridge/etc/csd.csh # VMD # setenv PATH "/uufs/arches/sys/pkg/vmd/vmd-std:$PATH" endif # Follow specific cluster initializations #--------------------------------------------------------------------- # do Landscapearch specific initializations if ($UUFSCELL == "landscapearch.arches") then # source MPICH2 defines source /uufs/arches/sys/pkg/mpich2/std/etc/mpich2.csh # additional user customizations below here setenv LD_LIBRARY_PATH "/uufs/arches/sys/pkg/pgi/std/linux86-64/6.2/lib:/uufs/landscapearch.arches/sys/pkg/mx-2g/std/lib64:$LD_LIBRARY_PATH" #----------------------------------------------------------------------------- # Do Tunnelarch specific initializations else if ($UUFSCELL == "tunnelarch.arches") then # source MPICH2 defines source /uufs/arches/sys/pkg/mpich2/std/etc/mpich2.csh # additional user customizations below here #----------------------------------------------------------------------------------- # Do Delicatearch specific initializations else if ($UUFSCELL == "delicatearch.arches") then # set path to MPICH-MX setenv PATH "/uufs/delicatearch.arches/sys/pkg/mpich-mx/std/bin:$PATH" setenv LD_LIBRARY_PATH "/uufs/delicatearch.arches/sys/pkg/mx-2g/std/lib64:$LD_LIBRARY_PATH" # additional user customizations below here #-------------------------------------------------------------------------------------- # Do Marchingmen specific initializations else if ($UUFSCELL == "marchingmen.arches") then # source MPICH2 defines source /uufs/arches/sys/pkg/mpich2/std/etc/mpich2.csh #----------------------------------------------------------------------------------- # Do Sanddunearch specific initializations else if ($UUFSCELL == "sanddunearch.arches") then # source MPI defines - we recommend MVAPICH2 # source /uufs/sanddunearch.arches/sys/pkg/mvapich/std/etc/mvapich.csh source /uufs/sanddunearch.arches/sys/pkg/mvapich2/std/etc/mvapich2.csh # source /uufs/sanddunearch.arches/sys/pkg/openmpi/std/etc/openmpi.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 1 -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 source $met_include source /uufs/arches/sys/pkg/intel/ifort/std/bin/ifortvars.csh source /uufs/arches/sys/pkg/intel/icc/std/bin/iccvars.csh # Do Telluride specific initializations else if ($UUFSCELL == "telluride.arches") then source /uufs/arches/sys/pkg/mkl/std/tools/environment/mklvarsem64t.csh source /uufs/arches/sys/pkg/intel/ifort/std/bin/ifortvars.csh source /uufs/arches/sys/pkg/intel/icc/std/bin/iccvars.csh setenv MPI_SHELL /usr/bin/rsh endif #--------------------------------------------------------------------- # do stats specific initializations if ($UUFSCELL == "stats") then limit stacksize unlimited # default path addon setenv PATH "/uufs/$UUFSCELL/sys/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 1 -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 # 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 Slickrock specific initializations else if ($MYHOST == $SROCK1) then # additional user customizations below here #-------------------------------------------------------------------------------------- # 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 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 #--------------------------------------------------------------------- # 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