import cmdline_helper as cmd
cmd.new_C_compile(Ccodesrootdir, os.path.join("output", "BrillLindquist_Playground"),
uses_free_parameters_h=True, compiler_opt_option="fast") # fastdebug or debug also supported
# Change to output directory
os.chdir(os.path.join(Ccodesrootdir, "output"))
# Clean up existing output files
cmd.delete_existing_files("out*.txt")
cmd.delete_existing_files("out*.png")
# Run executable with CFL_FACTOR = 1.0, which is allowed since
# simulation is axisymmetric and all phi derivs are set to zero.
# cmd.Execute("BrillLindquist_Playground", "72 12 2 "+str(CFL_FACTOR))
# cmd.Execute("BrillLindquist_Playground", "800 16 2 "+str(CFL_FACTOR))
cmd.Execute("BrillLindquist_Playground", str(Nr) + " " + str(Nth) + " " + str(Nph) + " " + str(CFL_FACTOR))
os.chdir(os.path.join("..", ".."))
File D:\Anaconda3_2309\Lib\subprocess.py:1538, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session, unused_process_group)
1536 # Start the process
1537 try:
-> 1538 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
1539 # no special security
1540 None, None,
1541 int(not close_fds),
1542 creationflags,
1543 env,
1544 cwd,
1545 startupinfo)
1546 finally:
1547 # Child is launched. Close the parent's copy of those pipe
1548 # handles that only the child should have open. You need
(...)
1551 # pipe will not close when the child process exits and the
1552 # ReadFile will hang.
1553 self._close_pipe_fds(p2cread, p2cwrite,
1554 c2pread, c2pwrite,
1555 errread, errwrite)
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。