MPI_STATUS_C2F08(3)

πŸ“¦
version 5.0.10 Β· 4 versions
, in ubuntu stonking

πŸ’– MPI_STATUS_C2F08 β€” the Open MPI girlies' guide πŸ’–

okay so bestie, welcome to MPI_STATUS_C2F08(3), a real one from the Open MPI manual (section 3, we're fancy like that ✨). This page is all about two lil functions, MPI_Status_f082c and MPI_Status_c2f08, and their whole job is translating a C status into a Fortran 2008 status, or vice versa. Translating!! like they're bilingual and thriving 🌈


✨ SYNTAX ✨

πŸŽ€ C Syntax

#include <mpi.h>

int MPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status)
int MPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status)

like yes, that's the whole vibe, copy it exactly, no notes πŸ’…


🫢 PARAMETERS 🫢

  • f08_status β€” an mpi_f08-style MPI status object πŸ¦‹
  • c_status β€” a C-style MPI status object 🌸

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea: these two procedures exist in C so you can convert a Fortran 2008 status (which is literally a derived type made of integers) into a C status (which is a structure), and also the other direction. iconic. The conversion happens on all the information in the status, even the hidden stuff β€” like, no status information is lost in the conversion, not a single crumb πŸ“

When you're using MPI_Status_f082c: if f08_status is a valid Fortran status, but it is not the Fortran value of MPI_F08_STATUS_IGNORE or MPI_F08_STATUSES_IGNORE, then MPI_Status_f082c hands you back in c_status a valid C status with the exact same content. πŸ’–

BUT β€” and this is the part where we pay attention β€” if f08_status is the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, or if f08_status is not a valid Fortran status, then the call is erroneous. bestie. do not. πŸ’€

When you're using MPI_Status_c2f08, it's the opposite conversion, same energy, flipped. If c_status is MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, or if c_status isn't a valid C status, then the call is erroneous. same warning, different direction, we stay safe out here 🫢

The input status has the same source, tag, and error code values as the output status, and gives you the same answers when you query it for count, elements, and cancellation. And, small caveat that matters: the conversion function may be called with an input status argument that has an undefined error field, in which case the value of the error field in the output status argument is also undefined. not me trying to read an undefined field 😭 it's giving chaos, it's giving unspecified, don't do it


⭐ NOTES ⭐

these functions are only available in C β€” they are not available in any of the Fortran MPI interfaces. so if you're in Fortran looking for them, they're not there, they're living their C life πŸ’…

🌟 See also:

  • MPI_Status_c2f
  • MPI_Status_f2f08

2003-2026, The Open MPI Community


and that's the whole page, bestie!! you are now officially fluent in status conversion, no cap, fr fr 🌸✨

written with love, from the Open MPI girlies β€” version date Sep 10, 2026, page MPI_STATUS_C2F08(3) πŸ’– stay slay, stay valid, and never pass an invalid status πŸŽ€

πŸ“¦ where this page comes from