Skip to content

PartitionedArrays v0.2 ‐ v0.3 caveats

Jordi Manyer Fuertes edited this page Aug 9, 2023 · 7 revisions

WIP ...

  • [WARNING PArrays v0.3] In a number of different scenarios, the user is required to pass partition(::PRange) as an argument to a function, e.g., PVector(...,partition(gids)). In many of these scenarios (if not all), there is no type annotation in the function header, so that one may pass gids instead of partition(gids) as an argument in the function call. This causes errors which are hard to relate with the cause of the problem itself, and one has to be quite sharp to understand the problem from the error message.

  • AbstractPData becomes AbstractArray. Two subtypes of AbstractArray: MPIArray and DebugArray

  • AbstractIndexSet becomes AbstractLocalIndices. Much more than a renaming. A refactoring of responsibilities.

  • Exchanger no longer exists. Part of Exchanger is in ExchangeGraph, the other parts are in the subtypes of AbstractLocalIndices, in the so-called, AssemblyCache types.

  • Table becomes JaggedArray. No longer naming clashes with Gridap.Table.

  • map_parts becomes map.

  • To return a tuple of MPIArrays (or DebugArrays) the output of map has to be redirected to the tuple_of_arrays function.

    a,b=map(...) do 
       a,b 
    end |> tuple_of_arrays
  • Run functions are now called with_debug() and with_mpi(). The number of parts has to be hard-coded in the function that each part calls.

  • Had to add functions fetch_ghost_values_cache and fetch_ghost_values! to GridapDistributed because exchange! in PArrays no longer provides the previous functionality. These functions can be waived using PVectors all the way through. TO-THINK which is more appropriate on a case-by-case basis.

  • fetch_ghost_values! returns a Julia Task, not an AbstractPData of Tasks (as with PArrays v0.2)

  • PVector constructors have changed quite a bit:

    • The constructors no longer use PRanges as inputs, use partition(PRange) instead.
    • PVector(scalar,ids) no longer exists, use pfill(scalar,ids) instead.