This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Sun Studio 12.1. It seems that "OpenMP" parameter for "Multithreading Level" does not work.
What do you mean by 'does not work'? Does the project not set the option, or does the compiler not like the option the project sets, or does the compiler do something wrong?
The reason is that default threads number for parallelization is 1. So you have to add function call like omp_set_num_threads(4); Also it's possible to set OMP_NUM_THREADS and OMP_DYNAMIC environment variables.
It is better to use OMP_DYNAMIC rather than anything else. Shouldn't we just add this variable to all "Runs" by default?
do we need this to be fixed for OSS?
Yes. We need it. Upgrading to P2.
Trying to figure out what the best way to solve this issue is.....
OK, here is how I decided to fix it: 1) On Solaris and Linux OMP_NUM_THREADS=2 is added to all run and debug sessions, unless OMP_NUM_THREADS is already set in user's environment or in the Run|Environment project properties. 2) Added the following hint to the Multithreading Level property in the compiler project properties: Note for OpenMP on Solaris and Linux: unless already defined, the IDE will set the maximum number of threads the program can create to 2 via the environment variable OMP_NUM_THREADS. Go to the Run|Environment property in the project properties and set OMP_NUM_THREADS to the number of your choice if you want to change this. So, if user is using a managed project, he will see the hint (which is displayed in the same panel right below the properties) and understand the IDE changes the environment so his app will run multithreaded and understand how he can control this. I chose the number of threads to 2 because it will probably be the new default in the next compiler generation. We are considering setting the number to the actual number of available cores, but need an API to retrieve this number.
Integrated into 'main-golden', will be available in build *201005010200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ User: Log:
omp_set_num_threads() command not working in NetBeans.... How can we set the OMP_NUM_THREADS in NetBeans
(In reply to SATISH510 from comment #9) > omp_set_num_threads() command not working in NetBeans.... > How can we set the OMP_NUM_THREADS in NetBeans Please file separate bug.