OPAL_CRS(7)

πŸ“¦
version 4.1.6 Β· 5 versions
, in alpine 3.24, ubuntu noble

πŸ’– NAME πŸ’–

hii so bestie, meet OPAL_CRS β€” that's the Open PAL MCA Checkpoint/Restart Service (we call it CRS, iykyk πŸ’…). This page is the whole vibe tour of Open PAL's CRS framework plus a few of the modules that come with it. Oh and btw we're talking Open MPI 4.1.6, no cap. ✨


πŸŽ€ DESCRIPTION πŸŽ€

Open PAL can involuntarily checkpoint and restart sequential programs. That's the whole serve. But it's not free, bestie β€” it only works if:

  • Open PAL was compiled with thread support, and
  • the back-end checkpointing systems are actually available at run-time.

No threads, no checkpoints. Periodt. πŸ’€

🌸 Phases of Checkpoint / Restart 🌸

Open PAL defines three phases for checkpoint / restart support inside a process. Three! A little trilogy. 🫢

  • Checkpoint β€” when the checkpoint request arrives, the process gets notified of the request before the checkpoint is actually taken. Heads up first, then the snapshot.
  • Continue β€” once a checkpoint has successfully completed, the same process as the checkpoint gets notified that it successfully continued executing. It's alive, it's thriving, it's continuing. 🌱
  • Restart β€” once a checkpoint has successfully completed, a new / restarted process gets notified of its successful restart. Fresh start, new me energy. πŸ¦‹

Now here's the tea: the Continue and Restart phases are identical β€” like, literally the same thing β€” except for which process they get invoked in. The Continue phase is invoked in the same process the Checkpoint phase was invoked in. The Restart phase is only invoked in newly restarted processes.


✨ GENERAL PROCESS REQUIREMENTS ✨

For a process to use the Open PAL CRS components, it's gotta follow a few programmatic rules. Not optional, bestie, these are the prerequisites. πŸ™ˆ

First up: the program must call OPAL_INIT early in its execution. Call it once and only once. And lowkey important β€” it is not possible to checkpoint the process without it having called this function first. So like, do it. πŸ’…

Second: the program must call OPAL_FINALIZE before it terminates. This one does a significant amount of cleanup. If you don't call it, it is very likely that remnants are left in the filesystem. Nobody wants mystery filesystem leftovers, so please, clean up after yourself. 🧚

And third β€” to checkpoint and restart a process you must use the Open PAL tools to do it. If you use the backend checkpointer's own checkpoint and restart tools instead, that leads to undefined behavior. Straight up. 😭

  • To checkpoint a process, use opal_checkpoint β€” see opal_checkpoint(1).
  • To restart a process, use opal_restart β€” see opal_restart(1).

🌈 AVAILABLE COMPONENTS 🌈

Open PAL ships with two CRS components: self and blcr.

But first! The following MCA parameters apply to all components:

  • crs_base_verbose β€” sets the verbosity level for all components. Default is 0, which means silent except on error. 🀫

πŸ“ self CRS Component πŸ“

The self component invokes user-defined functions to save and restore checkpoints. That's genuinely all it does β€” it's just a mechanism for your own functions to get called at Open PAL's Checkpoint, Continue, and Restart phases. So the only data saved during the checkpoint is whatever you wrote in your checkpoint function. No library state is saved at all. Zero. Zip. 🫠

Because of that, the model for self is slightly different than for the other components. Specifically: the Restart function is not invoked in the same process image of the process that was checkpointed. Nope β€” the Restart phase gets invoked during OPAL_INIT of the new instance of the application. Which is a fancy way of saying: it starts over from main(). πŸ”„

The self component has the following MCA parameters:

  • crs_self_prefix β€” specify a string prefix for the name of the checkpoint, continue, and restart functions that Open PAL will invoke during the respective stages. So like, if you specify -mca crs_self_prefix foo, that means Open PAL expects to find three functions at run-time:
int foo_checkpoint()

int foo_continue()

int foo_restart()

By default, the prefix is set to "opal_crs_self_user". πŸŽ€

  • crs_self_priority β€” set the self component's default priority.
  • crs_self_verbose β€” set the verbosity level. Default is 0, or silent except on error.
  • crs_self_do_restart β€” this one is mostly used internally, so a general user should never need to set this value. It's set to non-0 when the new process should invoke the restart callback in OPAL_INIT. Default is 0, or normal execution. Don't touch it, bestie, it's not for us. πŸ™ˆ

πŸ’œ blcr CRS Component πŸ’œ

The Berkeley Lab Checkpoint/Restart (BLCR) single-process checkpoint is a software system developed at Lawrence Berkeley National Laboratory. Very academic, very iconic. πŸ‘‘

See the project website for more details:

http://ftg.lbl.gov/CheckpointRestart/CheckpointRestart.shtml

The blcr component has the following MCA parameters:

  • crs_blcr_priority β€” set the blcr component's default priority.
  • crs_blcr_verbose β€” set the verbosity level. Default is 0, or silent except on error.

⭐ none CRS Component ⭐

The none component simply selects no CRS component at all. All of the CRS function calls return immediately with OPAL_SUCCESS. Slay, nothing happens, bye. πŸ’…

This component is the last component to be selected by default. What that means: if another component is available, and the none component was not explicitly requested, then OPAL will attempt to activate all of the available components before falling back to this one. It's the final boss of last resorts. πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹

  • opal_checkpoint(1)
  • opal_restart(1)

k that's the whole page, bestie, you ate it πŸ’…βœ¨ β€” and just so you have the receipts: this was 4.1.6, dated Sep 30, 2023. go checkpoint something responsibly, mwah πŸ«ΆπŸŽ€πŸŒˆ

πŸ“¦ where this page comes from