@@ -1929,6 +1929,8 @@ void CSolver::SetResidual_RMS(const CGeometry *geometry, const CConfig *config)
19291929
19301930 if (geometry->GetMGLevel () != MESH_0) return ;
19311931
1932+ AD::StartNoSharedReading ();
1933+
19321934 SU2_OMP_MASTER {
19331935
19341936 /* --- Set the L2 Norm residual in all the processors. ---*/
@@ -1985,12 +1987,16 @@ void CSolver::SetResidual_RMS(const CGeometry *geometry, const CConfig *config)
19851987 }
19861988 END_SU2_OMP_MASTER
19871989 SU2_OMP_BARRIER
1990+
1991+ AD::EndNoSharedReading ();
19881992}
19891993
19901994void CSolver::SetResidual_BGS (const CGeometry *geometry, const CConfig *config) {
19911995
19921996 if (geometry->GetMGLevel () != MESH_0) return ;
19931997
1998+ AD::StartNoSharedReading ();
1999+
19942000 SU2_OMP_MASTER {
19952001
19962002 /* --- Set the L2 Norm residual in all the processors. ---*/
@@ -2028,6 +2034,8 @@ void CSolver::SetResidual_BGS(const CGeometry *geometry, const CConfig *config)
20282034 }
20292035 END_SU2_OMP_MASTER
20302036 SU2_OMP_BARRIER
2037+
2038+ AD::EndNoSharedReading ();
20312039}
20322040
20332041void CSolver::SetRotatingFrame_GCL (CGeometry *geometry, const CConfig *config) {
@@ -4111,6 +4119,8 @@ void CSolver::ComputeResidual_Multizone(const CGeometry *geometry, const CConfig
41114119
41124120 SU2_OMP_PARALLEL {
41134121
4122+ AD::StartNoSharedReading ();
4123+
41144124 /* --- Set Residuals to zero ---*/
41154125 SU2_OMP_MASTER
41164126 for (unsigned short iVar = 0 ; iVar < nVar; iVar++){
@@ -4152,6 +4162,8 @@ void CSolver::ComputeResidual_Multizone(const CGeometry *geometry, const CConfig
41524162 END_SU2_OMP_CRITICAL
41534163 SU2_OMP_BARRIER
41544164
4165+ AD::EndNoSharedReading ();
4166+
41554167 SetResidual_BGS (geometry, config);
41564168
41574169 }
0 commit comments