mabarnes / moment_kinetics

Other
2 stars 4 forks source link

Fix range setup for `anyv` regions #211

Closed johnomotani closed 2 months ago

johnomotani commented 2 months ago

We may sometimes call get_local_range() with a sub_block_rank bigger than the sub_block_size, in particular for the anyv 'serial region'. In this case immediately return 1:0 for the range, as this avoids a potential out-of-bounds array access when accessing n_points_for_proc.

Fixes #210.