MPIX_Start_progress_thread(3)
π MPIX_Start_progress_thread β bestie edition
okay so this is MPIX_Start_progress_thread(3), from the <rainbow>MPI</rainbow> manual, section 3. it's an MPIX function, which means it's an extension situation β extra flavor beyond the standard, iykyk. β¨
β¨ NAME β¨
MPIX_Start_progress_thread β starts a progress thread that will poll progress on the given stream. she's literally just out here making a thread whose whole job is to keep checking on your stream. no cap. π§΅π
π¦ SYNOPSIS π¦
int MPIX_Start_progress_thread(MPIX_Stream stream)
πΈ INPUT PARAMETERS πΈ
streamβ stream object (handle). it's a handle, bestie, so it's the lil reference thingy, not the whole stream itself.
π THREAD AND INTERRUPT SAFETY π
she's thread-safe, periodt. π what that means: multiple threads can call this routine at the same time, all safe and cozy, and you do not need to bring your own thread locks. no manual locking, you're free. π«Ά
β οΈ but β and this is the important part β this routine is not interrupt safe. and that's usually because it uses memory allocation routines like malloc, or other non-MPICH runtime routines, and those are themselves not interrupt-safe. so like. respect the interrupt boundary, bestie. π
π NOTES FOR FORTRAN π
so every MPI routine in Fortran β except MPI_WTIME and MPI_WTICK, they're the special little exceptions β gets an extra argument called ierr tacked onto the very end of the argument list. π
ierr is an integer and it means the exact same thing as the return value of the routine in C. so same vibe, different outfit. π
and in Fortran, MPI routines are subroutines, invoked with the call statement. yes, call. that's just how she rolls.
also: all MPI objects (like MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. every single one. slay. β¨
π ERRORS π
all MPI routines β except MPI_Wtime and MPI_Wtick, those two again, iconic of them β return an error value. C routines return it as the value of the function; Fortran routines put it in that last argument. π¬
before that value comes back to you, the current MPI error handler gets called. and by default? that error handler aborts the entire MPI job. like, gone. the whole job. so maybe know what you're doing. π
but you can change the error handler:
MPI_Comm_set_errhandlerβ for communicatorsMPI_File_set_errhandlerβ for filesMPI_Win_set_errhandlerβ for RMA windows
the MPI-1 routine MPI_Errhandler_set may also be used, but its use is deprecated β old-school, past its era, we don't stan. π«
and if you want error values actually returned to you instead of the job just vanishing, use the predefined error handler MPI_ERRORS_RETURN. π
heads up though: MPI does not guarantee that an MPI program can continue past an error. like, sometimes it's just over. however, MPI implementations will attempt to continue whenever possible. so there's hope. π―οΈ
here's the error code tea:
MPI_SUCCESSβ no error; the MPI routine completed successfully. periodt. βMPI_ERR_OTHERβ other error; useMPI_Error_stringto get more information about this error code. she's vague, go ask the string. π
and that's the whole page, bestie. you ate. π β¨
mwah π β with love from the MPI manual pages, section 3, this edition dated 4/10/2026. ππ¦
π¦ where this page comes from
- nixos 26.05: mpich 5.0.1
- ubuntu stonking: mpich-doc 5.0.1-9 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms