Is this data access latency issue.

General OpenMP discussion

Is this data access latency issue.

Postby myfeng » Thu May 01, 2014 4:48 pm

I am trying to parallelize my problem which takes 6 or 7 seconds in sequential mode.
Basically the sequential loop is a=6, b = 8000, c=150.
My OpenMP code looks like:
#pragam omp parallel
for( int = 0; i<a; i++)
{
// loop b
{
// loop c
{
call mkl library to solve a linear system 14X14 Ax=B
}
}
}
I measured each iteration in loop c it only takes 0.1ms to finish. so total run time with sequential code is about 0.1x6x8000x150 = 7.2 seconds. Now I changed number of thread to bigger number and it looks like there's no any gains. with 2-6 threads the run time was about 7 to 9 seconds. My computer has 16 cores, no Hyper threading. I also noticed run time of each iteration in loop c changed to bigger number from 0.1ms. I tried mkl-sequential and mkl-parallel same results. my guess is there's big latency from memory access when number of threads goes up. Does anybody have any ideas? thanks in advance.
myfeng
 
Posts: 5
Joined: Fri Feb 19, 2010 10:27 am

Re: Is this data access latency issue.

Postby MarkB » Fri May 02, 2014 1:53 am

First of all, are you certain you are measuring wall clock time and not accumulated CPU time across all threads?
If so, please could you post the real code?
MarkB
 
Posts: 480
Joined: Thu Jan 08, 2009 10:12 am
Location: EPCC, University of Edinburgh

Re: Is this data access latency issue.

Postby myfeng » Fri May 02, 2014 8:19 am

Thanks for your response. I am sure my time measuring was correct.
I actually searched other threads and I found the answer from them. The reason was there are a lot temporary matrix objects in the most inner loop and they needed the heap to allocate/deallocate memory.
The performance is great now after I fixed allocation/deallocation memory.

thanks,
myfeng
 
Posts: 5
Joined: Fri Feb 19, 2010 10:27 am


Return to Using OpenMP

Who is online

Users browsing this forum: No registered users and 11 guests