On Mar 4, 2010, at 10:52 AM, Anthony Chan wrote:
----- "Yuanyuan ZHANG" <zhang.yuany...@jp.fujitsu.com> wrote:
For an OpenMP/MPI hybrid program, if I only want to make MPI calls
using the main thread, ie., only in between parallel sections, can
I just
use SINGLE or MPI_Init?
If your MPI calls is NOT within OpenMP directives, MPI does not even
know you are using threads. So calling MPI_Init is good enough.
This is *not true*. Please read Dick's previous post for a good
example of why this is not the case.
In practice, on most platforms, implementation support for SINGLE and
FUNNELED are identical (true for stock MPICH2, for example). However
Dick's example of thread-safe versus non-thread-safe malloc options
clearly shows why programs need to request (and check "provided" for)
>=FUNNELED in this scenario if they wish to be truly portable.
-Dave