Thursday, January 31, 2008

Open MP on IXP

I did some searching and from what I can tell the program should work on the IXP platform with the OpenMP parallelization. I have found no reason why it would not work and several things that hint that it will.
  • OpenMP is compatible with Intel compilers
  • Intel seems to have had a part in the development of OpenMP
  • I found a paper that mentioned OpenMP on the IXP 1200 line and it also said that their work should apply to the IXP 2xxx models
It seems like this platform would work fine for our purposes of running the rulecache code in parallelized form.

Tuesday, January 29, 2008

For loops with OpenMP

Yesterday, we succeeded in parallelizing a serial program. Today, I tried to parallelize loops in programs. I tried one program with a for loop, and another one with two embedded for loops. Both work well. We may start to parallelize loops in rulecache.c soon.

Monday, January 28, 2008

OpenMP GCC 4.2

The installed version of gcc on my machine is 4.1.2. I tried to install gcc 4.2 but the disk quota exceeded. I checked with cs lab and they said gcc 4.2 is currently installed under /s/gcc-4.2.1/bin and /s/gcc-4.2.2/bin.

Bryan and I figured out how to run programs using OpenMP. We succeeded in a simple hello.c program, as shown below.

% /s/gcc-4.2.2/bin/gcc -fopenmp hello.c -o hello.o
% hello.o
Hello World from thread 1
Hello World from thread 0
There are 2 threads

We will continue to work on other examples to get familiar with OpenMP.

Friday, January 25, 2008

OpenMP

After reading up on the OpenMP API I think this would be a good choice for us to use for parallelizing the code. It is cross platform and works with C and C++ on Windows, Unix, and Solaris. The GCC compiler version 4.2 and above have OpenMP support, the file omp.h needs to be included for the OpenMP functions.

Wikipedia Entry

Wednesday, January 23, 2008

Hardware

We are looking at parallelizing the code and Suman wants us to implement the code on server hardware so we are looking into different options with this. One being Sun's Niagara processor which would be nice since it runs Solaris 10 which has OpenMP support that would make parallelizing the code fairly straightforward.

Yadi and I are reading up on the OpenMP documentation and examples.

Wednesday, January 9, 2008

Parallelization

I've been looking into methods for parallelizing the code for the project. So far most of the stuff that I have found has been for C++ or some other language, I am having trouble finding something for C.

For us to be able to parallelize a for loop, we basically just have to make sure that all of the iterations can be performed independently and none depend on the next/previous iteration.

Dheeraj recommended looking at Threading Building Blocks (TBB) which come from Intel.
I started reading through their website and they have some examples and tutorials which seem fairly helpful. I'm going to read up on it some more and see if I can go through some simple examples to get used to the syntax and see if it will be possible to use this for our code. (It says that it is for C++)

Tuesday, January 8, 2008

Looking ahead

I meet with Dheeraj just before break to discuss the code. Suman wants to look at parallelizing the code as much as possible to speed up the update calculation. Dheeraj pointed out the parts of the code that take the longest to run and suggested that I try to parallelize some for loops in that section.

Dheeraj also suggested that I should read over the sigmetrics paper to learn more about the way the rules and modifications to the rules are handled in the code because we want to maintain the same semantic equivalence of the rules when parallelizing the calculation.

I am currently reading through the paper and looking into parallelization techniques.