Merge pull request #3 from medios-porosos-fiuba/milestone_4
Milestone 4 - Part 1milestone_5_without_improvements
commit
96db89d10c
@ -0,0 +1,44 @@
|
|||||||
|
[General]
|
||||||
|
simDir=tests/performance/tmp_gen_output
|
||||||
|
startJob=0
|
||||||
|
[Iterables]
|
||||||
|
p=[10,39,10]
|
||||||
|
seeds=[5462,2]
|
||||||
|
lc=[4]
|
||||||
|
connectivity=[1]
|
||||||
|
variances=[1]
|
||||||
|
|
||||||
|
[Generation]
|
||||||
|
Nx = 64
|
||||||
|
Ny = 64
|
||||||
|
Nz = 64
|
||||||
|
variogram_type=1
|
||||||
|
binary = yes
|
||||||
|
kh = 100
|
||||||
|
kl = 0.01
|
||||||
|
compute_lc = no
|
||||||
|
lcBin=no
|
||||||
|
genera=no
|
||||||
|
|
||||||
|
|
||||||
|
[Connectivity]
|
||||||
|
keep_aspect= yes
|
||||||
|
block_size = 4
|
||||||
|
indicators_MinBlockSize =4
|
||||||
|
Max_sample_size = 12
|
||||||
|
compGconec= 1
|
||||||
|
conec=yes
|
||||||
|
|
||||||
|
|
||||||
|
[Solver]
|
||||||
|
num_of_cores = 1
|
||||||
|
ref = 2
|
||||||
|
solve = no
|
||||||
|
rtol = 1e-4
|
||||||
|
|
||||||
|
[K-Postprocess]
|
||||||
|
MinBlockSize =1
|
||||||
|
Max_sample_size = 4
|
||||||
|
kperm=no
|
||||||
|
postprocess=no
|
||||||
|
SaveVfield=no
|
@ -0,0 +1,44 @@
|
|||||||
|
[General]
|
||||||
|
simDir=tests/performance/tmp_gen_output
|
||||||
|
startJob=0
|
||||||
|
[Iterables]
|
||||||
|
p=[10,39,10]
|
||||||
|
seeds=[5462,2]
|
||||||
|
lc=[4]
|
||||||
|
connectivity=[1]
|
||||||
|
variances=[1]
|
||||||
|
|
||||||
|
[Generation]
|
||||||
|
Nx = 128
|
||||||
|
Ny = 128
|
||||||
|
Nz = 128
|
||||||
|
variogram_type=1
|
||||||
|
binary = yes
|
||||||
|
kh = 100
|
||||||
|
kl = 0.01
|
||||||
|
compute_lc = yes
|
||||||
|
lcBin=yes
|
||||||
|
genera=yes
|
||||||
|
|
||||||
|
|
||||||
|
[Connectivity]
|
||||||
|
keep_aspect= no
|
||||||
|
block_size = 4
|
||||||
|
indicators_MinBlockSize =4
|
||||||
|
Max_sample_size = 12
|
||||||
|
compGconec= 1
|
||||||
|
conec=no
|
||||||
|
|
||||||
|
|
||||||
|
[Solver]
|
||||||
|
num_of_cores = 1
|
||||||
|
ref = 2
|
||||||
|
solve = no
|
||||||
|
rtol = 1e-4
|
||||||
|
|
||||||
|
[K-Postprocess]
|
||||||
|
MinBlockSize =1
|
||||||
|
Max_sample_size = 4
|
||||||
|
kperm=no
|
||||||
|
postprocess=no
|
||||||
|
SaveVfield=no
|
@ -0,0 +1,44 @@
|
|||||||
|
[General]
|
||||||
|
simDir=tests/performance/tmp_gen_output
|
||||||
|
startJob=0
|
||||||
|
[Iterables]
|
||||||
|
p=[10,39,10]
|
||||||
|
seeds=[5462,2]
|
||||||
|
lc=[4]
|
||||||
|
connectivity=[1]
|
||||||
|
variances=[1]
|
||||||
|
|
||||||
|
[Generation]
|
||||||
|
Nx = 256
|
||||||
|
Ny = 256
|
||||||
|
Nz = 256
|
||||||
|
variogram_type=1
|
||||||
|
binary = yes
|
||||||
|
kh = 100
|
||||||
|
kl = 0.01
|
||||||
|
compute_lc = yes
|
||||||
|
lcBin=yes
|
||||||
|
genera=yes
|
||||||
|
|
||||||
|
|
||||||
|
[Connectivity]
|
||||||
|
keep_aspect= no
|
||||||
|
block_size = 4
|
||||||
|
indicators_MinBlockSize =4
|
||||||
|
Max_sample_size = 12
|
||||||
|
compGconec= 1
|
||||||
|
conec=no
|
||||||
|
|
||||||
|
|
||||||
|
[Solver]
|
||||||
|
num_of_cores = 1
|
||||||
|
ref = 2
|
||||||
|
solve = no
|
||||||
|
rtol = 1e-4
|
||||||
|
|
||||||
|
[K-Postprocess]
|
||||||
|
MinBlockSize =1
|
||||||
|
Max_sample_size = 4
|
||||||
|
kperm=no
|
||||||
|
postprocess=no
|
||||||
|
SaveVfield=no
|
@ -0,0 +1,44 @@
|
|||||||
|
[General]
|
||||||
|
simDir=tests/performance/tmp_gen_output
|
||||||
|
startJob=0
|
||||||
|
[Iterables]
|
||||||
|
p=[10,39,10]
|
||||||
|
seeds=[5462,2]
|
||||||
|
lc=[4]
|
||||||
|
connectivity=[1]
|
||||||
|
variances=[1]
|
||||||
|
|
||||||
|
[Generation]
|
||||||
|
Nx = 512
|
||||||
|
Ny = 512
|
||||||
|
Nz = 512
|
||||||
|
variogram_type=1
|
||||||
|
binary = yes
|
||||||
|
kh = 100
|
||||||
|
kl = 0.01
|
||||||
|
compute_lc = yes
|
||||||
|
lcBin=yes
|
||||||
|
genera=yes
|
||||||
|
|
||||||
|
|
||||||
|
[Connectivity]
|
||||||
|
keep_aspect= no
|
||||||
|
block_size = 4
|
||||||
|
indicators_MinBlockSize =4
|
||||||
|
Max_sample_size = 12
|
||||||
|
compGconec= 1
|
||||||
|
conec=no
|
||||||
|
|
||||||
|
|
||||||
|
[Solver]
|
||||||
|
num_of_cores = 1
|
||||||
|
ref = 2
|
||||||
|
solve = no
|
||||||
|
rtol = 1e-4
|
||||||
|
|
||||||
|
[K-Postprocess]
|
||||||
|
MinBlockSize =1
|
||||||
|
Max_sample_size = 4
|
||||||
|
kperm=no
|
||||||
|
postprocess=no
|
||||||
|
SaveVfield=no
|
@ -0,0 +1,44 @@
|
|||||||
|
[General]
|
||||||
|
simDir=tests/performance/tmp_gen_output
|
||||||
|
startJob=0
|
||||||
|
[Iterables]
|
||||||
|
p=[10,39,10]
|
||||||
|
seeds=[5462,2]
|
||||||
|
lc=[4]
|
||||||
|
connectivity=[1]
|
||||||
|
variances=[1]
|
||||||
|
|
||||||
|
[Generation]
|
||||||
|
Nx = 64
|
||||||
|
Ny = 64
|
||||||
|
Nz = 64
|
||||||
|
variogram_type=1
|
||||||
|
binary = yes
|
||||||
|
kh = 100
|
||||||
|
kl = 0.01
|
||||||
|
compute_lc = yes
|
||||||
|
lcBin=yes
|
||||||
|
genera=yes
|
||||||
|
|
||||||
|
|
||||||
|
[Connectivity]
|
||||||
|
keep_aspect= no
|
||||||
|
block_size = 4
|
||||||
|
indicators_MinBlockSize =4
|
||||||
|
Max_sample_size = 12
|
||||||
|
compGconec= 1
|
||||||
|
conec=no
|
||||||
|
|
||||||
|
|
||||||
|
[Solver]
|
||||||
|
num_of_cores = 1
|
||||||
|
ref = 2
|
||||||
|
solve = no
|
||||||
|
rtol = 1e-4
|
||||||
|
|
||||||
|
[K-Postprocess]
|
||||||
|
MinBlockSize =1
|
||||||
|
Max_sample_size = 4
|
||||||
|
kperm=no
|
||||||
|
postprocess=no
|
||||||
|
SaveVfield=no
|
@ -0,0 +1,57 @@
|
|||||||
|
import os
|
||||||
|
from benchmarker import Benchmarker
|
||||||
|
|
||||||
|
os.chdir('../..')
|
||||||
|
|
||||||
|
config_gen_file_64 = os.path.abspath("./tests/performance/conf_gen_64.ini")
|
||||||
|
config_conn_file_64 = os.path.abspath("./tests/performance/conf_conn_64.ini")
|
||||||
|
|
||||||
|
GEN_CONFIG_FILES = [config_gen_file_64]
|
||||||
|
CONN_CONFIG_FILES = [config_conn_file_64]
|
||||||
|
|
||||||
|
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)):
|
||||||
|
size = 2**(6+i)
|
||||||
|
|
||||||
|
@bench(f"Connectivity 1 core with size {size}")
|
||||||
|
def _(bm):
|
||||||
|
global index_1
|
||||||
|
os.system(f"CONFIG_FILE_PATH={GEN_CONFIG_FILES[index_1]} TEST=True mpirun -oversubscribe -np 1 python3 mpirunner.py")
|
||||||
|
with bm:
|
||||||
|
os.system(f"CONFIG_FILE_PATH={CONN_CONFIG_FILES[index_1]} TEST=True mpirun -oversubscribe -np 1 python3 mpirunner.py")
|
||||||
|
|
||||||
|
## teardown
|
||||||
|
os.system("rm -rf ./tests/performance/tmp_gen_output")
|
||||||
|
index_1 +=1
|
||||||
|
|
||||||
|
@bench(f"Connectivity 8 core with size {size}")
|
||||||
|
def _(bm):
|
||||||
|
global index_8
|
||||||
|
os.system(f"CONFIG_FILE_PATH={GEN_CONFIG_FILES[index_8]} TEST=True mpirun -oversubscribe -np 8 python3 mpirunner.py")
|
||||||
|
with bm:
|
||||||
|
os.system(f"CONFIG_FILE_PATH={CONN_CONFIG_FILES[index_8]} TEST=True mpirun -oversubscribe -np 8 python3 mpirunner.py")
|
||||||
|
|
||||||
|
## teardown
|
||||||
|
os.system("rm -rf ./tests/performance/tmp_gen_output")
|
||||||
|
index_8 +=1
|
||||||
|
|
@ -0,0 +1,43 @@
|
|||||||
|
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
|
@ -0,0 +1,7 @@
|
|||||||
|
def conditional_decorator(dec, condition):
|
||||||
|
def decorator(func):
|
||||||
|
if not condition:
|
||||||
|
# Return the function unchanged, not decorated.
|
||||||
|
return func
|
||||||
|
return dec(func)
|
||||||
|
return decorator
|
Loading…
Reference in New Issue