Case closed.
This commit is contained in:
@@ -45,8 +45,7 @@ def get_last_n_cores_per_socket(n=32):
|
||||
cpu_str = ",".join(segments)
|
||||
total = len(segments) * n
|
||||
print(f" CPU binding: taskset -c {cpu_str} ({total} cores, last {n} per socket)")
|
||||
#return f"taskset -c {cpu_str}"
|
||||
return f""
|
||||
return f"taskset -c {cpu_str}" if cpu_str else ""
|
||||
|
||||
|
||||
## CPU core binding: dynamically select the last 32 cores of each socket (64 cores total)
|
||||
@@ -145,10 +144,11 @@ def _stop_cuda_mps(runtime_env):
|
||||
|
||||
def _gpu_runtime_env():
|
||||
runtime_env = os.environ.copy()
|
||||
original_env = set(os.environ.keys())
|
||||
finite_difference = str(getattr(input_data, "Finite_Diffenence_Method", "4th-order")).strip()
|
||||
|
||||
defaults = {
|
||||
"AMSS_EVOLVE_TIMING": "1",
|
||||
"AMSS_EVOLVE_TIMING": "0",
|
||||
"AMSS_ESCALAR_STEP_TIMING": "0",
|
||||
"AMSS_INTERP_FAST": "1",
|
||||
"AMSS_INTERP_GPU": "1",
|
||||
@@ -200,6 +200,38 @@ def _gpu_runtime_env():
|
||||
for key, value in defaults.items():
|
||||
runtime_env.setdefault(key, value)
|
||||
|
||||
input_overrides = [
|
||||
"AMSS_EVOLVE_TIMING",
|
||||
"AMSS_ESCALAR_STEP_TIMING",
|
||||
"AMSS_INTERP_FAST",
|
||||
"AMSS_INTERP_GPU",
|
||||
"AMSS_ANALYSIS_MAP_EVERY",
|
||||
"AMSS_CUDA_AWARE_MPI",
|
||||
"AMSS_CUDA_KEEP_RESIDENT_AFTER_STEP",
|
||||
"AMSS_CUDA_KEEP_ALL_LEVELS",
|
||||
"AMSS_CUDA_ESCALAR_KEEP_RESIDENT_AFTER_STEP",
|
||||
"AMSS_CUDA_ESCALAR_KEEP_ALL_LEVELS",
|
||||
"AMSS_CUDA_EM_CACHE_SOURCES",
|
||||
"AMSS_CUDA_EM_ZERO_FASTPATH",
|
||||
"AMSS_EM_ZERO_ANALYSIS_FASTPATH",
|
||||
"AMSS_EM_ZERO_RESIDENT_DOWNLOAD_FASTPATH",
|
||||
"AMSS_CUDA_AMR_HOST_STAGED",
|
||||
"AMSS_CUDA_AMR_RESTRICT_DEVICE",
|
||||
"AMSS_CUDA_AMR_RESTRICT_BATCH",
|
||||
"AMSS_CUDA_DEVICE_SEGMENT_BATCH",
|
||||
"AMSS_CUDA_UNCACHED_DEVICE_BUFFERS",
|
||||
"AMSS_SHELL_FAST_INTERP",
|
||||
"AMSS_SHELL_PARALLEL_INTERP",
|
||||
"AMSS_SHELL_CUDA_INTERP",
|
||||
"AMSS_SHELL_INTERP_THREADS",
|
||||
"AMSS_Z4C_CUDA_RESIDENT",
|
||||
"AMSS_CONSTRAINT_OUT_EVERY",
|
||||
"AMSS_Z4C_MRBD",
|
||||
]
|
||||
for env_name in input_overrides:
|
||||
if env_name not in original_env and hasattr(input_data, env_name):
|
||||
runtime_env[env_name] = str(getattr(input_data, env_name))
|
||||
|
||||
passthrough_envs = [
|
||||
"AMSS_CUDA_RESIDENT_SYNC",
|
||||
"AMSS_CUDA_BSSN_RESIDENT_SYNC",
|
||||
@@ -410,7 +442,6 @@ def run_ABE():
|
||||
for line in mpi_process.stdout:
|
||||
print(line, end='') # stream output in real time
|
||||
file0.write(line) # write the line to file
|
||||
file0.flush() # flush to ensure each line is written immediately (optional)
|
||||
|
||||
## Wait for the process to finish
|
||||
mpi_return_code = mpi_process.wait()
|
||||
@@ -454,8 +485,6 @@ def run_TwoPunctureABE():
|
||||
for line in TwoPuncture_process.stdout:
|
||||
print(line, end='') # stream output in real time
|
||||
file0.write(line) # write the line to file
|
||||
file0.flush() # flush to ensure each line is written immediately (optional)
|
||||
file0.close()
|
||||
|
||||
## Wait for the process to finish
|
||||
TwoPuncture_command_return_code = TwoPuncture_process.wait()
|
||||
|
||||
Reference in New Issue
Block a user