MPI_STATUS_C2F(3)

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

πŸ’– MPI_STATUS_C2F(3) πŸ’–

okay bestie, welcome to the Open MPI manual, section 3 πŸ’… this is the page for MPI_Status_f2c and MPI_Status_c2f β€” and yes she's listed twice up top, we don't question the lore, we just accept it 🫢

She translates a C status into a Fortran INTEGER-style status, or vice versa. glowy bidirectional queen ✨


✨ SYNTAX ✨

🌸 C Syntax

#include <mpi.h>

int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status)
int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status)

πŸŽ€ PARAMETERS πŸŽ€

  • f_status : mpi-style INTEGER MPI status object
  • c_status : C-style MPI status object

πŸ¦‹ DESCRIPTION πŸ¦‹

So these two procedures are provided in C to convert from a Fortran status (which is an array of integers) to a C status (which is a structure), and vice versa. The conversion happens on all the information in status, including that which is hidden πŸ™ˆ β€” meaning no status information is lost in the conversion. zero loss, we love a clean trade πŸ’–

When you're using MPI_Status_f2c, if f_status is a valid Fortran status, but not the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, then MPI_Status_f2c returns in c_status a valid C status with the same content. But if f_status is the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, or if f_status is not a valid Fortran status, then the call is erroneous πŸ’€ that's a no from her.

When you're using MPI_Status_c2f, the opposite conversion is applied. So if c_status is MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, or if c_status is not a valid C status, then the call is erroneous. same energy, other direction 😭

The input status has the same source, tag and error code values as the output status, and returns the same answers when queried for count, elements, and cancellation πŸ‘‘ consistent, iconic, no notes.

πŸ‘€ one lil caveat though: 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 undefined too. so like... don't come for her when the error field is giving nothing, because it was already nothing fr fr 🌫️

🌈 NOTES 🌈

These functions are only available in C πŸ”₯ they are not available in any of the Fortran MPI interfaces. sorry Fortran girlies, this one's not for you πŸ₯Ί

See also:

  • MPI_Status_f082c
  • MPI_Status_f2f08

2003-2026, The Open MPI Community


Sep 10, 2026 β€” that's the vintage of this little baddie, and she's stamping out as MPI_STATUS_C2F(3) from the Open MPI manual. mwah πŸ’‹ thanks for reading bestie, go convert some statuses πŸ‘‘βœ¨

πŸ“¦ where this page comes from