Skip to content

Missing get-*-point (i.e. get_val) methods with MPI #100

@thchr

Description

@thchr

The otherwise very useful (get-*-point r) methods, e.g. (get-field-point r), do not work with MPI since the method get_val doesn't have an MPI implementation.

This is already nicely noted by an error message:

mpb/mpb/fields.c

Lines 571 to 572 in 47f68c2

#ifdef HAVE_MPI
CHECK(0, "get-*-point not yet implemented for MPI!");

How painful would it be to implement this functionality? I'm assuming the difficulty lies in locating which local process owns the ix index?

This is pretty much guesswork on my part, as I don't know MPI, but, conceptually, would this involve something like:

int ixp = ix - local_x_start
if (ixp >= 0 && ixp < local_nx)
     // assign data[(((ixp * ny) + iy) * nz + iz) * stride] to a process buffer
else
     // assign zero to the (same) process buffer
// reduce over buffer and return value

?

Best regards,
Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions