浏览代码

starpupy: do not show plot by default

(cherry picked from commit f2bd2f317d4f354270262924bd88643b36e55db6)
Nathalie Furmento 4 年之前
父节点
当前提交
ef9d5c84de
共有 2 个文件被更改,包括 7 次插入6 次删除
  1. 5 4
      starpupy/src/starpu/intermedia.py
  2. 2 2
      starpupy/tests/starpu_py_parallel.py

+ 5 - 4
starpupy/src/starpu/intermedia.py

@@ -54,9 +54,10 @@ def task_submit(*, name=None, synchronous=0, priority=0, color=None, flops=None,
 	return call_task_submit
 
 # dump performance model and show the plot
-def perfmodel_plot(perfmodel):
+def perfmodel_plot(perfmodel, view=False):
 	p=dict_perf[perfmodel]
 	starpupy.save_history_based_model(p.get_struct())
-	os.system('starpu_perfmodel_plot -s "' + perfmodel +'"')
-	os.system('gnuplot starpu_'+perfmodel+'.gp')
-	os.system('gv starpu_'+perfmodel+'.eps')
+	if view == True:
+		os.system('starpu_perfmodel_plot -s "' + perfmodel +'"')
+		os.system('gnuplot starpu_'+perfmodel+'.gp')
+		os.system('gv starpu_'+perfmodel+'.eps')

+ 2 - 2
starpupy/tests/starpu_py_parallel.py

@@ -96,6 +96,6 @@ async def main():
 	#print(res3)
 asyncio.run(main())
 
-starpu.perfmodel_plot(perfmodel="first")
+starpu.perfmodel_plot(perfmodel="first")#,view=True
 starpu.perfmodel_plot(perfmodel="second")
-starpu.perfmodel_plot(perfmodel="third")
+starpu.perfmodel_plot(perfmodel="third")