This lab session is intended to introduce you to parallel programming with MPI on the NERSC machines. We will be using the machine named Bassi for this course.
At this point, you should have your sent your TA (Tomofumi for the on campus course, and Nissa for online) the information requested to create your account. If you have received an email from NERSC about your account but you have not signed and faxed the usage policy form, download the form from the NERSC accounts webpage, sign it and fax it to (+1) 510-486-4248. After you have faxed the form, call NERSC at 1-800-66-NERSC menu option 2 to get your username and initial password.
After you have your account information from NERSC, try logging in to bassi.nersc.gov:
ssh bassi.nersc.gov -l <username>
where username is the username assigned to you by NERSC.
Bassi uses a system called LoadLeveler to run jobs in parallel. Jobs can be submitted to LoadLeveler using the llsubmit command. The llsubmit command expects a script name as an argument. The script contains commands and LoadLeveler keywords. A sample script is available here. The important variables declared in the script are:
#@ account_no = m853We will be using the same account number for all programs done in this class.
#@ output = myjob.outThis variable tells LoadLeveler where to write the output of your code.
#@ error = myjob.errThis variable tells LoadLeveler where to write error messages (if any).
#@ tasks_per_node = 2This sets the number of processes to run on each node.
#@ node = 1This sets the number of nodes to use. For this excercise, keep this value as 1.
#@ queueThis must be the last variable in the script.
The last line of the script is the executable to be executed.
Use the llqs command to check the status of your job. Use the -u option to see only jobs that you have submitted:
llqs -u <username>A more complete description of LoadLeveler is available at the NERSC website.
A short description of the circuit satisfiability problem can be found in the lab presentation.
The C code for the lab is here. To run the code:
ssh -l <username> bassi.nersc.gov
mpcc -o <nameofexecutable> <filename.c>
llsubmit myjob