<html aria-label="message body"><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Ooh, you are using the "Trigger" thorn. I thought you were using "TerminationTrigger". So that's an option -- use that thorn instead.<div><br></div><div>Otherwise, if you find your requested feature convenient, then please go ahead and implement it! It would be a nice addition to Cactus.</div><div><br></div><div>-erik<div><div><br><blockquote type="cite"><div>On Jun 4, 2026, at 10:19, Jordan Nicoules <jnicoules@ua.pt> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-line: none; text-decoration-thickness: auto; text-decoration-style: solid; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;"><div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><div style="margin-top: 0px; margin-bottom: 0px;">Hi Erik,</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">Thank you for your reply! I know of CCTK_TerminateNext, I actually use it in one of my thorns (so I could hack it to achieve what I want). In fact, a call to this function is what I would add to Trigger.</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">My point is more: with the existing thorns, is there a way to terminate a simulation while it's running (and before its expected end based on final time/iteration),<span class="Apple-converted-space"> </span><i>with a parfile directive,</i><span class="Apple-converted-space"> </span>without:</div><div style="margin-top: 0px; margin-bottom: 0px;">- manually editing the termination file</div><div style="margin-top: 0px; margin-bottom: 0px;">- reaching walltime</div><div style="margin-top: 0px; margin-bottom: 0px;">- having NaNs</div><div style="margin-top: 0px; margin-bottom: 0px;">- and such edge cases.</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">Something that would be like:</div><div style="margin-top: 0px; margin-bottom: 0px;">```</div><p style="margin-top: 0px; margin-bottom: 0px;"></p><div>Trigger::Trigger_Checked_Variable    [0] = "ADMBase::lapse"<br>Trigger::Trigger_Reduction           [0] = "minimum"<br>Trigger::Trigger_Relation            [0] = "<"<br>Trigger::Trigger_Checked_Value       [0] = 0.2<br>Trigger::Trigger_Reaction            [0] = "terminate"    # <-- This doesn't exist as far as I understand</div>```<p style="margin-top: 0px; margin-bottom: 0px;"></p><br></div><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">Thanks,</div><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><br></div><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">Jordan<br><br><div style=""><hr tabindex="-1" style="display: inline-block; width: 733.03125px;"><div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>Users <<a href="mailto:users-bounces@einsteintoolkit.org">users-bounces@einsteintoolkit.org</a>> on behalf of Erik Schnetter via Users <<a href="mailto:users@einsteintoolkit.org">users@einsteintoolkit.org</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>Thursday, June 4, 2026 14:57<br><b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:users@einsteintoolkit.org">users@einsteintoolkit.org</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [Users] Automatic termination trigger mid-run</font><div> </div></div><div><table style="width: 748px; font-family: Arial; font-size: 10pt;"><tbody><tr><td style="width: 5px; background-color: rgb(255, 185, 0);"><br></td><td style="padding: 5px; background-color: rgb(255, 255, 224);"><strong>CUIDADO:</strong><span class="Apple-converted-space"> </span>Email de um sistema externo. Cuidado com links, anexos e pedidos de dados/senhas.<br><strong>CAUTION:</strong><span class="Apple-converted-space"> </span>Email from an external system. Be careful with links, attachments, and requests for data/passwords.</td></tr></tbody></table><div>You can call the function `CCTK_TerminateNext`, which will stop the simulation gracefully after the current iteration finishes. This is built-in, you do not need a special thorn for this.<div><br></div><div>This is how TerminationTrigger is implemented: It calls this function when a certain file is created.<br><div><br></div><div>-erik<br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Jun 4, 2026, at 09:31, Jordan Nicoules via Users <users@einsteintoolkit.org> wrote:</div><br class="Apple-interchange-newline"><div><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><div style="margin-top: 0px; margin-bottom: 0px;">Dear all,</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">I was wondering if there was a built-in way to trigger the termination of a simulation when something specific happens, along the lines of what Trigger does to steer quantities. From what I understand, Trigger does not offer that possibility, and TerminationTrigger checks either a file or a time limit. What I'm considering would be more along the lines of "an apparent horizon is found so trigger termination", in order to steer some parameters at recovery.</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">If there's no such explicit way, I'm happy to try to implement that in Trigger. I actually have ideas of other small improvements to Trigger that I could try contributing as well (namely, increase the maximum number of triggers and allow one trigger to have multiple consequences at once).</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">Unfortunately I won't be able to join the weekly call today to discuss this directly.</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">Best,</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">Jordan</div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-decoration: none; float: none; display: inline !important;">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-decoration: none; float: none; display: inline !important;">Users mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><a href="mailto:Users@einsteintoolkit.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Users@einsteintoolkit.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">http://lists.einsteintoolkit.org/mailman/listinfo/users</a></div></blockquote></div></div></div></div></div></div></div></div></div></blockquote></div><br></div></div></body></html>