MPI_STATUS_F2C(3)
π MPI_STATUS_F2C(3) β Open MPI, bestie edition π
okay so like, we're doing the MPI_STATUS_F2C page from Open MPI today and honestly? it's a whole translator situation. MPI_Status_f2c, MPI_Status_f2c β they take a C status and turn it into a Fortran INTEGER-style status, or flip it the other way around. bidirectional queen behavior, we love to see it β¨
πΈ 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β the mpi-styleINTEGERMPI status object, aka the Fortran-flavored one πc_statusβ the C-style MPI status object, aka the struct bestie π«Ά
β¨ DESCRIPTION β¨
so these two procedures live in C and their whole job is converting a Fortran status (which is literally just an array of integers, iconic) into a C status (which is a structure, main character energy), and vice versa. the conversion happens on all the info in status β including the hidden stuff π β which means no status information is lost in translation. not one crumb. ate and left no evidence.
when you're using MPI_Status_f2c, here's the vibe check: if f_status is a valid Fortran status, but it's not the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, then MPI_Status_f2c gives you back in c_status a valid C status with the exact same content. slay. but if f_status is the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, or if f_status just isn't a valid Fortran status at all? then the call is erroneous. like, error error. π
when you're using MPI_Status_c2f, it's the opposite conversion, obviously. 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 energy, different direction, no cap.
the input status has the same source, tag and error code values as the output status, and it returns the same answers when you query it for count, elements, and cancellation. and hey β the conversion function may be called with an input status argument that has an undefined error field, and in that case the value of the error field in the output status argument is undefined. so likeβ¦ don't count on it, bestie. π₯
π NOTES π
these functions are only available in C β they are not available in any of the Fortran MPI interfaces. sorry to the Fortran girlies, iykyk π
SEE ALSO: MPI_Status_f082c MPI_Status_f2f08
π COPYRIGHT π
2003-2026, The Open MPI Community
ngl this one's short and sweet, but the details are the whole point β hidden info stays hidden-but-preserved, and an undefined error field stays undefined. that's the tea π
okay that's the page!! stay converted, stay valid, and don't pass MPI_STATUS_IGNORE into a place it doesn't belong πβ¨
β later babes π«Ά this was MPI_STATUS_F2C(3) from Open MPI, dated Sep 11, 2026 π
π¦ where this page comes from
- arch rolling: openmpi 5.0.11-1 Β· BSD-3-Clause AND LicenseRef-MPICH
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms