[mpiwg-tools] Questions on MPI_T_init_thread

Schulz, Martin schulzm at llnl.gov
Mon Oct 14 23:39:11 CDT 2013


Hi Junchao,

On Oct 14, 2013, at 3:46 PM, Junchao Zhang <jczhang at mcs.anl.gov>
 wrote:

> Hello,
>   I have some questions on MPI_T_init_thread, which are unclear in the Standard.
>  1) Must MPI_T_init_thread() be called in programs before using MPI_T?

Yes.

>  2) Must MPI_T_init_thread() be only called by the main thread?

No, I don't think we ever limited that (to allow tools running in other threads).

>  3) Is it wrong to do
>      MPI_T_init_thread(MPI_THREAD_SINGLE, &provided);
>      MPI_Init_thread(LEVEL_HIGHER_THAN_SINGLE, &provided);
> 
>     or vice versa,
> 
>      MPI_Init_thread(MPI_THREAD_SINGLE, &provided);
>      MPI_T_init_thread(LEVEL_HIGHER_THAN_SINGLE, &provided);

No, that should be OK - however, an MPI implementation can choose to return SINGLE from the second calls. Perhaps not the best implementation, but a correct one.

Martin



> 
>     Thanks.
> 
> --Junchao Zhang
> _______________________________________________
> mpiwg-tools mailing list
> mpiwg-tools at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-tools

________________________________________________________________________
Martin Schulz, schulzm at llnl.gov, http://people.llnl.gov/schulzm
CASC @ Lawrence Livermore National Laboratory, Livermore, USA






More information about the mpiwg-tools mailing list