caracal-pipeline / caracal

Containerized Automated Radio Astronomy Calibration (CARACal) pipeline
GNU General Public License v2.0
28 stars 6 forks source link

Parallel gridding #1525

Closed Athanaseus closed 6 months ago

Athanaseus commented 7 months ago

@paoloserra

The default gridder in WSClean is the w-stacking gridder (fast for up to about 5k images), in particular when it can be combined with the -parallel-gridding option.

When parallel gridding is not possible, or when image sizes are reasonably large, the w-gridder might be a better choice.

Therefore, this will be enabled by the use_wgridder switch.

https://wsclean.readthedocs.io/en/latest/computational_performance.html

paoloserra commented 7 months ago

Do I understand correctly that parallel_gridding is only used when use_wgridder: False? This is not clear from the documentation in the schema. I think that it should be explained.

Also, if I am understanding correctly indeed, then why is the default number of gridders 2? Shouldn't it be 1?

Finally, I would suggest to make parameter names as self-explanatory as possible. So parallel_gridding -> nr_parall_grid or something like that.

Athanaseus commented 7 months ago

Do I understand correctly that parallel_gridding is only used when use_wgridder: False?

Yes, that's correct.

paoloserra commented 7 months ago

What do we mean with "This can make things faster in certain cases"? Is there any case where parallel w-stacking is not faster than non-parallel w-stacking, provided you have enough RAM?

Athanaseus commented 7 months ago

That was a line from WSClean documentation.

-parallel-gridding <n>
   Will execute multiple gridders simultaneously. This can make things faster in certain cases,
   but will increase memory usage. 

How does this sound now:

          nr_parallel_grid:
            type: int
            example: '1'
            required: false
            desc: Will execute multiple gridders simultaneously when using w-stacking. When parallel gridding is not possible, or when image sizes are reasonably large (say 5k-10k), the w-gridder might be a better choice.
Athanaseus commented 6 months ago

@paoloserra this one is also ready