mpirun -n 2 exectable
The program is supposed to generate 8 threads in one of the 2 processes. Thanks.
Other than that, I doubt much can be said with the information you gave.
One other thing I would point out: when doing hybrid programming (threads + MPI), make sure you're using the thread-safe Intel MPI library. You can specify this for your Intel MPI Library compiler script (such as mpiicc, or mpiifort) by using the -mt_mpi flag. Or you can manually link with libmpi_mt.so in the
Thanks for the reply. Do you mean that I have to use "MPI_Init_thread" in my program instead of MPI_init, or I can specifiy the thread levels using the -mt_mpl option?
Also, according to the reference manual, I_MPI_PIN_DOMAIN is for OpenMP only, isn't it?
I_MPI_PIN_DOMAIN evidently has options to correspond with OpenMP, and may use the KMP_AFFINITY mechanism in that case to place the threads. I'm trying to refresh my installation so as to look at the current documentation on I_MPI_PIN_DOMAIN. If you care about placement of threads, you would want some mechanism such as this or taskset.
My program is this. There are two processes, one is the master, one is the slave. The slave generates 8 threads. The master process reads the input data and dispatches to thethreads of the slaves. The 8 threads are supposed to use the 8 cores of the two quad-core processors. However, from the output of "top", only two cores were used, one by the master process, and one by the slave process.
I tried to use I_MPI_PIN_DOMAIN, too. When "sock" was specified, two cores were used by the slave process. But nothing changed when other arguments were used. What does this mean? thanks!