Valkyrie should only be used for parallel program development and measurement. If you need to use a Linux or UNIX system, please use your student account on the Solaris machines in the Advanced Programming Environment (APE) lab, located in APM 6426.
ACS has set up a web page providing documentation on how to use Valkyrie: http://acs.ucsd.edu/info/rocks.php
Here are additional instructions about software we've added to simplify
the use of the machine.
It doesn't appear that you have set up your ssh key.
This process will make the files:
/home/cs160s/<your account>/.ssh/identity.pub
/home/cs160s/<your account>/.ssh/identity
/home/cs160s/<your account>/.ssh/authorized_keys
Generating public/private rsa1 key pair.
You will then be asked 3 questions shown below. Be sure
to hit carriage return (entering no other input) in response to
each question:
Enter file in which to save the key (/home/cs160s/<your
account>/.ssh/identity):
Created directory '/home/cs160s/<your account>/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/cs160s/<your
account>/.ssh/identity.
Your public key has been saved in /home/cs160s/<your
account>/.ssh/identity.pub.
The key fingerprint is:
<several 2 digit hex numbers separated by :> <your
account>@valkyrie.ucsd.edu
We'll be using the bash shell. Set up two files in your home directory: .profile and .bashrc There are default copies of these files stored in ~/../public: profile and bashrc (that is without the leading "dot").
We'll use a special version of the Gnu C++ compiler that incorporate the MPI libraries. To use these compilers, you must have the following environment variable set:
export PATH=/opt/mpich/myrinet/gnu/bin:$PATH
You may also want to set the MANPATH so you can access the MPI manual pages:
MANPATH=/opt/mpich/myrinet/gnu/man:$MANPATH
These are set for you in the default profile we provided.
(The default profile also defines the PATH to
include /home/cs160x/public/bin.)
Note:
the ACS web page at
http://rocks.npaci.edu/papers/rocks-documentation/book1.html
is out of date. The correct PATH and MANPATH
for MPI are as described here.
Run your program with the mpirun command. (Be sure to run this program in your own directory) The command provides the -np flag so you can specify how many nodes to run on. There are 16 nodes numbered 0 through 15.
To establish that your environment has been set up correctly, compile and run the parallel "hello world" program. This program prints "Hello World'' from each process along with the process ID. It also reports the total number of processes in the run. The hello world program is found in ~/public/examples/Basic/hello. To run the program use mpirun as follows:
mpirun -np 2 ~/../public/examples/Basic/hello
Here is some sample output:
# processes: 2 Hello world from node 0 Hello world from node 1Note that any command line arguments come in the usual position, after the name of the executable. Thus, to run the Ring program(found in ~/../public/examples/Ring) on 4 processes with command line arguments -t 5 and -s 1024, type:
mpirun -np 4 ~/../public/examples/Ring/ring -t 5 -s 1024
Sometimes you'll want to specify particular nodes to run on. To do this you need to specify a machines file listing the names of the physical nodes. The command line sequence takes the following form
mpirun -np <# NODES> -machinefile <MACHINE_FILE>
The machine file contains a list of physical node names, one per line. The nodes are numbered from 0 to 15, and are named compute-0-0 through compute-0-15. (Each node contains 2 CPUs, but in effect you may use only 1 CPU per node.) Thus, to run the ring program with nodes 6, 7, 11, 14 as logical processes; 0-3, create the following file, say mfile:
compute-0-6 compute-0-7 compute-0-11 compute-0-14To, run, type
mpirun -np 4 -machinefile mfile ~/../public/examples/Ring/ring -t 5 -s 1024
Note: if you previously had set up a config file, you must ensure that the first entry in your machine file matches the first entry in the config file.
Note, we have provided a program to generate randomized machine files. It is found in ~/../public/bin/randMach.py. (A python script). The command line argument specifies the number of processors in the machine file. For example, the command randMach.py 7 > mach was used to generate the following 7-line machine file:
compute-0-8 compute-0-0 compute-0-1 compute-0-15 compute-0-4 compute-0-9 compute-0-2
To link with MKL use the following on your load line
${MKLPATH}/libmkl_lapack.a ${MKLPATH}/libmkl_ia32.a ${MKLPATH}/libguide.a -lpthread
where ${MKLPATH} has been set as follows (i.e.
in your .bash_profile file):
export MKLPATH=/opt/intel/mkl61/lib/32
If you want to use the FFT or DFT, add -lm to your link line.
Documentation can be found at http://developer.intel.com/software/products/mkl/docs/mklqref/index.htm or at http://www.phys.ksu.edu/~esry/Computing/Documentation/NewIntelLib/
Sometimes runaway processes will persist after a run.
This might occur if you break a run using control/C.
If you feel that the machine is slowing down run the command
ganglia load_one | sort -n -k 2
which will shows sorted load on each node. Since there are 2 CPU per node
the load should be not more that
2.5 or so (i.e., there are maximum 2 PBS jobs running per node) unless there are
other processes running on the node.
This behavior could be due to valid user jobs or due to runaway processes. .
If you observe a load average higher than 3 run the
following command to check your processes on all nodes:
cluster-ps <username>If you see that some processes are running, use the cluster-kill command to delete them:
cluster-kill <username>If any nodes are down, and the commands will detect this (there should be no delay)
Next, re-run the ganglia command
shown above. If the load average is still high, then check the status of
all users
on valkyrie
by running the following
cluster-fork 'ps awx' | sed -f ~/../public/bin/cl.sed
The sed script will clear out a lot of unnecessary status information.
MPI documentation is found at at http://www.cse.ucsd.edu/classes/sp04/cse160/testbeds.html#MPI. You can obtain man pages for the MPI calls used in the example programs described here at http://www-unix.mcs.anl.gov/mpi/www/www3/:
Copyright © 2003 Scott B. Baden. Last modified: 11/03/03 10:30 AM