Skip to content
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

allReduce fails with GeomVector #131

Open
brbass opened this issue May 4, 2022 · 0 comments
Open

allReduce fails with GeomVector #131

brbass opened this issue May 4, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@brbass
Copy link
Collaborator

brbass commented May 4, 2022

Calling FieldList<Dimension, Vector>::sumElements causes an error when Spheral is compiled in MPI mode. Specifically,

Fatal error in MPI_Allreduce: Invalid MPI_Op, error stack:
MPI_Allreduce(937)......: MPI_Allreduce(sbuf=..., rbuf=..., count=1, dtype=USER<contig>, MPI_SUM, MPI_COMM_WORLD) failed
MPIR_SUM_check_dtype(97): MPI_Op MPI_SUM operation not defined for this datatype

To reproduce, call sumElements on a FieldList<Dimension, Vector>. The same issue could occur for SymTensor/Tensor as well. The code controlling the MPI behavior for Spheral types is here:

MPI_Type_contiguous(DataTypeTraits<Dim<1>::Vector>::numElements(Dim<1>::Vector::zero), MPI_DOUBLE, &MPI_Vector1d);
MPI_Type_contiguous(DataTypeTraits<Dim<2>::Vector>::numElements(Dim<2>::Vector::zero), MPI_DOUBLE, &MPI_Vector2d);
MPI_Type_contiguous(DataTypeTraits<Dim<3>::Vector>::numElements(Dim<3>::Vector::zero), MPI_DOUBLE, &MPI_Vector3d);
MPI_Type_commit(&MPI_Vector1d);
MPI_Type_commit(&MPI_Vector2d);
MPI_Type_commit(&MPI_Vector3d);

@mdavis36 mdavis36 added the bug Something isn't working label Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants