You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
import os
|
|
from benchmarker import Benchmarker
|
|
|
|
os.chdir('../..')
|
|
|
|
config_file_64 = os.path.abspath("./tests/performance/conf_gen_64.ini")
|
|
|
|
config_file_128 = os.path.abspath("./tests/performance/conf_gen_128.ini")
|
|
|
|
config_file_256 = os.path.abspath("./tests/performance/conf_gen_256.ini")
|
|
|
|
CONFIG_FILES = [config_file_64, config_file_128, config_file_256]
|
|
|
|
index_1 = 0
|
|
|
|
index_8 = 0
|
|
|
|
with Benchmarker() as bench:
|
|
|
|
for i in range(len(CONFIG_FILES)):
|
|
size = 2**(6+i)
|
|
|
|
@bench(f"generation 1 core {size} tamaño")
|
|
def _(bm):
|
|
global index_1
|
|
config_file = CONFIG_FILES[index_1]
|
|
with bm:
|
|
os.system(f"CONFIG_FILE_PATH={config_file} TEST=True mpirun -oversubscribe -np 1 python3 mpirunner.py")
|
|
|
|
## teardown
|
|
os.system("rm -rf ./tests/performance/tmp_gen_output")
|
|
index_1 +=1
|
|
|
|
@bench(f"generation 8 core {size} tamaño")
|
|
def _(bm):
|
|
global index_8
|
|
config_file = CONFIG_FILES[index_8]
|
|
with bm:
|
|
os.system(f"CONFIG_FILE_PATH={config_file} TEST=True mpirun -oversubscribe -np 8 python3 mpirunner.py")
|
|
|
|
## teardown
|
|
os.system("rm -rf ./tests/performance/tmp_gen_output")
|
|
index_8 +=1 |