From 74de768b3a0a917f11b23c9422621e9e12766064 Mon Sep 17 00:00:00 2001 From: fosfrancesco Date: Mon, 3 Oct 2022 11:55:40 +0200 Subject: [PATCH 1/2] windows handling keyboard exception --- bin/launch_acc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/launch_acc.py b/bin/launch_acc.py index 0de3f7c..fa2141e 100644 --- a/bin/launch_acc.py +++ b/bin/launch_acc.py @@ -3,6 +3,7 @@ import multiprocessing import os os.environ["KMP_DUPLICATE_LIB_OK"] = "True" +os.environ['FOR_DISABLE_CONSOLE_CTRL_HANDLER'] = '1' import os import argparse import glob From 564b728043e47c77660e5e4b8abbc9c6f4d3951d Mon Sep 17 00:00:00 2001 From: nimrodVarga Date: Fri, 7 Oct 2022 11:31:19 +0200 Subject: [PATCH 2/2] Added comment for windows ctrl+c fix and removed redundant os import and sys.path.append --- bin/launch_acc.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/launch_acc.py b/bin/launch_acc.py index fa2141e..5dd92a9 100644 --- a/bin/launch_acc.py +++ b/bin/launch_acc.py @@ -3,14 +3,17 @@ import multiprocessing import os os.environ["KMP_DUPLICATE_LIB_OK"] = "True" + +# this environment variable disables an Intel Fortan Runtime Library on Windows (which is internally used by numpy probably) +# to add a handler to the Console interrupts +# this is necessary because this handler tends to crash the program when ctrl+c is pressed, not executing ACCompanion shutdown code os.environ['FOR_DISABLE_CONSOLE_CTRL_HANDLER'] = '1' -import os + import argparse import glob from accompanion import PLATFORM -import sys -sys.path.append("..") + overridable_args = [ "use_mediator",