Re: [OMPI users] How to create multi-thread parallel program using thread-safe send and recv?

2009-09-28 Thread guosong
Thanks. > From: jsquy...@cisco.com > To: us...@open-mpi.org > Date: Mon, 28 Sep 2009 11:49:36 -0400 > Subject: Re: [OMPI users] How to create multi-thread parallel program using > thread-safe send and recv? > > On Sep 28, 2009, at 11:48 AM, guosong wrote: > > > O

Re: [OMPI users] How to create multi-thread parallel program using thread-safe send and recv?

2009-09-28 Thread guosong
Date: Mon, 28 Sep 2009 11:28:31 -0400 > Subject: Re: [OMPI users] How to create multi-thread parallel program using > thread-safe send and recv? > > On Sep 27, 2009, at 1:45 PM, guosong wrote: > > > Hi Loh, > > I used MPI_Init_thread(&argc,&argv, MPI_THREAD_MULT

Re: [OMPI users] How to create multi-thread parallel program using thread-safe send and recv?

2009-09-27 Thread guosong
: [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

Re: [OMPI users] How to create multi-thread parallel program using thread-safe send and recv?

2009-09-27 Thread guosong
Wait(&requ2, &status2); cout << "SLAVE: " << myid << " recvs from "<< nprocs-1 << " rMSG.flag = " << rMSG.flag << endl; MPI_Send(&rMSG, MSG_QUERY_SIZE, MPI_CHAR, right, 222, MPI_COMM_WORLD); //MPI_Isend(&a

Re: [OMPI users] Is there an "flush()"-like function in MPI?

2009-09-26 Thread guosong
OMPI users] Is there an "flush()"-like function in MPI? guosong wrote: Thanks for reply. One more thing I would like to know is that since the message has already left the sender, how to make sure that the receiver side receives this message? From the output of my program, it seems th

Re: [OMPI users] Is there an "flush()"-like function in MPI?

2009-09-26 Thread guosong
@lists.open-mpi.org Date: Sat, 26 Sep 2009 08:42:35 -0700 From: eugene@sun.com To: us...@open-mpi.org Subject: Re: [OMPI users] Is there an "flush()"-like function in MPI? guosong wrote: Hi all, I am wondering if there is an flush()-like function in MPI. I saw the output of my pr

[OMPI users] Is there an "flush()"-like function in MPI?

2009-09-26 Thread guosong
Hi all, I am wondering if there is an flush()-like function in MPI. I saw the output of my program. One sent something but some other process did not receive it, just sitting there waiting. I used MPI_Isend for sending and MPI_Recv for receiving. Is it possible the message was lost or the mess

Re: [OMPI users] How to create multi-thread parallel program using thread-safe send and recv?

2009-09-22 Thread guosong
cv? > > If you want all threads to communicate via MPI, and your initially > launching multiple parents, I don't really see the advantage of using > threads at all. Why not launch 12 MPI processes? > > On Tue, 2009-09-22 at 10:32 -0700, Eugene Loh wrote: > > guosong w

Re: [OMPI users] How to create multi-thread parallel program using thread-safe send and recv?

2009-09-22 Thread guosong
myid << endl; fflush(stdout); } pret1 = pthread_create(&pt1, NULL, backRecv, NULL); if(pret1 != 0) { cout << myid << "backRecv Thread Create Failed." << endl; exit(1); } pret2 = pthread_create(&pt2, NULL, backID, NULL); if(pret2

[OMPI users] How to create multi-thread parallel program using thread-safe send and recv?

2009-09-22 Thread guosong
Hi all, I would like to write a multi-thread parallel program. I used pthread. Basicly, I want to create two background threads besides the main thread(process). For example, if I use "-np 4", the program should have 4 main processes on four processors and two background threads for each main

Re: [OMPI users] Help!

2009-09-03 Thread guosong
Thanks. I thought those threads will not interfere with each other since they have no common variables except std IO. List-Post: users@lists.open-mpi.org Date: Thu, 3 Sep 2009 09:01:28 -0700 From: eugene@sun.com To: us...@open-mpi.org Subject: Re: [OMPI users] Help! guosong wrote: I

[OMPI users] Help!

2009-09-02 Thread guosong
I am new to open MPI I have a simple program below: #include #include #include "mpi.h" using namespace std; void* backID(void* arg) { int myid; MPI_Comm_rank(MPI_COMM_WORLD, &myid); cout << myid << " create background ID" << endl; int v; MPI_Status status; int m; int x, y; int count