- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using the Intel MPI on a mixed C/FORTRAN program. All my communicators (MPI_Comm) are instanced in C; yet, I need to pass them through MPI calls to a FORTRAN subroutine.
How does one cast the MPI_Comm handle from C to FORTRAN?
Thanks.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
According to, for example, https://www.mpi-forum.org/docs/mpi-2.2/mpi22-report/node361.htm, you can use
MPI_Fint MPI_Comm_c2f(MPI_Comm comm);
I attached a complete example, dvr_parpack.cpp, that I got from the Web that solves for eigenenergies of 1D Harmonic oscillator and uses MPI_Comm_c2f. Disclaimer: I did not test this example - hopefully, it might be used as a starting point.
Regards,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mark,
Perfect! That's exactly what I needed to know. Thanks.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page