We present the checkpointing scheme of Abacus, an $N$-body simulation code that allocates all persistent state in POSIX shared memory, or ramdisk. Checkpointing becomes as simple as copying files from ramdisk to external storage. The main simulation executable is invoked once per time step, memory mapping the input state, computing the output state directly into ramdisk, and unmapping the input state. The main executable remains unaware of the concept of checkpointing, with the top-level driver code launching a file-system copy between executable invocations when a checkpoint is needed. Since the only information flow is through files on ramdisk, the checkpoint must be correct so long as the simulation is correct. However, we find that with multi-GB of state, there is a significant overhead to unmapping the shared memory. This can be partially mitigated with multithreading, but ultimately, we do not recommend shared memory for use with a large state.
翻译:我们展示了“ Abacus” 的检查站计划, 这是一种用$N$- body 模拟代码, 分配 POSIX 共享记忆中的所有持久性状态, 或拉面盘 。 检查变得像从 rapdisk 复制文件到外部存储一样简单。 主要的模拟执行程序每时间步骤一次被引用, 内存映射输入状态, 将输出状态直接计算为 rabdisk, 并取消输入状态的映射 。 主要的执行程序仍然不知道检查站的概念, 顶级驱动程序代码在需要检查站时在可执行的作业之间启动文件系统副本 。 由于唯一的信息流是通过 rapdisk 上的文件, 只要模拟正确, 检查站就必须正确无误 。 然而, 我们发现, 只要模拟正确, 使用多格状态, 就会有相当高的顶部可以解析共享的记忆。 这一点可以部分通过多读来缓解, 但是最终, 我们不建议共享用于大状态的记忆 。