Skip to content

Longer types for use with MPI_MINLOC and MPI_MAXLOC #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mpiforumbot opened this issue Jul 24, 2016 · 1 comment
Closed

Longer types for use with MPI_MINLOC and MPI_MAXLOC #319

mpiforumbot opened this issue Jul 24, 2016 · 1 comment

Comments

@mpiforumbot
Copy link
Collaborator

mpiforumbot commented Jul 24, 2016

Originally by jedbrown on 2012-01-28 12:39:35 -0600


Migrated to mpi-forum/mpi-issues#18

@mpiforumbot
Copy link
Collaborator Author

Originally by jhammond on 2015-11-09 10:56:40 -0600


I withdrew my related ticket but I want to add the text here because I think there is value to adding the word "AND" to these types to make them more clear.

Replying to [#342 jhammond]:

MPI_FLOAT_INT, MPI_LONG_INT, MPI_DOUBLE_INT, MPI_SHORT_INT, MPI_2INT and MPI_LONG_DOUBLE_INT are an inadequate set of built-in datatypes for use with MPI_{MAX,MIN}LOC, especially since MPI_Accumulate does not permit user-defined reductions. There are very good use cases for MPI_2LONG, for example, in sparse graph work by the PETSc team (Jed Brown and Matt Knepley).

The set of types that are valid for use with MPI_{MAX,MIN}LOC should be expanded to include all pairs of built-in datatypes with one another. The reason is that the location (the second element in the pair) need not be a location in a computer science sense, i.e. an offset or address, but rather can be an arbitrary tag.

I see from Ticket #145 that this might cause issues with name uniqueness, hence it may be sensible to add "AND" between the two types when they are different. Thus MPI_LONG_AND_LONG_INT is distinguished from MPI_LONG_LONG_AND_INT as well as the scalar type MPI_LONG_LONG_INT.

If people don't like LOC being a non-integral type, at least let LOC be LONG in addition to INT for all existing pair types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant