From 0afdcb2f0988e7ecfbbd73f69bc1f517cbeaee62 Mon Sep 17 00:00:00 2001 From: Iglesia Dolci Date: Wed, 20 Sep 2023 09:43:44 +0100 Subject: [PATCH] WIP --- checkpoint_schedules/hrevolve.py | 19 +- docs/notebooks/tutorial.ipynb | 374 ++++++++++++++++++++++++--- docs/source/TOCFILE.rst | 5 + docs/source/checkpoint_schedules.rst | 23 +- docs/source/intro.rst | 6 +- 5 files changed, 359 insertions(+), 68 deletions(-) diff --git a/checkpoint_schedules/hrevolve.py b/checkpoint_schedules/hrevolve.py index f05a41c..1cfe964 100644 --- a/checkpoint_schedules/hrevolve.py +++ b/checkpoint_schedules/hrevolve.py @@ -17,7 +17,7 @@ class RevolveCheckpointSchedule(CheckpointSchedule): - """A Revolve checkpointing schedule. + """A checkpointing schedule. Offline, one adjoint calculation permitted. Attributes @@ -33,14 +33,13 @@ class RevolveCheckpointSchedule(CheckpointSchedule): Notes ----- - This Class is able to convert the H-revolvers algorithmics to - *checkpoint_schedules* actions and iterate over them. - The revolver algorithmics are: H-Revolve, Disk Revolve, - Periodic Disk Revolve and Revolve. Theses algorithms produce a schedule - containing a sequence of operations that are converted to - *checkpoint_schedules* actions: *Forward*, *Reverse*, *Copy*, *Move*, - *EndForward* and *EndReverse*. The schedules are not able to create - schedules for `_snapshots_in_ram` equal to zero. + This class converts the operations from H-revolve, Disk Revolve, Periodic + Disk Revolve and Revolve algorithmics to *checkpoint_schedules* actions, + e.g, the operation ``F_0->6`` is converted to the *checkpoint_schedules* + action :class:`~.schedules.Forward`. + + **The checkpointing algorithimics mentioned above are able to create + schedules for `'_snapshots_in_ram > 0'`.** """ def __init__(self, max_n, snapshots_in_ram, snapshots_on_disk, schedule): @@ -53,7 +52,7 @@ def __init__(self, max_n, snapshots_in_ram, snapshots_on_disk, schedule): self._schedule = schedule def _iterator(self): - """A checkpoint schedules iterator. + """A checkpoint schedule iterator. Yields ------ diff --git a/docs/notebooks/tutorial.ipynb b/docs/notebooks/tutorial.ipynb index 23a5b2c..0e5c787 100644 --- a/docs/notebooks/tutorial.ipynb +++ b/docs/notebooks/tutorial.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 46, "metadata": {}, "outputs": [], "source": [ @@ -165,7 +165,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 47, "metadata": {}, "outputs": [], "source": [ @@ -182,9 +182,20 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 48, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- -------------------------------------------------------\n", + " 0 ---▷---▷---▷---▷ Forward(0, sys.maxsize, False, False, StorageType.NONE)\n", + " 1 End Forward EndForward()\n" + ] + } + ], "source": [ "cp_schedule = NoneCheckpointSchedule() # Checkpoint schedule object\n", "solver_manager.execute(cp_schedule) # Execute the forward solver by following the schedule." @@ -236,9 +247,22 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 49, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ------------------------------------------------------\n", + " 0 ---▶---▶---▶---▶ Forward(0, sys.maxsize, False, True, StorageType.WORK)\n", + " 1 End Forward EndForward()\n", + " 2 ◀---◀---◀---◀--- Reverse(4, 0, True)\n", + " 3 End Reverse EndReverse()\n" + ] + } + ], "source": [ "cp_schedule = SingleMemoryStorageSchedule()\n", "solver_manager.execute(cp_schedule)\n" @@ -286,9 +310,29 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 50, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ------------------------------------------------------\n", + " 0 ---▶---▶---▶---▶ Forward(0, sys.maxsize, False, True, StorageType.DISK)\n", + " 1 End Forward EndForward()\n", + " 2 Copy(3, StorageType.DISK, StorageType.WORK)\n", + " 3 . . . ◀--- Reverse(4, 3, True)\n", + " 4 Copy(2, StorageType.DISK, StorageType.WORK)\n", + " 5 . . ◀--- Reverse(3, 2, True)\n", + " 6 Copy(1, StorageType.DISK, StorageType.WORK)\n", + " 7 . ◀--- Reverse(2, 1, True)\n", + " 8 Copy(0, StorageType.DISK, StorageType.WORK)\n", + " 9 ◀--- Reverse(1, 0, True)\n", + " 10 End Reverse EndReverse()\n" + ] + } + ], "source": [ "cp_schedule = SingleDiskStorageSchedule()\n", "solver_manager.execute(cp_schedule)\n" @@ -325,9 +369,29 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 51, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ------------------------------------------------------\n", + " 0 ---▶---▶---▶---▶ Forward(0, sys.maxsize, False, True, StorageType.DISK)\n", + " 1 End Forward EndForward()\n", + " 2 Move(3, StorageType.DISK, StorageType.WORK)\n", + " 3 . . . ◀--- Reverse(4, 3, True)\n", + " 4 Move(2, StorageType.DISK, StorageType.WORK)\n", + " 5 . . ◀--- Reverse(3, 2, True)\n", + " 6 Move(1, StorageType.DISK, StorageType.WORK)\n", + " 7 . ◀--- Reverse(2, 1, True)\n", + " 8 Move(0, StorageType.DISK, StorageType.WORK)\n", + " 9 ◀--- Reverse(1, 0, True)\n", + " 10 End Reverse EndReverse()\n" + ] + } + ], "source": [ "cp_schedule = SingleDiskStorageSchedule(move_data=True)\n", "solver_manager.execute(cp_schedule)" @@ -368,9 +432,34 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 52, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ---------------------------------------------\n", + " 0 *---▷---▷ Forward(0, 2, True, False, StorageType.RAM)\n", + " 1 . . *---▷ Forward(2, 3, True, False, StorageType.RAM)\n", + " 2 . . . ---▶ Forward(3, 4, False, True, StorageType.WORK)\n", + " 3 End Forward EndForward()\n", + " 4 . . . ◀--- Reverse(4, 3, True)\n", + " 5 Move(2, StorageType.RAM, StorageType.WORK)\n", + " 6 . . ---▶ Forward(2, 3, False, True, StorageType.WORK)\n", + " 7 . . ◀--- Reverse(3, 2, True)\n", + " 8 Copy(0, StorageType.RAM, StorageType.WORK)\n", + " 9 ---▷ Forward(0, 1, False, False, StorageType.WORK)\n", + " 10 . ---▶ Forward(1, 2, False, True, StorageType.WORK)\n", + " 11 . ◀--- Reverse(2, 1, True)\n", + " 12 Move(0, StorageType.RAM, StorageType.WORK)\n", + " 13 ---▶ Forward(0, 1, False, True, StorageType.WORK)\n", + " 14 ◀--- Reverse(1, 0, True)\n", + " 15 End Reverse EndReverse()\n" + ] + } + ], "source": [ "from checkpoint_schedules import StorageType\n", "snaps_in_ram = 2 \n", @@ -417,9 +506,34 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 53, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ---------------------------------------------\n", + " 0 *---▷---▷ Forward(0, 2, True, False, StorageType.RAM)\n", + " 1 . . +---▷ Forward(2, 3, True, False, StorageType.DISK)\n", + " 2 . . . ---▶ Forward(3, 4, False, True, StorageType.WORK)\n", + " 3 End Forward EndForward()\n", + " 4 . . . ◀--- Reverse(4, 3, True)\n", + " 5 Move(2, StorageType.DISK, StorageType.WORK)\n", + " 6 . . ---▶ Forward(2, 3, False, True, StorageType.WORK)\n", + " 7 . . ◀--- Reverse(3, 2, True)\n", + " 8 Copy(0, StorageType.RAM, StorageType.WORK)\n", + " 9 ---▷ Forward(0, 1, False, False, StorageType.WORK)\n", + " 10 . ---▶ Forward(1, 2, False, True, StorageType.WORK)\n", + " 11 . ◀--- Reverse(2, 1, True)\n", + " 12 Move(0, StorageType.RAM, StorageType.WORK)\n", + " 13 ---▶ Forward(0, 1, False, True, StorageType.WORK)\n", + " 14 ◀--- Reverse(1, 0, True)\n", + " 15 End Reverse EndReverse()\n" + ] + } + ], "source": [ "snaps_in_ram = 1 # maximum number of checkpoints stored in RAM\n", "snaps_on_disk = 1 # maximum number of checkpoints stored in disk\n", @@ -448,9 +562,34 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 54, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ---------------------------------------------\n", + " 0 *---▷---▷---▷ Forward(0, 3, True, False, StorageType.RAM)\n", + " 1 . . . ---▶ Forward(3, 4, False, True, StorageType.WORK)\n", + " 2 End Forward EndForward()\n", + " 3 . . . ◀--- Reverse(4, 3, True)\n", + " 4 Copy(0, StorageType.RAM, StorageType.WORK)\n", + " 5 ---▷---▷ Forward(0, 2, False, False, StorageType.WORK)\n", + " 6 . . ---▶ Forward(2, 3, False, True, StorageType.WORK)\n", + " 7 . . ◀--- Reverse(3, 2, True)\n", + " 8 Copy(0, StorageType.RAM, StorageType.WORK)\n", + " 9 ---▷ Forward(0, 1, False, False, StorageType.WORK)\n", + " 10 . ---▶ Forward(1, 2, False, True, StorageType.WORK)\n", + " 11 . ◀--- Reverse(2, 1, True)\n", + " 12 Move(0, StorageType.RAM, StorageType.WORK)\n", + " 13 ---▶ Forward(0, 1, False, True, StorageType.WORK)\n", + " 14 ◀--- Reverse(1, 0, True)\n", + " 15 End Reverse EndReverse()\n" + ] + } + ], "source": [ "snaps_in_ram = 1 # number of checkpoints stored in RAM\n", "cp_schedule = DiskRevolve(max_n, snapshots_in_ram=snaps_in_ram) # checkpointing schedule object\n", @@ -470,9 +609,35 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 55, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "We use periods of size 3\n", + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ---------------------------------------------\n", + " 0 *---▷---▷---▷ Forward(0, 3, True, False, StorageType.RAM)\n", + " 1 . . . ---▶ Forward(3, 4, False, True, StorageType.WORK)\n", + " 2 End Forward EndForward()\n", + " 3 . . . ◀--- Reverse(4, 3, True)\n", + " 4 Copy(0, StorageType.RAM, StorageType.WORK)\n", + " 5 ---▷---▷ Forward(0, 2, False, False, StorageType.WORK)\n", + " 6 . . ---▶ Forward(2, 3, False, True, StorageType.WORK)\n", + " 7 . . ◀--- Reverse(3, 2, True)\n", + " 8 Copy(0, StorageType.RAM, StorageType.WORK)\n", + " 9 ---▷ Forward(0, 1, False, False, StorageType.WORK)\n", + " 10 . ---▶ Forward(1, 2, False, True, StorageType.WORK)\n", + " 11 . ◀--- Reverse(2, 1, True)\n", + " 12 Move(0, StorageType.RAM, StorageType.WORK)\n", + " 13 ---▶ Forward(0, 1, False, True, StorageType.WORK)\n", + " 14 ◀--- Reverse(1, 0, True)\n", + " 15 End Reverse EndReverse()\n" + ] + } + ], "source": [ "snaps_in_ram = 1\n", "cp_schedule = PeriodicDiskRevolve(max_n, snaps_in_ram)\n", @@ -491,9 +656,34 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ---------------------------------------------\n", + " 0 *---▷---▷---▷ Forward(0, 3, True, False, StorageType.RAM)\n", + " 1 . . . ---▶ Forward(3, 4, False, True, StorageType.WORK)\n", + " 2 End Forward EndForward()\n", + " 3 . . . ◀--- Reverse(4, 3, True)\n", + " 4 Copy(0, StorageType.RAM, StorageType.WORK)\n", + " 5 ---▷---▷ Forward(0, 2, False, False, StorageType.WORK)\n", + " 6 . . ---▶ Forward(2, 3, False, True, StorageType.WORK)\n", + " 7 . . ◀--- Reverse(3, 2, True)\n", + " 8 Copy(0, StorageType.RAM, StorageType.WORK)\n", + " 9 ---▷ Forward(0, 1, False, False, StorageType.WORK)\n", + " 10 . ---▶ Forward(1, 2, False, True, StorageType.WORK)\n", + " 11 . ◀--- Reverse(2, 1, True)\n", + " 12 Move(0, StorageType.RAM, StorageType.WORK)\n", + " 13 ---▶ Forward(0, 1, False, True, StorageType.WORK)\n", + " 14 ◀--- Reverse(1, 0, True)\n", + " 15 End Reverse EndReverse()\n" + ] + } + ], "source": [ "snaps_on_disk = 1\n", "snaps_in_ram = 1\n", @@ -514,9 +704,33 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 57, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ---------------------------------------------\n", + " 0 +---▷---▷---▷ Forward(0, 3, True, False, StorageType.DISK)\n", + " 1 . . . ---▶ Forward(3, 4, False, True, StorageType.WORK)\n", + " 2 End Forward EndForward()\n", + " 3 . . . ◀--- Reverse(4, 3, True)\n", + " 4 Copy(0, StorageType.DISK, StorageType.WORK)\n", + " 5 ---▷---▷ Forward(0, 2, False, False, StorageType.WORK)\n", + " 6 . . ---▶ Forward(2, 3, False, True, StorageType.WORK)\n", + " 7 . . ◀--- Reverse(3, 2, True)\n", + " 8 Move(0, StorageType.DISK, StorageType.WORK)\n", + " 9 ---▶ Forward(0, 1, False, True, StorageType.DISK)\n", + " 10 . ---▶ Forward(1, 2, False, True, StorageType.WORK)\n", + " 11 . ◀--- Reverse(2, 1, True)\n", + " 12 Move(0, StorageType.DISK, StorageType.WORK)\n", + " 13 ◀--- Reverse(1, 0, True)\n", + " 14 End Reverse EndReverse()\n" + ] + } + ], "source": [ "snaps_on_disk = 1\n", "max_n = 4\n", @@ -533,9 +747,33 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 58, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ---------------------------------------------\n", + " 0 *---▷---▷---▷ Forward(0, 3, True, False, StorageType.RAM)\n", + " 1 . . . ---▶ Forward(3, 4, False, True, StorageType.WORK)\n", + " 2 End Forward EndForward()\n", + " 3 . . . ◀--- Reverse(4, 3, True)\n", + " 4 Copy(0, StorageType.RAM, StorageType.WORK)\n", + " 5 ---▷---▷ Forward(0, 2, False, False, StorageType.WORK)\n", + " 6 . . ---▶ Forward(2, 3, False, True, StorageType.WORK)\n", + " 7 . . ◀--- Reverse(3, 2, True)\n", + " 8 Move(0, StorageType.RAM, StorageType.WORK)\n", + " 9 ---▶ Forward(0, 1, False, True, StorageType.RAM)\n", + " 10 . ---▶ Forward(1, 2, False, True, StorageType.WORK)\n", + " 11 . ◀--- Reverse(2, 1, True)\n", + " 12 Move(0, StorageType.RAM, StorageType.WORK)\n", + " 13 ◀--- Reverse(1, 0, True)\n", + " 14 End Reverse EndReverse()\n" + ] + } + ], "source": [ "snaps_in_ram = 1\n", "cp_schedule = MixedCheckpointSchedule(max_n, snaps_on_disk, storage=StorageType.RAM)\n", @@ -557,9 +795,36 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 59, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ---------------------------------------------\n", + " 0 +---▷---▷---▷ Forward(0, 3, True, False, StorageType.DISK)\n", + " 1 . . . +---▷ Forward(3, 6, True, False, StorageType.DISK)\n", + " 2 End Forward EndForward()\n", + " 3 Copy(3, StorageType.DISK, StorageType.WORK)\n", + " 4 . . . ---▶ Forward(3, 4, False, True, StorageType.WORK)\n", + " 5 . . . ◀--- Reverse(4, 3, True)\n", + " 6 Copy(0, StorageType.DISK, StorageType.WORK)\n", + " 7 ---▷ Forward(0, 1, False, False, StorageType.WORK)\n", + " 8 . +---▷ Forward(1, 2, True, False, StorageType.DISK)\n", + " 9 . . ---▶ Forward(2, 3, False, True, StorageType.WORK)\n", + " 10 . . ◀--- Reverse(3, 2, True)\n", + " 11 Move(1, StorageType.DISK, StorageType.WORK)\n", + " 12 . ---▶ Forward(1, 2, False, True, StorageType.WORK)\n", + " 13 . ◀--- Reverse(2, 1, True)\n", + " 14 Copy(0, StorageType.DISK, StorageType.WORK)\n", + " 15 ---▶ Forward(0, 1, False, True, StorageType.WORK)\n", + " 16 ◀--- Reverse(1, 0, True)\n", + " 17 End Reverse EndReverse()\n" + ] + } + ], "source": [ "add_snaps = 1 # additional storage of the forward restart data\n", "period = 3\n", @@ -578,9 +843,36 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 60, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Action index: Run-time illustration Action:\n", + "--------------- ----------------------- ---------------------------------------------\n", + " 0 +---▷---▷---▷ Forward(0, 3, True, False, StorageType.DISK)\n", + " 1 . . . +---▷ Forward(3, 6, True, False, StorageType.DISK)\n", + " 2 End Forward EndForward()\n", + " 3 Copy(3, StorageType.DISK, StorageType.WORK)\n", + " 4 . . . ---▶ Forward(3, 4, False, True, StorageType.WORK)\n", + " 5 . . . ◀--- Reverse(4, 3, True)\n", + " 6 Copy(0, StorageType.DISK, StorageType.WORK)\n", + " 7 ---▷ Forward(0, 1, False, False, StorageType.WORK)\n", + " 8 . *---▷ Forward(1, 2, True, False, StorageType.RAM)\n", + " 9 . . ---▶ Forward(2, 3, False, True, StorageType.WORK)\n", + " 10 . . ◀--- Reverse(3, 2, True)\n", + " 11 Move(1, StorageType.RAM, StorageType.WORK)\n", + " 12 . ---▶ Forward(1, 2, False, True, StorageType.WORK)\n", + " 13 . ◀--- Reverse(2, 1, True)\n", + " 14 Copy(0, StorageType.DISK, StorageType.WORK)\n", + " 15 ---▶ Forward(0, 1, False, True, StorageType.WORK)\n", + " 16 ◀--- Reverse(1, 0, True)\n", + " 17 End Reverse EndReverse()\n" + ] + } + ], "source": [ "revolver = TwoLevelCheckpointSchedule(period, binomial_snapshots=snaps_on_disk, \n", " binomial_storage=StorageType.RAM)\n", diff --git a/docs/source/TOCFILE.rst b/docs/source/TOCFILE.rst index 8430b73..82dfcbb 100644 --- a/docs/source/TOCFILE.rst +++ b/docs/source/TOCFILE.rst @@ -8,4 +8,9 @@ checkpoint_schedules checkpoint_schedules +.. toctree:: + :maxdepth: 4 + + intro + diff --git a/docs/source/checkpoint_schedules.rst b/docs/source/checkpoint_schedules.rst index b56e5c9..d85bdfd 100644 --- a/docs/source/checkpoint_schedules.rst +++ b/docs/source/checkpoint_schedules.rst @@ -1,47 +1,44 @@ Schedules ========== -.. automodule:: checkpoint_schedules.hrevolve +.. automodule:: checkpoint_schedules.basic_schedules :members: :undoc-members: :show-inheritance: -.. automodule:: checkpoint_schedules.mixed +.. automodule:: checkpoint_schedules.hrevolve :members: :undoc-members: :show-inheritance: -.. automodule:: checkpoint_schedules.multistage +.. autoclass:: checkpoint_schedules.hrevolve.RevolveCheckpointSchedule :members: :undoc-members: :show-inheritance: - -.. automodule:: checkpoint_schedules.basic_schedules +.. automodule:: checkpoint_schedules.mixed :members: :undoc-members: :show-inheritance: -.. automodule:: checkpoint_schedules.twolevel_binomial +.. automodule:: checkpoint_schedules.multistage :members: :undoc-members: :show-inheritance: -Base Classes to build new schedules -=================================== -.. automodule:: checkpoint_schedules.schedule +.. automodule:: checkpoint_schedules.twolevel_binomial :members: :undoc-members: :show-inheritance: -Utils -===== -.. automodule:: checkpoint_schedules.utils +Base Classes to build schedules +=============================== +.. automodule:: checkpoint_schedules.schedule :members: :undoc-members: :show-inheritance: -H-Revolve Sequences +H-Revolve sequences =================== .. automodule:: checkpoint_schedules.hrevolve_sequences.basic_functions diff --git a/docs/source/intro.rst b/docs/source/intro.rst index 289e922..8d4a11a 100644 --- a/docs/source/intro.rst +++ b/docs/source/intro.rst @@ -5,8 +5,8 @@ Introduction *checkpointing_schedules* provides schedules for step based incremental checkpointing of the adjoints to computer models. The schedules are designed by a sequence -of *checkpoint_schedules* actions, namely: *Forward*, *Reverse*, *EndForward*, *EndReverse*, -*Move*, and *Copy*. In essence, these actions provide functionalities to time advancing the +of *checkpoint_schedules* actions, namely: :class:`~.schedules.Forward`, :class:`~.schedules.Reveverse`, :class:`~.schedules.EndForward`, :class:`~.schedules.EndReverse`, :class:`~.schedules.Move`, and :class:`~.schedules.Copy`. +In essence, these actions provide functionalities to time advancing the forward and adjoint solvers, checkpoint data storage and retrieval, and indicate the solver finalisations. @@ -41,8 +41,6 @@ To advance in the basics of *checkpoint_schedules* usage, we recommend to read t References ~~~~~~~~~~ -### References - [1] Griewank, A., & Walther, A. (2000). Algorithm 799: revolve: an implementation of checkpointing for the reverse or adjoint mode of computational differentiation. ACM Transactions on Mathematical Software (TOMS), 26(1), 19-45., doi: 10.1145/347837.347846 [2] Stumm, P., & Walther, A. (2009). Multistage approaches for optimal offline checkpointing. SIAM Journal on Scientific Computing, 31(3), 1946-1967. 10.1137/080718036