Commit 7023bfad authored by Philippe SWARTVAGHER's avatar Philippe SWARTVAGHER
Browse files

plot_model.py: fix run on machine with one socket/NUMA node

parent 316d5061
......@@ -39,6 +39,8 @@ print(f"{topo.nb_cores_total} cores")
nb_cores_to_consider = topo.nb_cores_per_numa_node * topo.nb_numa_nodes_per_socket
if not cli_args.only_first_socket:
nb_cores_to_consider *= topo.nb_sockets
if topo.nb_numa_nodes_total == 1 or not cli_args.only_first_socket:
nb_cores_to_consider -= 1 # one core is used by communication thread
print(f"Will consider the performance with up to {nb_cores_to_consider} cores")
......@@ -52,10 +54,11 @@ if cli_args.model:
model_local.print_params()
print("** Modeling remote accesses...")
if topo.nb_numa_nodes_total > 1:
print("** Modeling remote accesses...")
model_remote = get_model(cli_args.comp_kernel, topo.nb_numa_nodes_per_socket, nb_cores_to_consider)
model_remote.print_params()
model_remote = get_model(cli_args.comp_kernel, topo.nb_numa_nodes_per_socket, nb_cores_to_consider)
model_remote.print_params()
else:
print("** Skipping model building")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment