Skip to content

Commit

Permalink
swap default of kill_canceled_sims from True to False, and briefly me…
Browse files Browse the repository at this point in the history
…ntion in calc_cancel_tutorial
  • Loading branch information
jlnav committed Aug 18, 2023
1 parent 2b9f466 commit d059d32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/data_structures/libE_specs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ the ``LibeSpecs`` class. When provided as a Python class, options are validated
When libEnsemble concludes and attempts to close down workers,
the number of seconds until workers are considered timed out. Worker
processes are then terminated.
"kill_canceled_sims" [bool] = ``True``:
"kill_canceled_sims" [bool] = ``False``:
Try to kill sims with ``"cancel_requested"`` set ``True``.
If ``False``, the manager avoids this moderate overhead.
"disable_log_files" [bool] = ``False``:
Expand Down
8 changes: 5 additions & 3 deletions docs/tutorials/calib_cancel_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,16 @@ be processed. The manager will send kill signals to workers that are already pro
cancelled points. These signals can be caught and acted on by the user ``sim_f``; otherwise
they will be ignored.

Allocation function
-------------------
Allocation function and Cancellation configuration
--------------------------------------------------

The allocation function used in this example is the *only_persistent_gens* function in the
*start_only_persistent* module. The calling script passes the following specification:
*start_only_persistent* module. The calling script passes the following specifications:

.. code-block:: python
libE_specs["kill_canceled_sims"] = True
alloc_specs = {
"alloc_f": alloc_f,
"user": {
Expand Down
2 changes: 1 addition & 1 deletion libensemble/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class LibeSpecs(BaseModel):
worker_timeout: Optional[int] = 1
""" On libEnsemble shutdown, number of seconds after which workers considered timed out, then terminated """

kill_canceled_sims: Optional[bool] = True
kill_canceled_sims: Optional[bool] = False
"""
Instructs libEnsemble to send kill signals to sims with their ``cancel_requested`` field set.
If ``False``, the manager avoids this moderate overhead
Expand Down

0 comments on commit d059d32

Please sign in to comment.