Commit cbda51ec authored by Frederik Hennig's avatar Frederik Hennig
Browse files

Fixed cylinder param file

parent bccf0a06
Pipeline #34245 failed with stages
in 12 minutes and 26 seconds
......@@ -19,7 +19,7 @@ class FlowAroundCylinderScenario:
refinementRadii=(0,0,0), refinementTailLengths=(0,0,0),
useUniformPackInfo=False,
runs=10, steps_per_run=1000, outputFrequency=0,
db_file='benchmark.sqlite', vtkOutputFolder='vtk_out'):
db_file='benchmark.sqlite', db_table='runs', vtkOutputFolder='vtk_out'):
dx_coarsest = cylinderRadius / cylinderRadius_coarsest_LU
totalCells_coarsest = tuple(safe_int(ds / dx_coarsest) for ds in domainSize)
......@@ -31,6 +31,7 @@ class FlowAroundCylinderScenario:
omega_shear = relaxation_rate_from_lattice_viscosity(lattice_viscosity)
self.db_file = db_file
self.db_table = db_table
self.params = {
'domainSize': domainSize,
......@@ -103,8 +104,8 @@ class FlowAroundCylinderScenario:
# check multiple times e.g. may fail when multiple benchmark processes are running
for num_try in range(num_tries):
try:
checkAndUpdateSchema(result, "runs", self.db_file)
storeSingle(result, "runs", self.db_file)
checkAndUpdateSchema(result, self.db_table, self.db_file)
storeSingle(result, self.db_table, self.db_file)
break
except sqlite3.OperationalError as e:
wlb.log_warning("Sqlite DB writing failed: try {}/{} {}".format(num_try + 1, num_tries, str(e)))
......@@ -132,11 +133,13 @@ def run_flow_around_cylinder(db_file):
))
def run_flow_around_cylinder_emmy(db_file):
def run_flow_around_cylinder_emmy():
manager = wlb.ScenarioManager()
cylinderRadiusCoarseLU = 64
ppn = os.environ['PROCESSES_PER_NODE']
refinementSetups = [
{'refinementProfile': 'refineEverywhere',
'refinementDepth': 0,
......@@ -152,7 +155,7 @@ def run_flow_around_cylinder_emmy(db_file):
for cells_per_block in [64, 32, 16, 8]:
for i, setup in enumerate(refinementSetups):
output = f"CylinderOutput_{cells_per_block}_{i}"
output = f"CylinderOutput_{ppn}ppn_{cells_per_block}cells_{i}"
manager.add(FlowAroundCylinderScenario(
domainSize=(18, 8, 1),
......@@ -164,7 +167,8 @@ def run_flow_around_cylinder_emmy(db_file):
reynoldsNumber=100,
walls=False,
runs=10, steps_per_run=10, outputFrequency=0,
db_file=db_file,
db_file=f"CylinderBenchmark.sqlite",
db_table=f"setup{i}",
vtkOutputFolder=output,
**setup
))
......@@ -179,6 +183,6 @@ if __name__ == '__main__':
for num_nodes in [64]:
filename = f'{scripts_dir}/flowAroundCylinderBM_{num_nodes}nodes.sh'
with open(filename, 'w') as shfile:
shfile.write(get_script_d3q19_esotwist_True(num_nodes, [1, 5, 10], scenario_script, walltime="08:00:00"))
shfile.write(get_script_d3q19_esotwist_True(num_nodes, [1, 5, 10], scenario_script, walltime="03:00:00"))
else:
run_flow_around_cylinder_emmy('FlowAroundCylinderScalingBenchmarkEmmy.sqlite')
run_flow_around_cylinder_emmy()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment