Setting the number of processor to run.

General OpenMP discussion

Setting the number of processor to run.

Postby cluster1321 » Wed Jan 16, 2008 1:03 pm

hi all,
I would like to know that Can I set the number of processor to run openmp program?
I have used SGI ( 4 core per 1 machine ) I would like to use only 2 processor.

thaks so much,
diakala
cluster1321
 
Posts: 4
Joined: Mon Dec 10, 2007 9:52 am

Re: Setting the number of processor to run.

Postby ejd » Wed Jan 16, 2008 1:50 pm

There are several ways to specify the number of threads to use (which roughly equates to the number of processors). You can use the OMP_SET_NUM_THREADS routine, the OMP_NUM_THREADS environment variable, or the NUM_THREADS clause on the parallel directive. You might also have to set OMP_DYNAMIC to "false" to make sure that the implementation doesn't change the number you specify.
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am


Return to Using OpenMP

Who is online

Users browsing this forum: Google [Bot] and 4 guests