Nek5000 / nekRS

our next generation fast and scalable CFD code
https://nek5000.mcs.anl.gov/
Other
284 stars 75 forks source link

cds->FS and cds->o_FS are sometimes allocated different sizes #347

Closed neil-lindquist closed 3 years ago

neil-lindquist commented 3 years ago

Describe the bug cds->FS is allocated to hold cds->nBDF * cds->fieldOffsetSum dfloats, while cds->o_FS is allocated to hold cds->nEXT * cds->fieldOffsetSum dfloats. This can cause a segfault when nBDF != nEXT.

See: https://github.com/Nek5000/nekRS/blob/next/src/core/setup.cpp#L966 https://github.com/Nek5000/nekRS/blob/next/src/core/setup.cpp#L1021

To Reproduce NekRS segfaulted when running a test case with the tombo2 timestepper and not setting the extrapolation.

Expected behavior NekRS should not segfault

Desktop (please complete the following information):