3 - bgu ee

/12/2005
[email protected]
/12/2005
'
#$ " !
% &%
!
Condor - Parameter sweep using Condor
Assume a 2D problem, z=f(x,y) where:
0(x(2 , in 0.1 steps
0(y(2 , in 0.1 steps
Therefore, we have 63 values of x and 63 independent
values of y.
Let: z(x,y)=sin(x)*cos(y)
Submit to Condor 3,969 jobs (632) to calculate z(x,y).
Do the work in 3 steps:
1) Pre-processing: Write a short script/program that
generates the submit file.
2) Submit the job
3) Post processing: Write another short program, e.g. in
Octave/Matlab macro that merges the data and
generates a mesh plot of the final result, see Figure 1.
References:
Condor: http://www.cs.wisc.edu/condor
Condor manual:
http://www.cs.wisc.edu/condor/manual/v6.6/
Octave tutorial:
http://www.aims.ac.za/resources/tutorials/octave/index.p
hp
Figure 1: Mesh plot of z(x,y)=sin(x)*cos(y)
Submit your job from the Linux cluster. The
executable can be either for Linux or Windows.
Pay attention to the "Notification" level.
Send all your files (documentation, pre-processing
macro, the submit file, the executable and the postprocessing macro together with the output image).
Create a single archive "tar" file from all the files!
If it is too big then also "gzip" it!!!
Note: if you don't know what "tar" or "gzip" mean, type "man"
to find out! See also a hint at the end of this document.
Shared Memory programming
"
Use the "omni" – OpenMP compiler.
Further information about this compiler was given in
class. See also this link:
http://phase.hpcc.jp/Omni/home.html
*Don't forget to set an environment variable for the number of threads.
1) Write a short code that calculates the following
integral:
Use exactly two threads in your program: The first thread
to calculate the numerator (
) and the second thread to
calculate the denominator ( ! ).
Make sure that the same code (or a code very nearly to
the parallel code) can be executed serially.
Measure the execution time in both cases (serial and
parallel) for the same values of 'a' and 'x' – write your
conclusions!
Now, write another version of the parallel program. This
time, one thread calculates the even terms and the second
thread calculates the odd terms. Repeat this case twice:
First use a private clause and a critical section and then
use a reduction operation.
Add a profiling charts for all the cases (a screen dump)
of "tlogview"- Omni tlog visualization tool
Ref: http://phase.hpcc.jp/Omni/Omni-doc/tlogview.html
Add your conclusions.
Submitting your assignment: As in the first section: make
a gzipped tar file from all your files (serial codes, two
parallel codes, other documentations…)
See this example:
Suppose you want to submit to [email protected] 3 files:
file1, file2 and file3 then do the following:
tar cvf bigfile.tar file1 file2 file3
then do gzip bigfile.tar and get bigfile.tar.gz
This is the file you will want to submit to the TA.
Good luck!
Version: 2.0, Last update: 12/12/2005, 12:20PM Guy Tel-Zur