| title | Quick start |
|---|---|
| nav_order | 2 |
| description | Build MANA, run an example under MANA, checkpoint it and restart it. |
{: .no_toc }
This page builds MANA, runs an example program under MANA on one host, checkpoints it, and restarts it. It takes about ten minutes. {: .fs-6 .fw-300 }
- TOC {:toc}
You need an MPI library with its compiler wrappers (mpicc, mpicxx and
mpifort) in PATH, a C++20 compiler, and Python 3. On Debian and Ubuntu,
also install the package libc6-dbg. Install gives the full
list of requirements.
git clone https://github.com/mpickpt/mana
cd mana
./configure # also checks out DMTCP, the dmtcp submodule of MANA
make -j8make puts the MANA commands in bin/ and the libraries in lib/dmtcp/. Run
the commands below from the top directory of MANA.
make -C examplesThis builds examples/ring. In each step, the program passes a token around a
ring of all ranks and sums one value per rank. It runs 60 steps of one second
each, and rank 0 prints one line per step. The options -n STEPS and
-s SECONDS change these values.
bin/mana_coordinatorThe coordinator controls the checkpoints of a job. It runs in the background.
It writes its host and port to ~/.mana.rc, where the other MANA commands
find them.
mpirun -np 4 bin/mana_launch examples/ringmana_launch runs each rank under MANA. Give mana_launch to the MPI launcher
in place of the program, and give the program to mana_launch.
While the job runs, open another shell in the same directory, and type:
bin/mana_status --checkpointEach rank N writes its checkpoint into the directory ckpt_rank_N in the
current directory. Then the job continues.
Stop the job with Ctrl-C in the first shell.
A coordinator stops when the last rank of its job stops. So, start a new coordinator, and then restart the job:
bin/mana_coordinator
mpirun -np 4 bin/mana_restartThe job continues from the step of the checkpoint, not from step 1. Restart with the same number of ranks as the original job.
{: .note }
mana_launch does not start if the checkpoint directory already contains
ckpt_rank_* directories. Move or delete an old checkpoint before you launch
a new job. make tidy deletes the checkpoints in the top directory of MANA.
Use the same commands in an allocation, and use srun in place of mpirun:
salloc -N 2 -t 01:00:00
bin/mana_coordinator
srun -N 2 bin/mana_launch examples/ringClusters and Slurm gives more information.
- Checkpoint and restart: the other ways to checkpoint, for example periodic checkpoints.
- Commands: the options of each MANA command.
- MPI support and limitations: what MANA supports.