[Pympi-users] Converting Communicators to and from fortran modules
Status: Alpha
Brought to you by:
patmiller
From: Mike S. <st...@gm...> - 2005-02-02 22:32:06
|
Hi All, I think this is a question that Pat will have to answer, but perhaps some of you have seen it or have the same question: I have a fortran module wrapped using f2py. The module in this case is MPH, the Multi Program Handshaking utility. It is mostly used to help setup the MPI environment for multiple mpi executables. I need to call some of these library routines, some of which are supposed to return communicators. However, the values that are supposed to be communicators show up as python integers. While these may be completely usable for passing to extension codes they are worthless for actually doing anything in python. I've noticed that pyMPI is capable of handling the opposite though, if I pass a pyMPI communicator object to wrapped code expecting a fortran communicator the wrapped code still works. Is there any way for me to take a communicator from fortran and "promote" it to a python communicator so that I can get information like the size of the communicator? If there is no pyMPI way to do it at the moment, how else could I get this information? Write wrappers around a few MPI functions like MPI_Comm_rank and MPI_Comm_size in fortran or c? Then just call those with the fortran communicator to get the info i need? Thanks in advance, ~Mike |