Re: [OMPI users] Calling MPI_send MPI_recv from a fortran subroutine

2013-03-01 Thread Stefan Mauerberger
Please also put IMPICIT NONE to your SUBROUTINE and replace INCLUDE 'mpif.h' by USE mpi. This comes with the benefit of interface checking. The compiler will throw an error due to missing tags. It is even better style to write: PROGRAM main USE MPI ... CONTAINS SUBROUTINE ... ...

Re: [OMPI users] Calling MPI_send MPI_recv from a fortran subroutine

2013-02-28 Thread Pradeep Jha
oh! it works now. Thanks a lot and sorry about my negligence. 2013/3/1 Ake Sandgren > On Fri, 2013-03-01 at 01:24 +0900, Pradeep Jha wrote: > > Sorry for those mistakes. I addressed all the three problems > > - I put "implicit none" at the top of main program > > - I

Re: [OMPI users] Calling MPI_send MPI_recv from a fortran subroutine

2013-02-28 Thread Ake Sandgren
On Fri, 2013-03-01 at 01:24 +0900, Pradeep Jha wrote: > Sorry for those mistakes. I addressed all the three problems > - I put "implicit none" at the top of main program > - I initialized tag. > - changed MPI_INT to MPI_INTEGER > - "send_length" should be just "send", it was a typo. > > > But

Re: [OMPI users] Calling MPI_send MPI_recv from a fortran subroutine

2013-02-28 Thread Ralph Castain
I don't see tag being set to any value On Feb 28, 2013, at 8:24 AM, Pradeep Jha wrote: > Sorry for those mistakes. I addressed all the three problems > - I put "implicit none" at the top of main program > - I initialized tag. > - changed MPI_INT to

Re: [OMPI users] Calling MPI_send MPI_recv from a fortran subroutine

2013-02-28 Thread Pradeep Jha
Sorry for those mistakes. I addressed all the three problems - I put "implicit none" at the top of main program - I initialized tag. - changed MPI_INT to MPI_INTEGER - "send_length" should be just "send", it was a typo. But the code is still hanging in sendrecv. The present form is below:

Re: [OMPI users] Calling MPI_send MPI_recv from a fortran subroutine

2013-02-28 Thread Jeff Squyres (jsquyres)
On Feb 28, 2013, at 9:59 AM, Pradeep Jha wrote: > Is it possible to call the MPI_send and MPI_recv commands inside a subroutine > and not the main program? Yes. > I have written a minimal program for what I am trying to do. It is compiling > fine but it is

[OMPI users] Calling MPI_send MPI_recv from a fortran subroutine

2013-02-28 Thread Pradeep Jha
Is it possible to call the MPI_send and MPI_recv commands inside a subroutine and not the main program? I have written a minimal program for what I am trying to do. It is compiling fine but it is not working. The program just hangs in the "sendrecv" subroutine. Any ideas how can I do it? main.f