优化雅可比矩阵计算;端口转发情况下仿真结果传输方式优化
This commit is contained in:
1 parent
3bc4be3c06
commit
aa4951b14e
28 files changed
+8038
-23
No files matched your search
@@ -41,6 +41,11 @@ def execute_native(build: NativeBuild, config: SolveIVPConfig, sample_step: floa
|
||||
command.append("--solve-only")
|
||||
creationflags = subprocess.CREATE_NO_WINDOW if os.name == "nt" else 0
|
||||
started = time.perf_counter()
|
||||
# A fast worker may finish before the monitor's first iteration. Honor a
|
||||
# cancellation already requested during preparation before spawning it.
|
||||
cancelled_at = started if cancel_check is not None and cancel_check() else None
|
||||
if cancelled_at is not None:
|
||||
cancel_path.write_text("cancel\n", encoding="ascii")
|
||||
process = subprocess.Popen(command, cwd=build.executable.parent, stdin=subprocess.DEVNULL,
|
||||
stdout=subprocess.DEVNULL, stderr=subprocess.PIPE,
|
||||
text=True, encoding="utf-8", errors="replace", creationflags=creationflags)
|
||||
@@ -53,7 +58,6 @@ def execute_native(build: NativeBuild, config: SolveIVPConfig, sample_step: floa
|
||||
reader.start()
|
||||
if activity_tracker is not None:
|
||||
activity_tracker.start_integration(config.t_start)
|
||||
cancelled_at = None
|
||||
last_time = config.t_start
|
||||
try:
|
||||
with (run_dir / "worker.log").open("w", encoding="utf-8") as log:
|
||||
|
||||
Reference in new issue
Block a user