change fttma invocation

migrate_fortran
Oli 3 years ago
parent 10cb61d6a7
commit 1f613c87a8

1
.gitignore vendored

@ -10,6 +10,7 @@ tools/__pycache__/
tools/generation/__pycache__/
output/
tests/integration/tmp_output/
tests/performance/tmp_gen_output/
output/
tests/integration/__pycache__/
fftma_module/gen/build/

@ -0,0 +1,44 @@
[General]
simDir=tests/performance/tmp_gen_output
startJob=0
[Iterables]
p=[10,39,15]
seeds=[5462,2]
lc=[4]
connectivity=[1,2,3]
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

@ -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, config_file_128, config_file_256, config_file_512]
with Benchmarker() as bench:

@ -8,6 +8,7 @@ from tools.postprocessK.comp_PostKeff import comp_postKeff
from shutil import copyfile
from tools.solver.comp_Kperm_scale import comp_kperm_sub
from tools.solver.Ndar import PetscP
from tools.generation.fftma_gen import fftmaGenerator
CONFIG_FILE_PATH = 'config.ini' if 'CONFIG_FILE_PATH' not in os.environ else os.environ['CONFIG_FILE_PATH']
@ -33,8 +34,8 @@ def realization(job):
genera=parser.get('Generation',"genera")
if genera!='no':
os.system('CONFIG_FILE_PATH=' + CONFIG_FILE_PATH + ' python3 ./tools/generation/fftma_gen.py ' + datadir +' ' + str(job))
fftmaGenerator(datadir, job, CONFIG_FILE_PATH)
#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]

@ -3,15 +3,15 @@ from scipy.special import erf, erfinv
from scipy.optimize import curve_fit
from scipy.stats import norm
from FFTMA import gen
from config import DotheLoop, get_config
from variograma import get_lc
from tools.generation.config import DotheLoop, get_config
from tools.generation.variograma import get_lc
from scipy.interpolate import interp1d
import sys
import time
import os
from memory_profiler import profile
#from memory_profiler import profile
# @profile
#@profile
def fftmaGenerator(datadir,job,conffile):
t0=time.time()
@ -154,6 +154,6 @@ def binarize(kc,kh,kl,p):
kc=np.where(kc<t1, kl,kh)
return kc
CONFIG_FILE_PATH = 'config.ini' if 'CONFIG_FILE_PATH' not in os.environ else os.environ['CONFIG_FILE_PATH']
#CONFIG_FILE_PATH = 'config.ini' if 'CONFIG_FILE_PATH' not in os.environ else os.environ['CONFIG_FILE_PATH']
fftmaGenerator(sys.argv[1],int(sys.argv[2]),CONFIG_FILE_PATH)
#fftmaGenerator(sys.argv[1],int(sys.argv[2]),CONFIG_FILE_PATH)

Loading…
Cancel
Save