Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwgraph: Do not enable same-chassis feature for a single node #42

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

ErwanAliasr1
Copy link
Collaborator

As per issue#41, when tracing with a single server, the --same-chassis can be engaged generating a crash like:

~/Devel/hwbench (various)$ python3 -m graph.hwgraph graph --outdir criteo/arno_out --traces ~/Téléchargements/results.json:Arno:BMC.Server
environment: All traces are from the same chassis (GYLGS63), enabling --same-chassis feature
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/e.velu/Devel/hwbench/graph/hwgraph.py", line 380, in <module>
    main()
  File "/home/e.velu/Devel/hwbench/graph/hwgraph.py", line 376, in main
    args.func(args)
  File "/home/e.velu/Devel/hwbench/graph/hwgraph.py", line 61, in render_traces
    rendered_graphs += graph_environment(args, output_dir)
		       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/e.velu/Devel/hwbench/graph/hwgraph.py", line 234, in graph_environment
    rendered_graphs += graph_chassis(args, bench_name, output_dir)
		       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/e.velu/Devel/hwbench/graph/chassis.py", line 139, in graph_chassis
    y_serie = np.array(serie[trace.get_name()])[order]
	      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
IndexError: index 0 is out of bounds for axis 0 with size 0

This commit is adding a new condition to ensure the same-chassis feature is not engaged for a single system.

As per issue#41, when tracing with a single server, the --same-chassis
can be engaged generating a crash like:

	~/Devel/hwbench (various)$ python3 -m graph.hwgraph graph --outdir criteo/arno_out --traces ~/Téléchargements/results.json:Arno:BMC.Server
	environment: All traces are from the same chassis (GYLGS63), enabling --same-chassis feature
	Traceback (most recent call last):
	  File "<frozen runpy>", line 198, in _run_module_as_main
	  File "<frozen runpy>", line 88, in _run_code
	  File "/home/e.velu/Devel/hwbench/graph/hwgraph.py", line 380, in <module>
	    main()
	  File "/home/e.velu/Devel/hwbench/graph/hwgraph.py", line 376, in main
	    args.func(args)
	  File "/home/e.velu/Devel/hwbench/graph/hwgraph.py", line 61, in render_traces
	    rendered_graphs += graph_environment(args, output_dir)
			       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/home/e.velu/Devel/hwbench/graph/hwgraph.py", line 234, in graph_environment
	    rendered_graphs += graph_chassis(args, bench_name, output_dir)
			       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/home/e.velu/Devel/hwbench/graph/chassis.py", line 139, in graph_chassis
	    y_serie = np.array(serie[trace.get_name()])[order]
		      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
	IndexError: index 0 is out of bounds for axis 0 with size 0

This commit is adding a new condition to ensure the same-chassis feature
is not engaged for a single system.

Signed-off-by: Erwan Velu <e.velu@criteo.com>
@Arno500
Copy link
Contributor

Arno500 commented Oct 28, 2024

Worked perfectly fine during my tests!
LGTM

@ErwanAliasr1 ErwanAliasr1 merged commit 1dc0c27 into main Oct 28, 2024
4 checks passed
@anisse anisse deleted the issue34 branch January 13, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using the example "mini" config: IndexError: index 0 is out of bounds for axis 0 with size 0
2 participants