Skip to content

Commit 137db95

Browse files
committed
more updates and fix a race condition
1 parent 11d044e commit 137db95

4 files changed

Lines changed: 27 additions & 16 deletions

File tree

TestCases/hybrid_regression_AD.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def main():
231231
pywrapper_FEA_AD_FlowLoad.cfg_file = "configAD_fem.cfg"
232232
pywrapper_FEA_AD_FlowLoad.test_iter = 100
233233
pywrapper_FEA_AD_FlowLoad.test_vals = [-0.131742, -0.553318, -0.000364, -0.003101] #last 4 columns
234-
pywrapper_FEA_AD_FlowLoad.test_vals_aarch64 = [-0.132166, -0.554904, -0.000364, -0.003101]
234+
pywrapper_FEA_AD_FlowLoad.test_vals_aarch64 = [-0.131745, -0.553214, -0.000364, -0.003101]
235235
pywrapper_FEA_AD_FlowLoad.command = TestCase.Command(exec = "python", param = "run_adjoint.py --parallel -f")
236236
pywrapper_FEA_AD_FlowLoad.timeout = 1600
237237
pywrapper_FEA_AD_FlowLoad.tol = 1e-4

TestCases/parallel_regression.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def main():
245245
polar_naca0012.polar = True
246246
polar_naca0012.test_iter = 10
247247
polar_naca0012.test_vals = [-1.217981, 4.256386, 0.009084, 0.016823]
248-
polar_naca0012.test_vals_aarch64 = [-6.491535, -1.076111, 0.001168, 0.008666]
248+
polar_naca0012.test_vals_aarch64 = [-1.718925, 3.711429, 0.009217, 0.007784]
249249
polar_naca0012.command = TestCase.Command(exec = "compute_polar.py", param = "-i 11")
250250
test_list.append(polar_naca0012)
251251

@@ -999,24 +999,26 @@ def main():
999999
coolprop_fluidModel.cfg_file = "fluidModel.cfg"
10001000
coolprop_fluidModel.test_iter = 5
10011001
coolprop_fluidModel.test_vals = [-4.525459, -1.578697, 3.443116, 0.000000, 0.000000]
1002+
coolprop_fluidModel.enabled_on_cpu_arch = ["x86_64"]
10021003
test_list.append(coolprop_fluidModel)
10031004

1004-
# Rarefaction Q1D nozzle, include CoolProp fluid model
1005-
datadriven_fluidModel = TestCase('datadriven_fluidModel')
1006-
datadriven_fluidModel.cfg_dir = "nicf/datadriven"
1007-
datadriven_fluidModel.cfg_file = "datadriven_nozzle.cfg"
1008-
datadriven_fluidModel.test_iter = 50
1009-
datadriven_fluidModel.test_vals = [-2.623890, 0.145236, 4.688439, 0.000000, 0.000000]
1010-
test_list.append(datadriven_fluidModel)
1011-
10121005
# Rarefaction Q1D nozzle, include CoolProp transport model
10131006
coolprop_transportModel = TestCase('coolprop_transportModel')
10141007
coolprop_transportModel.cfg_dir = "nicf/coolprop"
10151008
coolprop_transportModel.cfg_file = "transportModel.cfg"
10161009
coolprop_transportModel.test_iter = 5
10171010
coolprop_transportModel.test_vals = [-4.527922, -1.308648, 4.630717, 0.000000, 0.000000]
1011+
coolprop_transportModel.enabled_on_cpu_arch = ["x86_64"]
10181012
test_list.append(coolprop_transportModel)
10191013

1014+
# Rarefaction Q1D nozzle, include data-driven fluid model
1015+
datadriven_fluidModel = TestCase('datadriven_fluidModel')
1016+
datadriven_fluidModel.cfg_dir = "nicf/datadriven"
1017+
datadriven_fluidModel.cfg_file = "datadriven_nozzle.cfg"
1018+
datadriven_fluidModel.test_iter = 50
1019+
datadriven_fluidModel.test_vals = [-2.623890, 0.145236, 4.688439, 0.000000, 0.000000]
1020+
test_list.append(datadriven_fluidModel)
1021+
10201022
######################################
10211023
### Turbomachinery ###
10221024
######################################
@@ -1228,7 +1230,7 @@ def main():
12281230
solid_periodic_pins.cfg_file = "configSolid.cfg"
12291231
solid_periodic_pins.test_iter = 750
12301232
solid_periodic_pins.test_vals = [-15.878977, -14.569206, 300.900000, 425.320000, 0.000000, 5.000000, -1.672737]
1231-
solid_periodic_pins.test_vals_aarch64 = [-15.879010, -14.569206, 300.900000, 425.320000, 0.000000, 5.000000, -1.672630] #last 7 lines
1233+
solid_periodic_pins.test_vals_aarch64 = [-15.879016, -14.569206, 300.900000, 425.320000, 0.000000, 5.000000, -1.672666]
12321234
test_list.append(solid_periodic_pins)
12331235

