Hello,
Could anyone help me to understand how the moving window works in PIConGPU, please? All I have is the information from the typical grid.param file but it seems that the variable movePoint is no longer used .

So far I have used full size simulations because there was no windowMovePoint in my .cfg files. Is there an example that I can use? I guess there must be more parameters to define the moving window such as its x,y,z dimensions.
My understanding is like this with respect to the figure below:
1) if I enable the moving window from lets say 25% of the y-axis onwards, I will have results in the y = 0,80 nm and then the window will be generated as a cube of some predefined dimensions;
2) are all three cube sides dimensions controllable; I other words could I restrict the transverse simulations sides to something lower than the real simulation domain, when the moving window enters the stage?
3) after the moving window is generated for the y > 80 nm, simulations results will be available only for the region inside the (3D?) moving window;
Is this correct?
4) What are the advantages of the moving window. I guess the full simulation domain is replaced by the local volume of the 3D window and this speeds up the simulation.
5) Can we enforce the mesh across the moving window only?

The greatest difficulty is however to get a model started using the moving window. As you can see in the picture below, though I enabled it in the .cfg file, it does not seem to be turned on.

Hello @cbontoiu .
Thanks for your report. We are aware that the moving window parameters are not the most natural, nor well-documented, and plan to improve on it after the upcoming release is finished (hopefully soon) to not break compatibility with the existing setups of our users.
Currently, PIConGPU moving window always slides along Y towards positive direction (so the same direction as lasers), and always with the speed of light. So all the parameters implicitly apply to this direction only.
Your piece of the .cfg file looks reasonable, so the problem must be somewhere else. Perhaps you somehow do not include TBG_movingWindow into the resulting command line of PIConGPU? TBG_movingWindow is merely a variable name and not a keyword or option by itself, and somewhere in the end of your .cfg file all such variables are assembled into command line parameters. In case you are unsure, please provide the full .cfg file.
The movePoint variable is still required in grid.param for now, but for future compatibility please both set this variable and use --windowMovePoint in your .cfg file. In case you did not specify --windowMovePoint in your .cfg file, it will use the movePoint value by default.
Regarding your questions,
@cbontoiu The moving window approach is a method commonly used for LWFA or PWFA simulations that allows to simulate the plasma dynamics behind the laser/beam driver while it propagates for a longer distance than the simulation box. A detailed explaiantion can be found in the PIConGPU wiki.
It is a Galilean frame that moves (usually) with the speed of light along the laser/bean driver.
In order to keep the code efficient, PIConGPU not only has a moving simulation box (where physics is simulated) but also slides the entire simulation domain: Imagine you have a simulation using N_x x N_y x N_z cells distributed on G_x x G_y x G_z GPUs in each dimension with G_y >1. This is the full simulation domain. The moving window is (by default) then G_x x (G_y-1) x G_z in (GPU) size. When stating the simulation, a virtual tracker particle starts with the speed of light and propagates in +y direction. When it reaches the slide point (G_y-1)/G_y * N_y * windowMovePoint (in cells), the last GPU row in y-direction will be removed and placed in front. The simulation continues till the new slide point is reached and the last GPUs are removed and placed in front again. An illustration can be found here
Currently, I do not understand your 5 questions. Could you reformulate them based on the input above?
Okay, so @PrometheusPi and I wrote answers at the same time, hopefully they complement each other. In case you have further questions @cbontoiu , they are welcome.
Thanks for your answers. Very useful. In conclusion I cannot use the moving window with a single GPU, because of G_y > 1. In this case I will try on a cluster when I get the chance.
Meanwhile maybe you can help me with the following error (cudaErrorMisalignedAddress). It happens without the moving window enabled in the .cfg file and only when I reduce the number of mesh cells as for example TBG_gridSize="80 32 40"
and
using SuperCellSize = mCT::Int< 8, 8, 8 >;
using GuardSize = typename mCT::shrinkTo< mCT::Int< 1, 1, 1 >, simDim >::type;
static constexpr uint32_t BYTES_EXCHANGE_X = 3 * 1024 * 1024;
static constexpr uint32_t BYTES_EXCHANGE_Y = 3 * 1024 * 1024;
static constexpr uint32_t BYTES_EXCHANGE_Z = 3 * 1024 * 1024;
static constexpr uint32_t BYTES_EDGES = 128 * 1024; // 128 kiB
static constexpr uint32_t BYTES_CORNER = 32 * 1024; // 32 kiB
in the memory.param file.

Yes, sorry for not mentioning it earlier - moving window is inherently a multi-process feature.
Thanks for reporting the error @cbontoiu . This is probably some error on PIConGPU side: either such a configuration should not be allowed, with a clear error message, or there is some alignment bug that was hidden by our standard configurations. We will investigate.
@cbontoiu I created a new issue #3202 for your error report, since this one started as moving window-related. If possible, please provide the details there. In case you feel the moving window questions are currently resolved, please feel free to close this one.
OK, I will try to reproduce the error and send you the archive with all files. Maybe you will need to run it with a single GPU as I do, in order to get that error.
Most helpful comment
@cbontoiu The moving window approach is a method commonly used for LWFA or PWFA simulations that allows to simulate the plasma dynamics behind the laser/beam driver while it propagates for a longer distance than the simulation box. A detailed explaiantion can be found in the PIConGPU wiki.
It is a Galilean frame that moves (usually) with the speed of light along the laser/bean driver.
In order to keep the code efficient, PIConGPU not only has a moving simulation box (where physics is simulated) but also slides the entire simulation domain: Imagine you have a simulation using
N_x x N_y x N_zcells distributed onG_x x G_y x G_zGPUs in each dimension withG_y >1. This is the full simulation domain. The moving window is (by default) thenG_x x (G_y-1) x G_zin (GPU) size. When stating the simulation, a virtual tracker particle starts with the speed of light and propagates in +y direction. When it reaches the slide point(G_y-1)/G_y * N_y * windowMovePoint(in cells), the last GPU row in y-direction will be removed and placed in front. The simulation continues till the new slide point is reached and the last GPUs are removed and placed in front again. An illustration can be found hereCurrently, I do not understand your 5 questions. Could you reformulate them based on the input above?