Home » Teaching » Parallel Computing

Parallel Computing


Sivan Toledo, Fall 2015

Thursday 15:00-18:00, קפלון 205

Link to a tentative syllabus.

Exercise 1

Presentation by Oded Schwartz for lectures 1, 2, 3 (coverage is not be 100%)

Intro to parallel computing an to Cilk

Parallel Matrix Algorithms

Installing and running Cilk Plus on Ubuntu 14.04:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-5
g++-5 -fcilkplus fib.cpp

Exercise 2

MPI on pollux:
mpicc par_pi.c
setenv LD_LIBRARY_PATH /usr/local/stow/openmpi-1.4.1/lib/openmpi-1.4.1/lib/
mpirun -n 1   ./a.out 300000000
mpirun -n 10 ./a.out 300000000

Lecture on MPI (by Rich Vuduc, Georgia Tech)

Exercise 3

Notes on running MPI programs in TAU:
To compile, use /usr/bin/mpicc
To run, use /usr/bin/mpirun (use -np to set the number of processes)
To run on the Condor cluster, put this script in the directory of your program and submit the following Condor script to Condor  (using condor_submit run.cmd):

# this file is run.cmd
DIR = $ENV(HOME)/Courses/mpi
universe   = parallel
Executable = condormpi.sh
Arguments  = $(DIR)/par_pi 300000000
log        = logfile
Log        = $(DIR)/pi.log
Error      = $(DIR)/pi.error.$(Process)
Output     = $(DIR)/pi.output.$(Process)
should_transfer_files = yes
when_to_transfer_output = on_exit
#transfer_input_files = par_pi_n100
machine_count = 4

Submitting this file to condor causes the binary par_pi to run with the argumnet 30000000 on 4 nodes. When the run ends, Condor moves the standard output and error files to the files specified by the script. The log file tracks the progress of the job. You can inspect the Condor queue with the command condor_q.

%d bloggers like this: