Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non deterministic convergence history using NEWTON-KRYLOV with OMP #2259

Open
3 tasks done
tbellosta opened this issue Apr 3, 2024 · 2 comments
Open
3 tasks done
Labels

Comments

@tbellosta
Copy link
Contributor

tbellosta commented Apr 3, 2024

Convergence history is non deterministic when running the RANS solver with SA model using OMP-only parallelism. When fixing the min RMS residual, the computation stops at a different iteration each time I run the solver.

That does not happen with the EULER or NAVIER_STOKES solvers.

Convergence history is non deterministic when using the NEWTON_KRYLOV solver using OMP-only parallelism. When fixing the min RMS residual, the computation stops at a different iteration each time I run the solver.
That happens with the EULER or NAVIER_STOKES and RANS solvers.

I am using a common setup for each case i.e. ROE+MUSCL convective fluxes, WLSQ for viscous gradients, LSQ for MUSCL gradients. Tried also switching ON and OFF the CFL adaptation and limiters, different linear solvers, and precision (single/double) of the linear solver but that doesn't change the outcome of the test (RANS conv history remains non deterministic while EULER and NS have always the same convergence history).

I compiled in release (-O3), with OMP support and exported the mtune/march variables to enable SIMD types.

I'll be looking in the SA/Scalar solver for some uninitialized vars. Any other idea?

I'll be looking in the CNewtonIntegration files for some uninitialized vars/thread safety issue. Any other idea?

Bug report checklist

Desktop (please complete the following information):

  • OS: Linux (Ubuntu 18.4 LTS)
  • C++ compiler and version: g++ (GCC) 7.5.0
  • MPI implementation and version: OpenMPI 2.1.1
  • SU2 Version: 8.0.1
@tbellosta tbellosta added the bug label Apr 3, 2024
@tbellosta
Copy link
Contributor Author

SCRATCH THAT

convergence history is non-deterministic when using the NEWTON-KRYLOV solver, regardless of the equation set.
Using the standard linear solver, the RANS-EULER-NS solvers always converge in the same number of iterations. When switching on the NEWTON-KRYLOV option, the solver converges in a different number of iterations each time I run the solver.

@tbellosta tbellosta changed the title Non deterministic convergence history in RANS case with OMP Non deterministic convergence history using NEWTON-KRYLOV with OMP Apr 3, 2024
@pcarruscag
Copy link
Member

Certain parts of the code use atomic reductions, and dynamic work sharing for load balancing. That's why there is slight (hopefully) non determinism.
There are more operations per iteration when using the NK solver, which makes it more noticeable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants