Hello!
I'm a new user of OpenMP and I really like it!
Unfortunately I still have lot of troubles to deeply understand what exactly is going on when parallel threads are launched...
My problem is:
I need to solve two different systems Ax1=b1 and Ax2=b2.
I wrote two different solvers, one running on the CPU and the other running on the GPU. The solver running on the CPU is parallelized with OpenMP.
I have an 8-Cores Mac Pro and I was wondering if I can use 1 Thread (Core) to launch the GPU solver, and the others 7 to solve the second system on the CPU, all in parallel.
I tried this solution:
solve()
{
omp_set_num_threads(2);
#pragma omp parallel
{
#pragma omp sections
{
#pragma omp section
solve_cpu();
#pragma omp section
solve_gpu();
}
}
}
The method solve_cpu() will call omp_set_num_threads(7) when it has to execute something in parallel, i.e. before #pragma omp parallel...
Unfortunately when I launch solve() my application doesn't respond anymore...
I tested both the CPU and GPU solvers independently but I can not run them "together".
I hope someone can help me to understand my situation!
Thanks in advance!!
Best,
dario
