Login script: Difference between revisions

From Fluids Wiki
Jump to navigation Jump to search
(Add .profile set-up for the mountain lake machines. Add entire thing for csh. Some rewording.)
(add fragments for sutton, rondeau, pelee)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Home directories are shared among hood, bow, minnewanka, waterton, kesagami, kuujjua, thelon, winisk, kazan. If your account uses bash for its login shell on all of these machines, then they will run the same bash login script (such as .profile, .bash_profile). Similarly if your account uses csh (or tcsh) they will run the same csh login script (.cshrc).
Home directories are shared among sutton, pelee, rondeau, hood, bow, minnewanka, waterton, kesagami, kuujjua. If your account uses bash for its login shell on all of these machines, then they will run the same bash login script (such as .profile, .bash_profile). Similarly if your account uses csh (or tcsh) they will run the same csh login script (.cshrc).


This is a Good Thing, except that some paths differ between the systems. Below is some code for bash and csh users that will set the recommended environment for each system.
This is a Good Thing, except that some paths differ between the systems. Below is some code for bash and csh users that will set the recommended environment for each system.
Line 27: Line 27:
fi
fi


if [ `hostname -s` = "thelon" ]; then
  # Source the Intel compiler suite variables
  source /opt/intel/Compiler/11.1/064/bin/iccvars.sh intel64
  source /opt/intel/Compiler/11.1/064/bin/ifortvars.sh intel64
fi
if [ `hostname -s` = "winisk" ] || [ `hostname -s` == "kazan" ]; then
  # Source the Intel compiler suite variables
  source /opt/intel/Compiler/11.1/064/bin/iccvars.sh ia64
  source /opt/intel/Compiler/11.1/064/bin/ifortvars.sh ia64
  # Ensure that mpirun is in the PATH
  export PATH=$PATH:/opt/sgi/mpt/mpt-2.01/bin
  # Ensure that the MPI library can be found at runtime
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/sgi/mpt/mpt-2.01/lib/
  # Add the SCSL paths
  export LD_LIBRARY_PATH=/opt/scsl/lib:$LD_LIBRARY_PATH
  export INCLUDE=/opt/scsl/include:$INCLUDE
fi
if [ $HOSTNAME = "bow" ] || [ $HOSTNAME = "minnewanka" ] || [ $HOSTNAME = "waterton" ]; then
if [ $HOSTNAME = "bow" ] || [ $HOSTNAME = "minnewanka" ] || [ $HOSTNAME = "waterton" ]; then
     # load recommended modules
     # load recommended modules
     module load matlab/2017a-research
     module load matlab/2020a-research
     module load mpt/2.16
     module load hmpt/2.25
     module load slurm/17.11.8
     module load slurm
fi
fi
if [ $HOSTNAME = "fluids-pr1-01" ]; then
if [ $HOSTNAME = "fluids-pr1-01" ]; then
     # SLURM head node a.k.a. fluidssubmit.math.private
     # SLURM head node a.k.a. fluidssubmit.math.private
     module load slurm/17.11.8
     module load slurm
fi
fi
if [ $HOSTNAME = "sutton"] || $HOSTNAME = "pelee" ] || ] $HOTNAME = "rondeau" ]; then
    module load matlab/2022b-research
fi
</syntaxhighlight>
</syntaxhighlight>


Line 74: Line 58:
          
          
endif   
endif   
if ( $HOST == "thelon" ) then
 
    # Source the Intel compiler suite variables
    source /opt/intel/Compiler/11.1/064/bin/iccvars.csh intel64
    source /opt/intel/Compiler/11.1/064/bin/ifortvars.csh intel64
endif 
if ( $HOST == "winisk" || $HOST == "kazan" ) then
    # Source the Intel compiler suite variables
    source /opt/intel/Compiler/11.1/064/bin/iccvars.csh ia64
    source /opt/intel/Compiler/11.1/064/bin/ifortvars.csh ia64
 
    # Ensure that mpirun is in the PATH
    setenv PATH ${PATH}:/opt/sgi/mpt/mpt-2.01/bin
 
    # Ensure that the MPI library can be found at runtime
    setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/opt/sgi/mpt/mpt-2.01/lib/
 
    # Add the SCSL paths
    setenv LD_LIBRARY_PATH /opt/scsl/lib:${LD_LIBRARY_PATH}
    setenv INCLUDE /opt/scsl/include:${INCLUDE}
endif 
if ( $HOST == "bow" || $HOST == "minnewanka" || $HOST == "waterton" ) then
if ( $HOST == "bow" || $HOST == "minnewanka" || $HOST == "waterton" ) then
     # load recommended modules  
     # load recommended modules  
     module load matlab/2017a-research
     module load matlab/2020a-research
     module load mpt/2.16
     module load hmpt/2.25
     module load slurm/17.11.8
     module load slurm
endif   
endif   
if ( $HOST == "fluids-pr1-01" ) then
if ( $HOST == "fluids-pr1-01" ) then
     # SLURM head node a.k.a. fluidssubmit.math.private
     # SLURM head node a.k.a. fluidssubmit.math.private
     module load slurm/17.11.8
     module load slurm
endif
 
if ( $HOST == "sutton" || $HOST == "pelee" || $HOST == "rondeau" ) then
    module load matlab/2022b-research
endif   
endif   


</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 16:55, 17 April 2024

Home directories are shared among sutton, pelee, rondeau, hood, bow, minnewanka, waterton, kesagami, kuujjua. If your account uses bash for its login shell on all of these machines, then they will run the same bash login script (such as .profile, .bash_profile). Similarly if your account uses csh (or tcsh) they will run the same csh login script (.cshrc).

This is a Good Thing, except that some paths differ between the systems. Below is some code for bash and csh users that will set the recommended environment for each system.

As of September 2016, all new accounts created on hood will have .cshrc and .profile files that are already set up this way so no special steps are needed, and you'll have the recommended paths on all systems.

If your account is older than that, you have two options:

  1. You can run the command "init_home" on hood to get the new .cshrc and .profile files. Your old .cshrc and .profile get renamed, so you can reintegrate from them whatever other customizations you might have made. (This is a good choice if you have made few or no changes to your .cshrc or .profile previously.)
  2. You can edit your existing $HOME/.bash_profile or $HOME/.cshrc to include the following code. (This is a good choice if you have already customized your .cshrc or .profile a lot.)

Note that the SPINS set-up file for hood relies on these settings for Intel compilers and OpenMPI libraries. Similarly the recommended MITgcm set-up files rely on these recommended settings as well.

If any of these paths change, please update this wiki page.


For the bash login shell:

if [ `hostname -s` = "hood" ]; then
  # Source the Intel compiler suite variables
  source /opt/intel/bin/iccvars.sh intel64

  # We don't have Intel MPI, so use an OpenMPI module
  module load openmpi-1.10-x86_64
fi

if [ $HOSTNAME = "bow" ] || [ $HOSTNAME = "minnewanka" ] || [ $HOSTNAME = "waterton" ]; then
    # load recommended modules
    module load matlab/2020a-research
    module load hmpt/2.25
    module load slurm
fi
if [ $HOSTNAME = "fluids-pr1-01" ]; then
    # SLURM head node a.k.a. fluidssubmit.math.private
    module load slurm
fi

if [ $HOSTNAME = "sutton"] || $HOSTNAME = "pelee" ] || ] $HOTNAME = "rondeau" ]; then
    module load matlab/2022b-research
fi

For the csh login shell:

if ( $HOST == "hood" ) then
    # Source the Intel compiler suite variables
    source /opt/intel/bin/iccvars.csh intel64
  
    # We don't have Intel MPI, so load the OpenMPI module
    module load openmpi-1.10-x86_64
        
endif   
   
if ( $HOST == "bow" || $HOST == "minnewanka" || $HOST == "waterton" ) then
    # load recommended modules 
    module load matlab/2020a-research
    module load hmpt/2.25
    module load slurm
endif   
if ( $HOST == "fluids-pr1-01" ) then
    # SLURM head node a.k.a. fluidssubmit.math.private
    module load slurm
endif

if ( $HOST == "sutton" || $HOST == "pelee" || $HOST == "rondeau" ) then
    module load matlab/2022b-research
endif