diff --git a/prov/rxm/src/rxm_domain.c b/prov/rxm/src/rxm_domain.c index 84042899946..454f6f4f208 100644 --- a/prov/rxm/src/rxm_domain.c +++ b/prov/rxm/src/rxm_domain.c @@ -313,25 +313,25 @@ static int rxm_query_collective(struct fid_domain *domain, uint64_t flags) { struct rxm_domain *rxm_domain; + int ret; rxm_domain = container_of(domain, struct rxm_domain, util_domain.domain_fid); if (!rxm_domain->util_coll_domain) return -FI_ENOSYS; + if (rxm_domain->offload_coll_domain) - return fi_query_collective(rxm_domain->offload_coll_domain, - coll, attr, flags); + ret = fi_query_collective(rxm_domain->offload_coll_domain, + coll, attr, flags); + else + ret = -FI_ENOSYS; + + if (FI_SUCCESS == ret || flags & OFI_OFFLOAD_PROV_ONLY) + return ret; return fi_query_collective(rxm_domain->util_coll_domain, coll, attr, flags); - - /* - * TODO: - * also check offload_coll_domain, we could use flags to indicate - * whether we want to query all the collective providers, or offload - * provider only. - */ } static struct fi_ops_domain rxm_domain_ops = {