Skip to content

Commit

Permalink
mpi fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarruscag committed Aug 10, 2024
1 parent a419d48 commit 905a24a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
7 changes: 5 additions & 2 deletions SU2_CFD/src/solvers/CSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3690,11 +3690,14 @@ void CSolver::LoadInletProfile(CGeometry **geometry,

/*--- There are no markers of this type. ---*/

if (columnNames.empty()) return;
const unsigned short has_names = !columnNames.empty();
unsigned short any_has_names;
SU2_MPI::Allreduce(&has_names, &any_has_names, 1, MPI_UNSIGNED_SHORT, MPI_MAX, SU2_MPI::GetComm());
if (!any_has_names) return;

/*--- Read the profile data from an ASCII file. ---*/

CMarkerProfileReaderFVM profileReader(geometry[MESH_0], config, profile_filename, KIND_MARKER, nCol_InletFile, columnNames,columnValues);
CMarkerProfileReaderFVM profileReader(geometry[MESH_0], config, profile_filename, KIND_MARKER, nCol_InletFile, columnNames, columnValues);

/*--- Load data from the restart into correct containers. ---*/

Expand Down
4 changes: 2 additions & 2 deletions TestCases/hybrid_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ def main():
poiseuille_profile.cfg_dir = "navierstokes/poiseuille"
poiseuille_profile.cfg_file = "profile_poiseuille.cfg"
poiseuille_profile.test_iter = 10
poiseuille_profile.test_vals = [-12.494728, -7.712546, -0.000000, 2.085796]
poiseuille_profile.test_vals_aarch64 = [-12.494717, -7.711274, -0.000000, 2.085796]
poiseuille_profile.test_vals = [-12.485957, -7.612048, -0.000000, 2.085796]
poiseuille_profile.test_vals_aarch64 = [-12.485957, -7.612048, -0.000000, 2.085796]
test_list.append(poiseuille_profile)

# 2D Rotational Periodic
Expand Down
6 changes: 3 additions & 3 deletions TestCases/parallel_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ def main():
poiseuille_profile.cfg_dir = "navierstokes/poiseuille"
poiseuille_profile.cfg_file = "profile_poiseuille.cfg"
poiseuille_profile.test_iter = 10
poiseuille_profile.test_vals = [-12.492939, -7.672950, -0.000000, 2.085796]
poiseuille_profile.test_vals_aarch64 = [-12.492864, -7.671632, -0.000000, 2.085796]
poiseuille_profile.test_vals = [-12.483967, -7.577331, -0.000000, 2.085796]
poiseuille_profile.test_vals_aarch64 = [-12.483967, -7.577331, -0.000000, 2.085796]
test_list.append(poiseuille_profile)

##########################
Expand Down Expand Up @@ -399,7 +399,7 @@ def main():
turb_flatplate_CC_Wilcox.test_iter = 20
turb_flatplate_CC_Wilcox.test_vals = [-1.280875, 1.974212, 1.440458, 5.038402, -4.051125, 8.521136]
test_list.append(turb_flatplate_CC_Wilcox)

# Flat plate SST compressibility correction Sarkar
turb_flatplate_CC_Sarkar = TestCase('turb_flatplate_CC_Sarkar')
turb_flatplate_CC_Sarkar.cfg_dir = "rans/flatplate"
Expand Down
4 changes: 2 additions & 2 deletions TestCases/serial_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ def main():
poiseuille_profile.cfg_dir = "navierstokes/poiseuille"
poiseuille_profile.cfg_file = "profile_poiseuille.cfg"
poiseuille_profile.test_iter = 10
poiseuille_profile.test_vals = [-12.494681, -7.711642, -0.000000, 2.085796]
poiseuille_profile.test_vals_aarch64 = [-12.494684, -7.711379, -0.000000, 2.085796] #last 4 columns
poiseuille_profile.test_vals = [-12.485974, -7.612341, -0.000000, 2.085796]
poiseuille_profile.test_vals_aarch64 = [-12.485974, -7.612341, -0.000000, 2.085796]
test_list.append(poiseuille_profile)

##########################
Expand Down

0 comments on commit 905a24a

Please sign in to comment.