12341236
# ###############################
@@ -1291,6 +1293,7 @@ def main():
12911293
pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
12921294
pywrapper_turb_naca0012_sst.test_iter = 10
12931295
pywrapper_turb_naca0012_sst.test_vals = [-12.219694, -14.440925, -7.107551, 1.050109, 0.019148, -1.601287, -38.510000]
1296+
pywrapper_turb_naca0012_sst.test_vals_aarch64 = [-12.219735, -14.440925, -7.107550, 1.050109, 0.019148, -1.601262, -38.510000]
12941297
pywrapper_turb_naca0012_sst.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f")
12951298
pywrapper_turb_naca0012_sst.timeout = 3200
12961299
test_list.append(pywrapper_turb_naca0012_sst)
@@ -1301,6 +1304,7 @@ def main():
13011304
pywrapper_square_cylinder.cfg_file = "turb_square.cfg"
13021305
pywrapper_square_cylinder.test_iter = 10
13031306
pywrapper_square_cylinder.test_vals = [-1.175619, -0.352238, 1.408450, 2.360729, 1.404693, 2.302284, -0.347980]
1307+
pywrapper_square_cylinder.test_vals_aarch64 = [-1.175617, -0.352079, 1.408450, 2.360729, 1.404693, 2.302284, -0.347980]
13041308
pywrapper_square_cylinder.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f")
13051309
pywrapper_square_cylinder.unsteady = True
13061310
test_list.append(pywrapper_square_cylinder)
@@ -1321,6 +1325,7 @@ def main():
13211325
pywrapper_custom_fea_load.cfg_file = "config.cfg"
13221326
pywrapper_custom_fea_load.test_iter = 13
13231327
pywrapper_custom_fea_load.test_vals = [-7.263559, -4.946814, -14.165142, 34.000000, -6.380144, 320.580000]
1328+
pywrapper_custom_fea_load.test_vals_aarch64 = [-7.263558, -4.946814, -14.165142, 35.000000, -6.802790, 320.580000]
13241329
pywrapper_custom_fea_load.command = TestCase.Command("mpirun -np 2", "python", "run.py")
13251330
test_list.append(pywrapper_custom_fea_load)
13261331

TestCases/py_wrapper/wavy_wall/run_steady.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,12 @@ def RunPrimal(channel_width, deform_amplitude):
143143
Returns the objective function.
144144
"""
145145
comm = MPI.COMM_WORLD
146+
rank = comm.Get_rank()
146147

147-
with open('config.cfg', 'w') as f:
148-
f.write(common_settings.replace('__WIDTH__', str(channel_width)) + primal_settings)
148+
if rank == 0:
149+
with open('config.cfg', 'w') as f:
150+
f.write(common_settings.replace('__WIDTH__', str(channel_width)) + primal_settings)
151+
comm.Barrier()
149152

150153
# Initialize the corresponding driver of SU2, this includes solver preprocessing.
151154
try:
@@ -174,9 +177,12 @@ def RunAdjoint(channel_width, deform_amplitude):
174177
Returns the sensitivity of the objective function to the amplitude and width.
175178
"""
176179
comm = MPI.COMM_WORLD
180+
rank = comm.Get_rank()
177181

178-
with open('config_ad.cfg', 'w') as f:
179-
f.write(common_settings.replace('__WIDTH__', str(channel_width)) + adjoint_settings)
182+
if rank == 0:
183+
with open('config_ad.cfg', 'w') as f:
184+
f.write(common_settings.replace('__WIDTH__', str(channel_width)) + adjoint_settings)
185+
comm.Barrier()
180186

181187
# Initialize the corresponding driver of SU2, this includes solver preprocessing.
182188
try:

TestCases/serial_regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def main():
133133
polar_naca0012.polar = True
134134
polar_naca0012.test_iter = 10
135135
polar_naca0012.test_vals = [-1.243326, 4.224483, 0.016432, 0.016145]
136-
polar_naca0012.test_vals_aarch64 = [-3.538211, 1.882519, 0.002450, 0.008663]
136+
polar_naca0012.test_vals_aarch64 = [-1.811046, 3.612379, 0.012330, 0.009194]
137137
polar_naca0012.command = TestCase.Command(exec = "compute_polar.py", param = "-n 1 -i 11")
138138
test_list.append(polar_naca0012)
139139

0 commit comments

Comments
 (0)