If a process fails in the background, bash ignores it even when running
with set -e. To address it, we store a token in a file per each rank,
which only gets written when each process finishes properly. Then we
make sure that each rank has completed successfully, otherwise we fail
the test.