Re: [mpich-discuss] What is the difference between MPI_THREAD_SINGLE and MPI_THREAD_FUNNELED
On May 30, 2014, at 12:30 PM, Boisvert, Sebastien <[email protected]> wrote:
On Friday, May 30, 2014 12:26 PM, [email protected] [[email protected]] on behalf of Rajeev Thakur [[email protected]] wrote:
To: [email protected] Subject: Re: [mpich-discuss] What is the difference between MPI_THREAD_SINGLE and MPI_THREAD_FUNNELED
It shouldn't, but what does it return in your program?
I am currently using MPI_Init (I thought it was OK if only the main thread calls MPI functions).
Code-> https://github.com/GeneAssembly/biosal/blob/master/engine/node.c#L33
If you initialize with MPI_INIT, the MPI implementation can choose to provide whatever thread-level it likes. There are two options for you: Option 1: MPI_INIT /* tell MPI to give you what it can */ MPI_QUERY_THREAD /* ask for what you got */ if (less than FUNNELED) abort; Option 2: MPI_INIT_THREAD(FUNNELED, &provided); /* tell MPI to give you FUNNELED */ if (provided < FUNNELED) abort; Option 2 is cleaner since you gave MPI a hint that you would like to have FUNNELED level. — Pavan
participants (1)
-
Balaji, Pavan