import data import model import korali k = korali.Engine() e = korali.Experiment() # Defining Concurrent Jobs popSize = 512 if (len(sys.argv) > 1): popSize = int(sys.argv[1]) # Setting up the reference likelihood for the Bayesian Problem e["Problem"]["Type"] = "Bayesian/Reference" e["Problem"]["Likelihood Model"] = "Normal" e["Problem"]["Reference Data"] = data.getReferenceData().tolist() e["Problem"]["Computational Model"] = lambda koraliData: model.evaluate( koraliData, data.getReferencePoints(), korali.getMPIComm() ) e["Distributions"][0]["Name"] = "Uniform 0" e["Distributions"][0]["Type"] = "Univariate/Uniform" e["Distributions"][0]["Minimum"] = 0.2 e["Distributions"][0]["Maximum"] = 0.6 e["Distributions"][1]["Name"] = "Uniform 1" e["Distributions"][1]["Type"] = "Univariate/Uniform" e["Distributions"][1]["Minimum"] = 10.0 e["Distributions"][1]["Maximum"] = 40.0 e["Distributions"][2]["Name"] = "Uniform 2" e["Distributions"][2]["Type"] = "Univariate/Uniform" e["Distributions"][2]["Minimum"] = 1e-5 e["Distributions"][2]["Maximum"] = 2.0
e["Variables"][0]["Prior Distribution"] = "Uniform 0" e["Variables"][0]["Initial Value"] = 16000 e["Variables"][0]["Initial Standard Deviation"] = 7200 e["Variables"][1]["Name"] = "[Sigma]" e["Variables"][1]["Prior Distribution"] = "Uniform 1" e["Variables"][1]["Initial Value"] = 0.5 e["Variables"][1]["Initial Standard Deviation"] = 0.66 # General Settings e["Console Output"]["Verbosity"] = "Detailed" e["File Output"]["Path"] = resFolder e["Store Sample Information"] = True # Loading previous results, if they exist. found = e.loadState(resFolder + '/latest') # Setting Model after loading previous results to prevent bad function pointer e["Problem"]["Computational Model"] = lambda sample: relaxModel( sample, refPoints, expName, expTend, ini_mesh_fname, korali.getMPIComm()) # Configuring Linked (Distributed) Conduit k = korali.Engine() k["Conduit"]["Type"] = "Distributed" k["Conduit"]["Workers Per Team"] = 2 k["Profiling"]["Detail"] = "Full" k["Profiling"]["Path"] = profFile k["Profiling"]["Frequency"] = 60 k.run(e)
e["Variables"][1]["Prior Distribution"] = "Uniform 1" e["Variables"][1]["Initial Value"] = 0.5 e["Variables"][1]["Initial Standard Deviation"] = 0.66 # General Settings e["Console Output"]["Verbosity"] = "Detailed" e["File Output"]["Path"] = resFolder e["Store Sample Information"] = True # Loading previous results, if they exist. e.loadState(resFolder + '/latest') eList.append(e) eList[0]["Problem"]["Computational Model"] = lambda sample: relaxModel( sample, getReferencePoints('hochmuth01'), 'hochmuth01', 0.4, './data/off_files/stretch_H1979_d01.off', korali.getMPIComm()) eList[1]["Problem"]["Computational Model"] = lambda sample: relaxModel( sample, getReferencePoints('hochmuth02'), 'hochmuth02', 0.4, './data/off_files/stretch_H1979_d02.off', korali.getMPIComm()) eList[2]["Problem"]["Computational Model"] = lambda sample: relaxModel( sample, getReferencePoints('hochmuth03'), 'hochmuth03', 0.4, './data/off_files/stretch_H1979_d03.off', korali.getMPIComm()) eList[3]["Problem"]["Computational Model"] = lambda sample: relaxModel( sample, getReferencePoints('hochmuth04'), 'hochmuth04', 0.4, './data/off_files/stretch_H1979_d04.off', korali.getMPIComm()) eList[4]["Problem"]["Computational Model"] = lambda sample: relaxModel( sample, getReferencePoints('henon'), 'henon', 0.4, './data/off_files/stretch_Hen1999_d01.off', korali.getMPIComm()) # Configuring Linked (Distributed) Conduit k = korali.Engine()
import model import korali k = korali.Engine() e = korali.Experiment() # Defining Concurrent Jobs popSize = 512 if (len(sys.argv) > 1): popSize = int(sys.argv[1]) # Setting up the reference likelihood for the Bayesian Problem e["Problem"]["Type"] = "Bayesian/Reference" e["Problem"]["Likelihood Model"] = "Normal" e["Problem"]["Reference Data"] = data.getReferenceData().tolist() e["Problem"]["Computational Model"] = lambda koraliData: model.evaluate( koraliData, data.getReferencePoints(), korali.getMPIComm()) e["Distributions"][0]["Name"] = "Uniform 0" e["Distributions"][0]["Type"] = "Univariate/Uniform" e["Distributions"][0]["Minimum"] = 0.2 e["Distributions"][0]["Maximum"] = 0.6 e["Distributions"][1]["Name"] = "Uniform 1" e["Distributions"][1]["Type"] = "Univariate/Uniform" e["Distributions"][1]["Minimum"] = 10.0 e["Distributions"][1]["Maximum"] = 40.0 e["Distributions"][2]["Name"] = "Uniform 2" e["Distributions"][2]["Type"] = "Univariate/Uniform" e["Distributions"][2]["Minimum"] = 1e-5 e["Distributions"][2]["Maximum"] = 2.0