Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Calling MPI_send MPI_recv from a fortran subroutine
From: Stefan Mauerberger (stefan.mauerberger_at_[hidden])
Date: 2013-03-01 02:26:11


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 ...
    ...
  END SUBROUTINE ...

END PROGRAM main

For more complex programs please use modules instead.