[mpich-discuss] How to use MPI functions under subroutines?
Zhangping Wei
zhangping_wei at yahoo.com
Tue Jul 26 15:09:27 CDT 2011
Dear all,
I have a question about MPI programming skills; right now I am working on a FORTRAN program which has many subroutines, and I have not yet figure out a good way to use MPI functions inside those subroutines.
Usually, we set up the processes number (say, numprocs) and the corresponding process indices (myid) at the beginning of the main program, however, if we call some subroutines, and we want to use some function, for example, MPI_GATER, under that subroutine, we have to use their indices and MPI_COMM_WORLD or other statements, then I found lots of errors were incurred in my Visual Studio.
Does someone have some programming experience like this? any advice and information will be greatly appreciated.
Regards,
Zhangping Wei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20110726/b4794bc9/attachment.htm>
More information about the mpich-discuss
mailing list