openmp only running on one core

General OpenMP discussion

openmp only running on one core

Postby bedlamp » Mon Jul 14, 2008 3:04 pm

Hi

I'm currently writing an N-body simulation and attempting to use openmp to parallelise it. In the parallel parts I check the number of running threads and it is always exactly what I set it to, be it 2 or 4 or 20. The only problem is that when checking CPU utilisation, it is only running on one CPU (more specifically, one CPU core). Increasing the number of particles so that the significant part of the program is within the parallelised loop seems not to make any difference.

I am running linux on an AMD 5600+ dual core. omp_get_num_procs() returns 2

Any insight would be greatly appreciated.
bedlamp
 
Posts: 2
Joined: Mon Jul 14, 2008 2:52 pm

Re: openmp only running on one core

Postby bedlamp » Mon Jul 14, 2008 3:41 pm

nevermind. being an N-body simulation, load balancing was the real issue. openmp is working correctly, my brain is not
bedlamp
 
Posts: 2
Joined: Mon Jul 14, 2008 2:52 pm


Return to Using OpenMP

Who is online

Users browsing this forum: Exabot [Bot] and 5 guests