MPIL_Request_get_name(3)

πŸ’– MPIL_Request_get_name(3) πŸ’–

okay bestie, welcome to the LAM/MPI corner of the manual, where we talk about one very specific little function: MPIL_Request_get_name. It's LAM/MPI-specific, which means it's a ✨special✨ extra that regular MPI doesn't hand you, and it does exactly one thing: it gets you a string name off an MPI_Request. That's it. That's the whole job. She's simple, she's iconic, she serves. πŸŽ€


🌸 NAME 🌸

MPIL_Request_get_name β€” the LAM/MPI-specific function that gets a string name on an MPI_Request. no cap.


✨ SYNOPSIS ✨

#include <mpi.h>
char *
MPIL_Request_get_name(MPI_Request req)

🫢 INPUT PARAMETERS 🫢

  • req β€” an MPI_Request (handle). that's the one and only thing you're handing over here, bestie. πŸ’…

πŸ‘‘ RETURN VALUE πŸ‘‘

If you pass in a valid MPI_Request, you are getting a valid string back. periodt. And listen β€” even if no name was ever set on that request, you still get a valid string. She does not leave you hanging. πŸ™ˆ

⚠️ important though: that string is a pointer to internal storage. Do not modify it. Do not free it. It is not yours, it is the library's, and you are just borrowing the vibe. literally just look at it and move on. πŸ’€

😭 ERRORS 😭

okay so if something goes wrong inside an MPI function, the current MPI error handler gets called to deal with it. By default, that error handler aborts the MPI job. like, the whole thing. gone. 😭

You can swap the error handler out with MPI_Errhandler_set, and there's a predefined handler called MPI_ERRORS_RETURN you can use to make error values actually get returned instead (this works in C and Fortran; it's less useful with the C++ MPI bindings). If you're in C++ and you need to recover the error value, you want the predefined handler MPI::ERRORS_THROW_EXCEPTIONS. And ngl, MPI does not guarantee that an MPI program can keep going after an error. so like, plan accordingly. 🌸

Also, general MPI lore that applies here: all MPI routines (except MPI_Wtime and MPI_Wtick) return an error value β€” C routines give it back as the value of the function, Fortran routines put it in the last argument. The C++ bindings for MPI do not return error values at all; instead, error values are communicated by throwing exceptions of type MPI::Exception (but not by default, okay, only if the error value is not MPI::SUCCESS).

🫢 and one more thing: if the MPI::ERRORS_RETURN handler is set in C++, MPI functions will return when an error happens β€” but there will be no way to recover what the actual error value was. so that's a tradeoff, bestie. choose wisely.

Here's the error value list, no skips, no shortcuts:

  • MPI_SUCCESS β€” no error at all, the MPI routine completed successfully. slay. ✨
  • MPI_ERR_ARG β€” invalid argument. Some argument is invalid and it's not identified by a specific error class. This is typically a NULL pointer, or other such error. πŸ“

πŸ’œ SEE ALSO πŸ’œ

  • MPIL_Request_set_name β€” the other half of this duo, go read her too πŸ¦‹

🧚 LOCATION 🧚

mpil_rgetname.c β€” that's where she lives, iykyk.


and that's the whole page, bestie!! this little slice of wisdom comes to you from LAM/MPI 7.1.4, dated 6/24/2006, and the page itself is MPIL_Request_get_name(3). go forth and get those request names. you got this. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά