You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initializer is not only responsible for the creation of the grid, it also stores some information needed during the entire calculation run (e.g., the total number of steps). The initializer object is therefore persistent throughout the calculation.
If the initializer requires significant amounts memory for grid creation, an additional hook Initializer::gridInitializationDone() can signal it to free the initialization memory.
Exemplary call in libgeodecomp/parallelization/hiparsimulator.h:
As far as I see, the persistently needed methods of the initializer are only
startStep()
maxSteps()
gridBox()
gridDimensions().
IMHO these could just as well be parameters to the simulator itself which in turn passes it to the initializer. I am aware that this minor structural change requires adaptations of all codes using LGD, but a person can dream, no?
In porting a code to use LibGeoDecomp I've found the need to enable resetting of maxSteps of an Initializer, and have implemented this by passing a new value from a Simulator to an Initializer in the following way: aproeme/libgeodecomp@a81ed60
I may not permanently rely on the ability to change these parameters via an existing Simulator, but could not see a better solution for the moment. It seems useful to be able to stage simulations by changing parameters via the Simulator, regardless of whether the parameters themselves are moved to live in the Simulators they initialise or whether they stay inside the original Initializer and are modified by passing new values through the Simulator, as I did for maxSteps and as suggested by klreuther.
The initializer is not only responsible for the creation of the grid, it also stores some information needed during the entire calculation run (e.g., the total number of steps). The initializer object is therefore persistent throughout the calculation.
If the initializer requires significant amounts memory for grid creation, an additional hook Initializer::gridInitializationDone() can signal it to free the initialization memory.
Exemplary call in libgeodecomp/parallelization/hiparsimulator.h:
Change to /libgeodecomp/io/initializer.h:
The text was updated successfully, but these errors were encountered: