Re: [OMPI users] MPI send recv confusion

2013-02-25 Thread Jeff Squyres (jsquyres)
In general, though, MPI says that they are different typed. You should use MPI integer in fortran, just to be more correct/safe. Sent from my phone. No type good. On Feb 21, 2013, at 10:56 AM, "Pradeep Jha" > wrote:

Re: [OMPI users] MPI send recv confusion

2013-02-21 Thread Pradeep Jha
2013/2/21 Gus Correa > two types are the same size, > but I wonder if somehow the two type names are interchangeable > in OpenMPI (I would guess they're not), > although declared > Hello, No, I didnt had to change that. They both work fine for me. Pradeep

Re: [OMPI users] MPI send recv confusion

2013-02-20 Thread Gus Correa
Hi Pradeep Just curious: Did you change "mpi_int" into "MPI_INTEGER" also? Presumably the two types are the same size, but I wonder if somehow the two type names are interchangeable in OpenMPI (I would guess they're not), although declared in different header files, etc. Thank you, Gus Correa

Re: [OMPI users] MPI send recv confusion

2013-02-18 Thread Pradeep Jha
That was careless of me. Thanks for pointing it out. Declaring "status", "ierr" and putting "implicit none" solved the problem. Thanks again. 2013/2/19 Jeff Squyres (jsquyres) > +1. The problem is that you didn't declare status or ierr. Since you > didn't declare status,

Re: [OMPI users] MPI send recv confusion

2013-02-18 Thread Jeff Squyres (jsquyres)
+1. The problem is that you didn't declare status or ierr. Since you didn't declare status, you're buffer overflowing, and random Bad Things happen from there. You should *always* "implicit none" to catch these kinds of errors. On Feb 18, 2013, at 2:02 PM, Gus Correa

Re: [OMPI users] MPI send recv confusion

2013-02-18 Thread Gus Correa
Hi Pradeep For what it is worth, in the MPI Fortran bindings/calls the datatype to use is "MPI_INTEGER", not "mpi_int" (which you used; MPI_INT is in the MPI C bindings): http://linux.die.net/man/3/mpi_integer Also, just to prevent variables to inadvertently come with the wrong type, you could

Re: [OMPI users] MPI send recv confusion

2013-02-18 Thread jody
Hi Pradeep I am not sure if this is the reason, but usually it is a bad idea to force an order of receives (such as you do in your receive loop - first from sender 1 then from sender 2 then from sender 3) Unless you implement it so, there is no guarantee the sends are performed in this order. B

[OMPI users] MPI send recv confusion

2013-02-18 Thread Pradeep Jha
I have attached a sample of the MPI program I am trying to write. When I run this program using "mpirun -np 4 a.out", my output is: Sender:1 Data received from1 Sender:2 Data received from1 Sender:2 And the run hangs there. I dont