Handed out in class were the userids and passwords for your accounts on the SP2. If you missed class, please email me for this information.
telnet cluster.oac.ucla.eduI put a default .cshrc file in each person's directory that initializes the following values. If you change to a different shell (using 'chsh') like bash or ksh, you will have to set these up yourself.
The Parsec compiler will be in the following directory, so add it to your default path:
/u/data02/ieczmay/parsec/binIf your default shell is csh or tcsh, you can do this with the following command:
set path=($path /u/data02/ieczmay/parsec/bin)In order to run Parsec programs on the SP, you need to set three environmental variables.
setenv MP_PROCS 4 #or number of processors you wish to use setenv MP_HOSTFILE hostfile #hostfile is a list of nodes, see below setenv MP_EUILIB ipIn order to run your program on multiple processors, you need to create a hostfile (a regular text file). You probably should put this in your home directory, and then define MP_HOSTFILE with the absolute path. The contents of the file should be:
f01n09.sp f01n10.sp f01n11.sp f01n12.sp f01n13.sp f01n14.sp f01n15.sp f01n16.spThese are the names of the SP2's interactive nodes (processors). To use more than 8 processors, you can repeat the names, or you can add alpha, beta, gamma, and delta.
pcc -o binary_name program_fileTo compile your Parsec program for parallel execution, type:
pcc -sync mpc -o binary_name program_fileTo run your program in parallel, type:
binary_name -procs 4(if procs is not specified, MP_PROCS processors are used)
message Init {
ename other;
};
message Ping { };
entity Delay() {
ename other;
receive (Init i) {
other = i.other;
}
while (1) {
receive (Ping p) {
send p to other;
}
}
}
entity driver(int argc, char** argv) { /* must use char** */
ename e1;
ename e2;
e1 = new Delay() at 0;
e2 = new Delay() at 1;
send Init{e2} to e1;
send Init{e1} to e2;
send Ping{} to e2;
}