I've noticed that I can't just fix this myself, very bad things happened to the merged communicator, so this is not a trivial fix I gather.

Michael

On Apr 30, 2006, at 12:16 PM, Michael Kluskens wrote:

MPI_Intercomm_Merge( intercomm, high, newintracomm, ier )

None of the books I have state the variable type of the second
argument for MPI_Intercomm_Merge for Fortran.  Class notes I have
from David Cronk state it is a Logical.

In C it is an "int" with values of true and false.

Looking at OpenMPI 1.1a4r9780 (& openmpi-1.2a1r9780)  I find the
following:

./ompi/mpi/f77/intercomm_merge_f.c:

OMPI_GENERATE_F77_BINDINGS (PMPI_INTERCOMM_MERGE,
                            pmpi_intercomm_merge,
                            pmpi_intercomm_merge_,
                            pmpi_intercomm_merge__,
                            pmpi_intercomm_merge_f,
                            (MPI_Fint *intercomm, MPI_Flogical *high,
MPI_Fint *newintercomm, MPI_Fint *ierr),
                            (intercomm, high, newintercomm, ierr) )

and

     *ierr = MPI_Intercomm_merge (c_intercomm, OMPI_LOGICAL_2_INT
(*high),
                                  &c_newcomm);

This implies to me that in Fortran the second argument should be a
logical which makes sense.


But in ./ompi/mpi/f90/mpi-f90-interfaces.h, I find:
-------------
interface MPI_Intercomm_merge

subroutine MPI_Intercomm_merge(intercomm, high, newintercomm, ierr)
   include 'mpif.h'
   integer, intent(in) :: intercomm
   integer, intent(in) :: high
   integer, intent(out) :: newintercomm
   integer, intent(out) :: ierr
end subroutine MPI_Intercomm_merge

end interface MPI_Intercomm_merge
-------------
which I suspect is wrong or at least incomplete with regards to the
second argument.

In which case the problem is also in ./ompi/mpi/f90/scripts/mpi-f90-
interfaces.h.sh
----------
subroutine ${procedure}(intercomm, high, newintercomm, ierr)
   include 'mpif.h'
   integer, intent(in) :: intercomm
   integer, intent(in) :: high
   integer, intent(out) :: newintercomm
   integer, intent(out) :: ierr
end subroutine ${procedure}

EOF
}

start MPI_Intercomm_merge small
output_162 MPI_Intercomm_merge
end MPI_Intercomm_merge
-------------

Michael

Reply via email to