We have seen this with OS X where the LAM-MPI fortran bindings were
compiled with xlf and the main LAM-MPI was compiled with gcc.
There are two functions MPI_Comm_f2c and MPI_Comm_c2f for doing this
conversion between C and Fortran communicator handles.
Example of usage:
int *new_rect_comm_constructor_ (int **gr,
int *rank,
int *comm_f,
int *icnt,
int *jcnt,
int *kcnt){
NewRectComm_t * rectcomm;
RectGraph_t * graph=(RectGraph_t *)(*gr);
#ifdef LAM_MPI
MPI_Comm comm_c = MPI_Comm_f2c( (int)*comm_f);
#else
MPI_Comm comm_c = *comm_f;
#endif
rectcomm=NewRectCommConstructor(graph,
*rank,
comm_c,
*icnt,
*jcnt,
*kcnt);
#ifdef LAM_MPI
rectcomm->comm = MPI_Comm_c2f(rectcomm->comm_c);
#else
rectcomm->comm = rectcomm->comm_c;
#endif
printf("new_rect_comm_constructor: comm_f = %i rectcomm->comm =
%i\n",*comm_f,(int)rectcomm->comm);
return (int *)rectcomm;
}
..............................................
Edward D. Zaron, PhD
Research Associate
College of Oceanic and Atmospheric Sciences
Oregon State University
Corvallis, OR 97331-5503
Phone: (541) 737-3504
Fax: (541) 737-2064
ezaron_at_[hidden]
...............................................
|