Setup your working enviroment on clusters
Intro: The HP XC-4000 cluster uses modules to control your working environment and path or library path.
Step 1. Setup the ssh passwordless connection among nodes in the cluster for your application.( Your still need to input password in order to logon to the cluster from your own desktop!!)
A. In your home directory, you have a file called ".bashrc" (It is hidden, so you need to use command "ls -al" to see this file)
Now, edit the .bashrc file to what you see below.
Note: If you are a linux/Unix beginner and you regularly use a Windows system, please make sure you use a "clean" text editor to generate files/scripts that will be used in the linux/unix system. We strongly suggest you use TextPad (download from www.textpad.com/download/index.html) to edit the plain text file in Windows.
If you happen to use another other Windows-based software, it is VERY likely your script will contain some characters that will prevent it from running correctly in Linux.
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
if [ ! -r .ssh/authorized_keys ] ; then
ssh-keygen -t rsa
cp .ssh/id_rsa.pub .ssh/authorized_keys
fi
B. Save the file, logout and re-login
After you re-login, you will see the following prompt information, just ignore it and hit "enter" three times
Generating public/private rsa key pair.
Enter file in which to save the key (/shr/home/testy/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /shr/home/testy/.ssh/id_rsa.
Your public key has been saved in /shr/home/testy/.ssh/id_rsa.pub.
The key fingerprint is:
26:b7:0d:95:3e:7f:50:b8:44:9b:c3:3e:d5:54:bb:f0testy@n137
C. If you have account in RCCLU, try to ssh between node n136 and node n137. If you have account in HPRES, try to ssh between n254 and n255. In either case, if no password request prompts, you have successfully setup the passwordless connection in the cluster
Step 2. Setting up Modelus and PATH.
You can use regular linux command such as "export" to configure your own environment. It might be easier to setup your working environment by utilizing the modules provided by HP in the XC cluster system..
HP provides several existing tools/modules that you can use. Our system administrators also have added more modules for various applications. The modules files are located at /shr/modules.
To use them, you just simply load it in your .bashrc file
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
if [ ! -r .ssh/authorized_keys ] ; then
ssh-keygen -t rsa
cp .ssh/id_rsa.pub .ssh/authorized_keys
fi
# modules definitions
if [ -n "$MODULESHOME" ]; then
module use /shr/modules
module load mpi/hp/default
module load matlab/default
module load intel/cce/10.1/default
module load java/1.6/default
fi
In the above example, the system will load hp-mpi, matlab, intel c/c++ compiler and java compiler for you everytime you login.
Step 3. Enable your environment configuration
[testy@n137 ~] . .bashrc
Or, you can just logout and re-login.
Step 4. Check your modules
[testy@n137 ~] module list
Currently Loaded Modulefiles:
1) mpi/hp/default 2) matlab/default 3)intel/cce/10.1/default 4)java/1.6/default
You can check your mpicc or mpirun executable path as example
[testy@n137 ]$ which mpicc
/opt/hpmpi/bin/mpicc
[testy@n137 ~]$ which icc
/source/intel/cce/10.1.008/bin/icc
[testy@n137 ~]$ which matlab
/source/matlab2007b/bin/matlab
This indicates your environment has been setup correctly and you can begin to work and submit your job. You can unload your existing modules or load more modules
|