This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/35644] New: omp_set_num_threads not working?
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2008 23:17:45 -0000
- Subject: [Bug libgomp/35644] New: omp_set_num_threads not working?
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This program aborts, much to my surprise.
#include <stdlib.h>
#include <omp.h>
int main()
{
// Explicitly set number of threads.
const int threads_wanted = 20;
omp_set_dynamic(false);
omp_set_num_threads(threads_wanted);
if (omp_get_num_threads() != threads_wanted)
abort();
// Do work.
return 0;
}
This is very similar to the omp_set_dynamic example in the OpenMP 3.0 draft
spec . See page 270.
--
Summary: omp_set_num_threads not working?
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgomp
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bkoz at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35644