XMPI_Coloroff(3)

πŸ’– XMPI_Coloroff β€” the LAM/MPI tea πŸ’–

okay so bestie, we're in the LAM/MPI manual, page XMPI_Coloroff(3), and this one is a lil niche but honestly kinda iconic once you get it. it's a LAM/MPI-specific function that turns a color off in the XMPI trace stream. that's the whole vibe. let's get into it πŸŽ€


✨ NAME ✨

XMPI_Coloroff β€” a LAM/MPI-specific function that disables a color in the XMPI trace stream. yes that's literally it, she's a one-job girlie and she does her job πŸ’…


🌸 SYNOPSIS 🌸

#include <mpi.h>
int
XMPI_Coloroff()

no arguments, no drama, just vibes. she returns an int. periodt.


πŸ¦‹ NOTES πŸ¦‹

so, context, because iykyk: the LAM implementation of MPI is all integrated with the XMPI run/debug viewer. it can generate tracefiles and on-the-fly trace streams that are suitable for display in XMPI. very demure, very mindful ✨

now here's the new functionality in XMPI β€” you can enable and disable select colors in the trace stream. LAM/MPI lets you do this with the XMPI_Coloron and XMPI_Coloroff functions. they're a duo, a package deal, you can't have one without knowing about the other πŸ’–

so XMPI_Coloron gets called with red, green, and blue parameters. each value may be from 0 to 255. the resulting RGB composite becomes activated for that rank at that point in time. enabling and disabling colors is a local action β€” the calls return immediately, no waiting around, no blocking, she's not gonna make you sit there 😌

the color gets activated or deactivated on the timeline corresponding to the rank that invoked XMPI_Coloron / XMPI_Colorff in the XMPI trace window. (yes we're keeping that spelling, that's what the page says, no cap 🫢)

okay important: only one color is active at a time. BUT β€” and this is the slay part β€” XMPI_Coloron may be invoked multiple times to build up a stack of colors. XMPI_Coloroff will pop the last color off the stack and make the previous color active. it's giving undo button energy. it's giving ctrl+z but for colors πŸ”₯

if this function gets invoked and tracing is not active, the color deactivation is just... ignored. no error, no fuss, nothing happens. she simply did not clock in that day πŸ™ˆ

also, heads up: there is no profiling version of this function. nope, doesn't exist, don't go looking.

and one more thing β€” this is a LAM/MPI-specific function and it's intended mainly for use with XMPI. if you're gonna use it, you should use it in conjunction with the LAM_MPI C preprocessor macro, like so:

#if LAM_MPI
XMPI_Coloroff();
#endif

guard your girlies, bestie, always 🧚


🌈 NOTES FOR FORTRAN 🌈

all MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK) have an additional argument ierr at the end of the argument list. ierr is an integer and it has the same meaning as the return value of the routine in C. in Fortran, MPI routines are subroutines, and they get invoked with the call statement. different language, different rules, same energy ✨

also: all MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. don't forget it πŸ’œ


πŸ’€ ERRORS πŸ’€

if an error occurs in an MPI function, the current MPI error handler gets called to handle it. by default, this error handler aborts the MPI job. yeah. it just ends everything. no warning shot, no soft launch, just gone 😭

the error handler may be changed with MPI_Errhandler_set; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned (in C and Fortran; this error handler is less useful with the C++ MPI bindings. the predefined error handler MPI::ERRORS_THROW_EXCEPTIONS should be used in C++ if the error value needs to be recovered).

note that MPI does not guarantee that an MPI program can continue past an error. read that again. fr fr.

all MPI routines (except MPI_Wtime and MPI_Wtick) return an error value; C routines as the value of the function, and Fortran routines in the last argument. the C++ bindings for MPI do not return error values; instead, error values are communicated by throwing exceptions of type MPI::Exception (but not by default). exceptions are only thrown if the error value is not MPI::SUCCESS.

note that if the MPI::ERRORS_RETURN handler is set in C++, while MPI functions will return upon an error, there will be no way to recover what the actual error value was. so like... you get the return but not the lore. tragic πŸ’€

  • MPI_SUCCESS β€” no error; MPI routine completed successfully. the good ending πŸ’–
  • MPI_ERR_INTERN β€” an internal error has been detected. this is fatal. please send a bug report to the LAM mailing list (see http://www.lam-mpi.org/contact.php). like actually please do, they want to know 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

  • XMPI_Buoy
  • XMPI_Coloron

go read those too, they're the supporting cast and they ate 🌟


πŸŽ€ LOCATION πŸŽ€

xcoloroff.c


and that's the whole page bestie!! this was LAM/MPI 7.1.4, dated 6/24/2006 β€” yeah she's an elder but she's still serving πŸ’… thank you for coming to my ted talk, now go forth and pop those colors off the stack πŸŒΈπŸ’–βœ¨