OpenMP vs. sieve

General OpenMP discussion

OpenMP vs. sieve

Postby Daggy » Mon Jun 09, 2008 11:19 am

Hello,

I am new to C++ programing and would like to resolve an important issue. Currently, I have a dual-core processor and am thinking of buying a quad-core later this year. I do statistical programing (Matlab, Octave) and speed (= efficient programing) is everything when it comes to computing large chunks of data.

I have been reading about OpenMP and Sieve and though I do not know clearly it seems to me that you need to take account of how many processor cores you have before writing something in OpenMP. So if you have written something for a dual-core system, then you have to rewrite it in order to take full advantage of a quad-core system.

In Sieve, this is not needed because the computer can automatically identify any threads that can be parallelized and they are sent to any core being idle at the moment. Thus, the need to rewrite any piece of code does not apply when using a different system.

Tell me if I am wrong. Besides, Sieve seems to have be commercial (Codeplay) and because I am a friend of the GNU concept, I will not use programs and applications that are not available under the GPL license. But I would like to know.

Dag
Daggy
 

Re: OpenMP vs. sieve

Postby ejd » Wed Aug 13, 2008 11:30 pm

I am not familiar with Sieve. However, OpenMP doesn't have to be re-written to use a different number of cores (or processors). You just set an environment variable or add/change a clause on the parallel regions. It however does require there to be sufficient work to make use of the cores. Otherwise, you might see a slowdown rather than a speedup. As for licensing, OpenMP is implemented in the more recent versions of gnu gcc, g++, etc.
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am


Return to Using OpenMP

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 8 guests