Skip to content
Snippets Groups Projects
Commit ec27cf38 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

[expt] fixes negative mpi tag

parent 3e193f62
No related branches found
No related tags found
1 merge request!108[expt] fixes negative mpi tag
Pipeline #204771 passed
...@@ -148,11 +148,14 @@ protected: ...@@ -148,11 +148,14 @@ protected:
// some environments need the tag to be small // some environments need the tag to be small
// see https://www.intel.com/content/www/us/en/developer/articles/technical/large-mpi-tags-with-the-intel-mpi.html // see https://www.intel.com/content/www/us/en/developer/articles/technical/large-mpi-tags-with-the-intel-mpi.html
// TODO: is there a better way of achieving this result? // TODO: is there a better way of achieving this result?
const int new_mpi_tag = mpi_tag_input % maximum_MPI_tag_value; int new_mpi_tag = mpi_tag_input % maximum_MPI_tag_value;
if (new_mpi_tag < 0)
new_mpi_tag = -new_mpi_tag; // no idea if this is reasonable...
if (new_mpi_tag >= maximum_MPI_tag_value || new_mpi_tag < 0) if (new_mpi_tag >= maximum_MPI_tag_value || new_mpi_tag < 0)
{ {
DEBUG_MSG("new_mpi_tag is %d, MPI_TAG_UB is %d, 2**20 is 1048576\n", DEBUG_MSG("new_mpi_tag is %d, MPI_TAG_UB is %d, mpi_tag_input is %d, 2**20 is 1048576\n",
new_mpi_tag, new_mpi_tag,
mpi_tag_input,
MPI_TAG_UB); MPI_TAG_UB);
assert(false); assert(false);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment