Login script: Difference between revisions

From Fluids Wiki
Jump to navigation Jump to search
(Accounts are now created with these settings so new users don't need to set it up themselves. -- RBLanders)
(Revised settings to go along with latest SPINS set-up file for hood. Clarified explanations a bit more. -- RBLanders)
Line 1: Line 1:
Home directories are shared among hood/thelon/winisk/kazan. If your account uses bash at all of these machines, then they will run the same login script (.bash_profile). Similarly if your account uses csh (or tcsh) they will run the same
Home directories are shared among hood/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).
.cshrc. This is a Good Thing, except that some paths differ between the systems. Below is some code for bash users that will set the correct paths by checking the current system. Paste the code into your $HOME/.bash_profile and you should have the correct paths at all four systems. If any of these paths change, please update this wiki page.


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. If your account is older than that, you can run the command "init_home" on hood to get 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 Thing, except that some paths differ between the systems. Below is some code for bash users that will set the correct paths by checking the current 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 correct paths on all four systems.
 
If your account is older than that, you have two options:
 
# 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.)
# You can edit your existing $HOME/.bash_profile (assuming you use bash) 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.
 
If any of these paths change, please update this wiki page.
 
----


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 9: Line 21:
   source /opt/intel/bin/iccvars.sh intel64
   source /opt/intel/bin/iccvars.sh intel64


   # We don't have Intel MPI, so prepend the path to OpenMPI's mpirun
   # We don't have Intel MPI, so use an OpenMPI module
   export PATH=/usr/lib64/openmpi/bin:$PATH
   module load openmpi-1.10-x86_64
 
  # Also add this path so the OpenMPI library can be found at runtime
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/openmpi/lib
fi
fi



Revision as of 15:19, 23 September 2016

Home directories are shared among hood/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).

This is a Good Thing, except that some paths differ between the systems. Below is some code for bash users that will set the correct paths by checking the current 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 correct paths on all four 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 (assuming you use bash) 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.

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


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 -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