Skip to content
Snippets Groups Projects
Commit aba2d522 authored by Laura Lindner's avatar Laura Lindner
Browse files

added runskript benchmark

parent a6e6f88d
No related branches found
No related tags found
1 merge request!273fixed hopefully problem with computing displacement by depending mechassamble...
import sys
sys.path.append('../../')
import os
import shutil
import mpp.python.mppy as mppy
lList = [0,1,2,3]
tList = [0,1,2,3]
#start_dt=0.0001
start_dt=0.0004
path='../../../data/Cuboid/'
pathToMakeFolders=path #'../'+path
def moveActivationtime(l,j, expPath,moveVtu=False):
shutil.move('../../build/data/AT_l'+str(l)+'j'+str(j)+'.txt', pathToMakeFolders+expPath+'AT_l'+str(l)+'j'+str(j)+'.txt')
if moveVtu:
shutil.move('../../build/data/vtu/ActivationTime.vtu', pathToMakeFolders+expPath+'AT_l'+str(l)+'j'+str(j)+'.vtu')
def startExperiment(procs,startconf,pE,added=None,moveVTU=False):
checkIfFolderExists(pE)
mpp = mppy.Mpp(project_name='CardMech',executable='Elphy-M++',kernels=4,mute=False)
for l in lList:
for j in tList:
file = path+pE+'log_l'+str(l)+'j'+str(j)+'m1'
kwargs={"ElphyProblem":"ElphyBenchmarkNiederer","ElphyLevel": l,"DeltaTime":start_dt*2**(-j),"logfile":file,"EndTime":0.3,"ElphyVTK":0,"ElphyTimeLevel":j}
if added!=None:
kwargs.update(added)
mpp.run(procs, config=startconf, kwargs=kwargs) #replace 64 by hosts if necessary
moveActivationtime(l,j,pE,moveVTU)
def checkIfFolderExists(path):
folderPath =pathToMakeFolders+path
if not os.path.exists(folderPath):
os.makedirs(folderPath)
if __name__=="__main__":
procs=64
startconf="electrophysiology/testCellEvaluation"
moveVTU=True
#test original
pathExperiment="SI0004/"
startExperiment(procs,startconf,pathExperiment,{'EndTime':0.16,"ParallelPlotting":False,"Compression":"ascii"},moveVTU)
pathExperiment="SIOC0004/"
startExperiment(procs,startconf,pathExperiment,{"ElphyModel":"SemiImplicitOnCells",'EndTime':0.16,"ParallelPlotting":False,"Compression":"ascii"},moveVTU)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment