Multiprocessor use when not asked for

I have just started experimenting with -Mconcur on a 4 processor system. as part of an evaluation. For most programs, as per manual, I can choose the number of processors used with the line

program -pghpf -np 4 > junk.out

and watch the system moniter as 4 processors kick in 100%. When running without the extensions, just one processor runs 100%.

For a more complex code, built out of components compiled with -Mconcur, I am running:

biggerProgramMadeOfMconcurComponents > junk.out

and the system moniter is showing all 4 processors running 100%?!?

Does anyone know why this occurs and is it a good thing?


Hi Andy,

By default, the program should only be using one thread. To run using 4 threads, either the environment variable ‘NCPUS’ or ‘OMP_NUM_THREADS’ must have been set, or the program must have explicitly set the number of threads using the ‘omp_set_num_threads’ subroutine. Check what value you have for these variables and if the program calls this subroutine.

  • Mat

NCPUS was set to 4 for all program instances - I thought it was a convenience for compilation; not a default for runtime action.