guosong wrote:
I
used MPI_Init_thread(&argc,&argv, MPI_THREAD_MULTIPLE,
&provided); in my program and got provided = 0 which turns out to
be the MPI_THREAD_SINGLE. Does this mean that I can not use
MPI_THREAD_MULTIPLE model?
Right. I've not done much multithreaded MPI work. Someone else on
this list can advise you better what you need to do to get
provided=MPI_THREAD_MULTIPLE.
I write a little program to test the multithreading and it
worked sometimes and failed sometimes. It also hang there
sometimes. Does this only because the MPI_THREAD_MULTIPLE is not
supported or there are some bugs in the program?
I don't know if there are bugs in the program, but without the MPI
threads support you can't really test it.
BTW, if I want to create a background thread which is sort
of like a deamon thread, how can I achieve that in MPI programs? Thanks.
I'm not sure I understand the question. Creating a background thread
isn't part of MPI. You would use something else, like POSIX threads or
OpenMP.
|