Bugfix/improve init level list order to avoid excess work

Merged
#597 · Created  · Last updated

Merged pull request

Merged in bugfix/improve_init_level_list_order_to_avoid_excess_work (pull request #597)

8059e38·Author: ·Closed by: ·2022-04-29

Description

This attempts to address a performance bug outlined in issue #173. Effectively aims to move the override_timestep init stage as high up the initialisation list as possible (i.e. after everything which doesn’t need to know the timestep in initialisation). This should help avoid unnecessary work during a time step change. This now avoids the following, potentially expensive steps,

  1. Destruction and recreation of the ffw plans.

  2. The calculation of the parallel boundary connections and associated redistribute/fill objects.

  3. Calculation of the velocity space grids (generally cheap, but does touch disk).

  4. Reallocation of many large arrays

Some of these changes mean that some arrays may not be deallocated, allocated and zeroed. This shouldn’t have an impact (and tests indicate no change in results arises due to this), but noting here in case a bug arises.

Most of the changes here are from generated code, only the python generator has been modified manually (plus antenna and dist_fn changes for some duplication removal).

0 attachments

0 comments

Loading commits...