speed down problem on sections.

General OpenMP discussion

speed down problem on sections.

Postby suyingych » Sun Sep 07, 2008 5:27 am

Hi,all,

could anyone refer me to a good tutorial on the sections in openmp? For instance, if I call the same FFT function in three sections, the function has an array-based input variables. I'm using C++ under Windows OS. But I found that it takes almost the same time as noomp. I don't know why.
The programme is simplied, given below:

typedef struct _SCPLX
{
float re;
float im;
} SCplx;

SCplx SumReturnWave[1000000];
SCplx AziReturnWave[1000000];
SCplx EleReturnWave[1000000];

#pragma omp parallel
{
#pragma omp sections
{
#pragma omp section
{
nspfft(SumReturnWave);
}
#pragma omp section
{
nspfft(AziReturnWave);
}
#pragma omp section
{
nspfft(AziReturnWave);
}
}
}
suyingych
 
Posts: 5
Joined: Thu Jul 17, 2008 8:04 am

Re: speed down problem on sections.

Postby ejd » Sun Sep 07, 2008 7:06 am

A little more information would be of help. What implementation of OpenMP are you using? How many processors are you running this on? What type of processor are you running this on?
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Re: speed down problem on sections.

Postby suyingych » Mon Sep 08, 2008 6:17 am

I use OpenMP 2.5 VC2005 provided.My programme run on 2 CPU workstation using Hyper-Threading Technology. Nspfft(SCplx *wave) is FFT function NSP DLL provided.
suyingych
 
Posts: 5
Joined: Thu Jul 17, 2008 8:04 am

Re: speed down problem on sections.

Postby ejd » Mon Sep 08, 2008 9:45 am

Hyperthreading is quite different from running on a 2 CPU workstation. If you are using hyper-threading then I am not surprised that you are not seeing any speedup. If you are actually running on a 2 CPU workstation, then I would expect to see a better improvement. What type of processor are you actually using?
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Re: speed down problem on sections.

Postby suyingych » Thu Sep 11, 2008 6:22 am

My programme run on 2 CPU workstation,at the same time using Hyper-Threading Technology.So OMP_get_processors()=4; I try running programme on two occasions. one is a 2 CPU workstation without Hyper-Threading Technology (OMP_get_processors()=2), the other is the same 2 CPU workstation at the same time using Hyper-Threading Technology (OMP_get_processors()=4), I found the latter programme is quicker that the former under OMP. For latter, the whole programme use 140ms without OMP,when I use OMP , I only see a little improvement, it use 109ms. I expected it should use 50 or 60ms. So I don't know why.
I try replace nspcfft() with other function,I could see a better improvement as I expected, 3 sections with OMP could save 2/3 time than no using OMP.I don't know what's wrong with my original programme.
suyingych
 
Posts: 5
Joined: Thu Jul 17, 2008 8:04 am

Re: speed down problem on sections.

Postby ejd » Thu Sep 11, 2008 7:53 am

Thank you for clarifying your configuration. You would be amazed at how many people I have dealt with that say they are running on a 2 CPU system, that when I ask for clarification say that it is one chip with hyper-threading. It makes a big difference. Hyper-threading can improve performance of certain workloads by providing useful work to idle execution units of the processor. I believe Intel has claimed that hyper-threading can give up to a 30% improvement in speed over a similar non-hyper-threaded chip. I have also seen some FFT benchmark information showing up to an 80% degradation (because of things like cache misses) when using hyper-threading.

In your particular case, since I don't have the code (or the same machine configuration) to run and do performance measurements, I can only make a guess. I would say that part of the reason you are not seeing more speed-up, is that you might be expecting too much from hyper-threading. Another part of your problem could be your code, or the code generated by the VC2005 compiler and library. This was Microsoft's first implementation of OpenMP and I do not know how much work they put into the optimization of the code. If you have access to a good performance analyzer you should be able to see more about what is going on.

Sorry I can't be of more help. Maybe someone with more Intel and Microsoft experience can offer suggestions.
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Re: speed down problem on sections.

Postby suyingych » Wed Sep 17, 2008 5:43 am

Thanks for your help very much! Where could download openMP performance analyer ? By the way I used two chips ,at the same time using hyper-threading.
suyingych
 
Posts: 5
Joined: Thu Jul 17, 2008 8:04 am

Re: speed down problem on sections.

Postby ejd » Thu Sep 18, 2008 7:31 am

I am not sure what there is in the way of performance analysis tools for the Microsoft product. All I can do is suggest that you check their web site. You can also take a look at some of the other vendors that support Windows. If you go to the openmp.org web site you will see a header of "What's Here:" with a sub-bullet of "OpenMP Compilers". Looking at the page that comes up, you can see that GNU, IBM, Intel, and Microsoft all support Windows. I believe some of the others also support Windows, but you will have to look. You should be able to find several tools and most likely can download them for at least a free trial.
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], Yahoo [Bot] and 9 guests