Setting Environment Variables In System-Wide Startup Files; Editing Environment Variables In The Users Shell Startup Files - Cisco GEM318P User Manual

Host drivers for linux
Table of Contents

Advertisement

Editing Environment Variables

Setting Environment Variables in System-Wide Startup Files

This method is used to set a system-wide default for which MPI implementation is used. This method is
the easiest for end users; users who log in automatically have MPI implementations set up for them
without executing any special commands to find MPI executables, such as mpirun or mpicc. The
example below describes how to set up MVAPICH in system-wide startup files.
The following example shows how to make two system-wide shell startup files (one for Bourne shell
variants and one for C shell variants) that set up all users to use MVAPICH. These commands must be
run by the superuser on all nodes where MPI is used:
host1# echo 'export PATH=/usr/local/topspin/mpi/mpich/bin:$PATH' > /etc/profile.d/mpi.sh
host1# echo 'set path = (/usr/local/topspin/mpi/mpich/bin $path)' > /etc/profile.d/mpi.csh
host1# chmod 755 /etc/profile.d/mpi.sh /etc/profile.d/mpi.csh

Editing Environment Variables in the Users Shell Startup Files

This method allows users to have their own preference of which MPI to use, but it requires that users
manually modify their own shell startup files. Individual users can use this method to override the system
default MPI implementation selection.
All shells have some type of script file that is executed at login time to set environment variables (such
as PATH and LD_LIBRARY_PATH) and perform other environmental setup tasks. While your system
may be different,
up MPI upon login.
Table 7-1
Shell
sh (Bourne shell, or bash named sh)
csh
tcsh
bash
The following example shows how to edit the shell startup files of a user to use MVAPICH. If the user
uses the Bourne or Bash shell, edit the startup file after referring to
uses MPI, and add the following line:
export PATH=/usr/local/topspin/mpi/mpich/bin:$PATH
If the user uses the C or T shell, edit the startup file after referring to
line:
set path = (/usr/local/topspin/mpi/mpich/bin $path)
Cisco SFS InfiniBand Host Drivers User Guide for Linux
7-6
Table 7-1
lists some common shells and the startup files that might require edits to set
Common Shells and Startup Files
Startup File to Edit
$HOME/.profile
$HOME/.cshrc
$HOME/.tcshrc if it exists, or $HOME/.cshrc if it
does not
$HOME/.bashrc if it exists, or
$HOME/.bash_profile if it exists, or
$HOME/.profile if it exists (in that order)
Table 7-1
on all nodes where the user
Table
7-1, and add the following
Chapter 7
MVAPICH MPI
OL-12309-01

Advertisement

Table of Contents
loading

This manual is also suitable for:

St373307lcSfs infiniband

Table of Contents