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

displs in struct ucg_collective should be outside of union, but triggers assert #8

Open
csehydrogen opened this issue Nov 10, 2020 · 0 comments

Comments

@csehydrogen
Copy link

xucg/api/ucg.h

Lines 326 to 333 in 9aa43b4

union {
/* only in "send" (see @ref UCG_PARAM_TYPE ) */
ucg_collective_type_t type; /**< type and root of the collective */
/* only in "recv" (see @ref UCG_PARAM_OP , @ref UCG_PARAM_DISPLS ) */
void *op; /**< external reduce operation handle */
const int *displs; /**< item displacement array */
};

The comment says that displs is only used in "recv". However, collective communications, such as scatterv, alltoallw, and neighbor_alltoallw defined in ucg_mpi.h, require both type and displs fields.

Simple solution would be putting displs outside of union:

union {
ucg_collective_type_t type;
void *op;
};
const int *displs;

which unfortunately triggers assert

ucg_group.c: UCS_STATIC_ASSERT(sizeof(ucg_collective_params_t) == UCS_SYS_CACHE_LINE_SIZE)

due to struct size change.

Any suggestion?

shizhibao pushed a commit to shizhibao/xucg that referenced this issue Jan 16, 2021
fix big packet for discontig datatype
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant