[OMPI users] Proper way to stop MPI process

2011-09-28 Thread Xin Tong
I am wondering what the proper way of stop a mpirun process and the child
process it created. I tried to send SIGTERM,  it does not respond to it ?
What kind of signal should I be sending to it ?


Thanks


Xin


[OMPI users] MPIRUN + Environtment Variable

2011-09-29 Thread Xin Tong
I need to set up some environment variables before I run my application (
appA ). I am currently using mpirun -np 1 -host socrates (socrates is
another machine) appA. Before appA runs, it expects
some environment variables to be set up. How do i do that ?


Thanks

Xin


[OMPI users] Proper way to redirect GUI

2011-10-02 Thread Xin Tong
I am launch a program with a GUI interface, How do i redirect the GUI to the
machine i issued mpirun on ?

Thanks

Xin


Re: [OMPI users] Proper way to stop MPI process

2011-10-02 Thread Xin Tong
I am using 1.4.3. I send the sigterm from a python script. Then I wait, the
processes do not terminate until i keep pressing enter on the keyboard.

Thanks


Xin


On Fri, Sep 30, 2011 at 10:10 PM, Ralph Castain wrote:

> Sigterm should work - what version are you using?
> Ralph
>
> Sent from my iPad
>
> On Sep 28, 2011, at 1:40 PM, Xin Tong  wrote:
>
> > I am wondering what the proper way of stop a mpirun process and the child
> process it created. I tried to send SIGTERM,  it does not respond to it ?
> What kind of signal should I be sending to it ?
> >
> >
> > Thanks
> >
> >
> > Xin
> > ___
> > users mailing list
> > us...@open-mpi.org
> > http://www.open-mpi.org/mailman/listinfo.cgi/users
>
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>


[OMPI users] OpenMPI Nonblocking Send/Recv

2011-09-13 Thread Xin Tong Utoronto
I am new to openmpi. I am not sure whether my logic below will work or not.
Can someone please confirm for me on that ? Basically, what this does is
trying to check whether there are anything to send, if there are, send it
right away and set sentinit to true. Then check whether there are anything
to receive, if there are receive it. I am running this on a client-server
model (2 nodes sending and receiving data between each other)

for (;;)  {
   if (sendinit && MPI_Test(&sendreq, &sendcomplete,
&sendstatus)) {
  if (sendcomplete) {
 if (pollv[1].revents & POLLIN) {
 printf("Trying to send in rank %d\n", rank);
 nx=vde_recv(conn,sendbuff,BUFSIZE-2,0);
 vdestream_mpisend(vdestream,sendbuff, nx,
GET_PAIR_RANK(rank), &sendreq);
 } else {
 // no in-flight request.
 sendinit = false;
 }
  }
   } else {
  // no in-flight request. try to start one
  if (!sendinit && pollv[1].revents & POLLIN) {
   nx=vde_recv(conn,sendbuff,BUFSIZE-2,0);
   printf("Trying to send in rank %d\n", rank );
   vdestream_mpisend(vdestream,sendbuff, nx,
GET_PAIR_RANK(rank), &sendreq);
   sendinit = true;
   }
   }


   if (recvinit && MPI_Test(&recvreq, &recvcomplete,
&recvstatus)) {
  if (recvcomplete) {
  printf("Receive completed\n");
  // get the actual number of byet received.
  MPI_Get_count(&recvstatus, MPI_CHAR, &recvcount);
  vdestream_recv(vdestream, recvbuff, recvcount);
  // no more in-flight recv.
  recvinit = false;
  }
   } else {
  if (!recvinit) {
 printf("Trying to receive in rank %d\n", rank);
 // no in-flight recv. try to start one.
 vdestream_mpirecv(vdestream, recvbuff, BUFSIZE-2,
GET_PAIR_RANK(rank), &recvreq);
 recvinit = true;
  }
   }
}


-- 
Kind Regards

Xin Tong