From 17cb088c42509ada75801e0048abd7808660ea14 Mon Sep 17 00:00:00 2001 From: chortas Date: Sun, 28 Nov 2021 17:13:19 -0300 Subject: [PATCH] Fixing conflicts --- tests/performance/conf_conn_256.ini | 6 +++--- tests/performance/conf_conn_64.ini | 2 +- tests/performance/connectivity.py | 20 +++++++++++++++----- tests/performance/generation.py | 8 +++++--- tools/Prealization.py | 2 +- tools/connec/comp_cmap.py | 2 +- 6 files changed, 26 insertions(+), 14 deletions(-) diff --git a/tests/performance/conf_conn_256.ini b/tests/performance/conf_conn_256.ini index f1a4233..6679457 100644 --- a/tests/performance/conf_conn_256.ini +++ b/tests/performance/conf_conn_256.ini @@ -9,9 +9,9 @@ connectivity=[1,2,3] variances=[1] [Generation] -Nx = 128 -Ny = 128 -Nz = 128 +Nx = 256 +Ny = 256 +Nz = 256 variogram_type=1 binary = no kh = 100 diff --git a/tests/performance/conf_conn_64.ini b/tests/performance/conf_conn_64.ini index f3ce2c5..4a5c9c8 100644 --- a/tests/performance/conf_conn_64.ini +++ b/tests/performance/conf_conn_64.ini @@ -13,7 +13,7 @@ Nx = 64 Ny = 64 Nz = 64 variogram_type=1 -binary = no +binary = yes kh = 100 kl = 0.01 compute_lc = no diff --git a/tests/performance/connectivity.py b/tests/performance/connectivity.py index 4f3ca8e..29110a6 100644 --- a/tests/performance/connectivity.py +++ b/tests/performance/connectivity.py @@ -4,12 +4,7 @@ from benchmarker import Benchmarker os.chdir('../..') config_gen_file_64 = os.path.abspath("./tests/performance/conf_gen_64.ini") -config_gen_file_128 = os.path.abspath("./tests/performance/conf_gen_128.ini") -config_gen_file_256 = os.path.abspath("./tests/performance/conf_gen_256.ini") - config_conn_file_64 = os.path.abspath("./tests/performance/conf_conn_64.ini") -config_conn_file_128 = os.path.abspath("./tests/performance/conf_conn_128.ini") -config_conn_file_256 = os.path.abspath("./tests/performance/conf_conn_256.ini") GEN_CONFIG_FILES = [config_gen_file_64] CONN_CONFIG_FILES = [config_conn_file_64] @@ -18,6 +13,21 @@ index_1 = 0 index_8 = 0 +''' +Esta etapa tarda mucho tiempo y no es muy independiente de la generación de medios. +Si se generan medios con los parámetros dados: +[Iterables] +p=[10,39,15] +seeds=[5462,2] +lc=[4] +connectivity=[1,2,3] +variances=[1] +Se generan 90 medios: 15 (p[2]) * 2 (seeds[1]) * 3 (len(connectivity)) * 1 (len(lc)) +Pero si se toman esos medios generados y se aplica solo la etapa de conectividad +Se calcula la conectividad sobre 6 medios: 2 (seeds[1]) * 3 (len(connectivity)) * 1 (len(variances))* 1 (len(lc)) +Solucion: marcar en la etapa de generacion binary = yes -> esta bien esto? +''' + with Benchmarker() as bench: for i in range(len(CONN_CONFIG_FILES)): diff --git a/tests/performance/generation.py b/tests/performance/generation.py index 76cfbab..a2103e7 100644 --- a/tests/performance/generation.py +++ b/tests/performance/generation.py @@ -9,7 +9,9 @@ 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] +config_file_512 = os.path.abspath("./tests/performance/conf_gen_512.ini") + +CONFIG_FILES = [config_file_64] index_1 = 0 @@ -28,7 +30,7 @@ with Benchmarker() as bench: os.system("CONFIG_FILE_PATH="+ config_file + " mpirun -oversubscribe -np 1 python3 -m memory_profiler mpirunner.py") ## teardown - os.system("rm -rf ./tests/performance/tmp_gen_output") + # os.system("rm -rf ./tests/performance/tmp_gen_output") index_1 +=1 @bench(f"generation 8 core {size} tamaño") @@ -39,5 +41,5 @@ with Benchmarker() as bench: os.system("CONFIG_FILE_PATH="+ config_file + " mpirun -oversubscribe -np 8 python3 -m memory_profiler mpirunner.py") ## teardown - os.system("rm -rf ./tests/performance/tmp_gen_output") + # os.system("rm -rf ./tests/performance/tmp_gen_output") index_8 +=1 \ No newline at end of file diff --git a/tools/Prealization.py b/tools/Prealization.py index 099ca32..f2bb0cc 100755 --- a/tools/Prealization.py +++ b/tools/Prealization.py @@ -38,9 +38,9 @@ def realization(job): #os.system('CONFIG_FILE_PATH=' + CONFIG_FILE_PATH + ' python3 ./tools/generation/fftma_gen.py ' + datadir +' ' + str(job)) nr= DotheLoop(job,parser, iterables)[3] -iterables['seeds'][0] - Cconec=parser.get('Connectivity',"conec") if Cconec!='no': + print(f"Datadir is {datadir}") comp_connec(parser,datadir,nr) n_p=int(parser.get('Solver',"num_of_cores")) diff --git a/tools/connec/comp_cmap.py b/tools/connec/comp_cmap.py index 5f867b4..e6c8682 100755 --- a/tools/connec/comp_cmap.py +++ b/tools/connec/comp_cmap.py @@ -9,7 +9,7 @@ import json def comp_connec(parser,rundir,nr): - + print(f"Rundir is {rundir}") kc=np.load(rundir+'k.npy') keep_aspect = parser.get('Connectivity','keep_aspect') kh,sx = float(parser.get('Generation','kh')),int(parser.get('Connectivity','block_size'))