The reason I asked the background thread is that I need to make MPI calls in 
this thread and this is also why I got errors in the little testing program. 



List-Post: users@lists.open-mpi.org
Date: Sun, 27 Sep 2009 14:00:00 -0700
From: eugene....@sun.com
To: us...@open-mpi.org
Subject: Re: [OMPI users] How to create multi-thread parallel program using 
thread-safe send and recv?

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.

_________________________________________________________________
约会说不清地方?来试试微软地图最新msn互动功能!
http://ditu.live.com/?form=TL&swm=1

Reply via email to