MPAS-Dev / MPAS

Repository for private MPAS development prior to the MPAS v6.0 release.
Other
4 stars 0 forks source link

Compute initial w field in bit-reproducible way #1538

Closed mgduda closed 6 years ago

mgduda commented 6 years ago

This merge fixes a bit-reproducibility issue in the computation of the initial w field for MPAS-Atmosphere when generating initial conditions with different numbers of MPI tasks.

The w (vertical velocity) field in the atmosphere initial conditions was previously computed using a loop over edges, which gave different results depending on the number of MPI tasks due to order-of-summation issues. By rewriting the loop to compute w from u as a cell-based loop as is done in the MPAS dynamics, we can achieve bit-reproducible results for this field for any MPI task count.

Note that with the ifort compiler, adding flags like "-fp-model precise" may still be needed even with the changes in this commit.