File: scoll_ucc_common.h

package info (click to toggle)
openmpi 5.0.8-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 201,692 kB
  • sloc: ansic: 613,078; makefile: 42,353; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (39 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * Copyright (c) 2021      Mellanox Technologies. All rights reserved.
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 */
#ifndef MCA_SCOLL_UCC_COMMON_H
#define MCA_SCOLL_UCC_COMMON_H

#define SCOLL_UCC_CHECK(_call) do { \
    if (UCC_OK != (_call)) {        \
        goto fallback;              \
    }                               \
} while(0)

#define SCOLL_UCC_REQ_INIT(_req, _coll, _module) do {       \
    SCOLL_UCC_CHECK(ucc_collective_init(&_coll, _req,       \
                                       _module->ucc_team)); \
} while(0)

static inline ucc_status_t scoll_ucc_req_wait(ucc_coll_req_h req)
{
    ucc_status_t status;
    while (UCC_OK != (status = ucc_collective_test(req))) {
        if (0 > status) {
            UCC_ERROR("ucc_collective_test failed: %s",
                      ucc_status_string(status));
            return status;
        }
        ucc_context_progress(mca_scoll_ucc_component.ucc_context);
        opal_progress();
    }
    return ucc_collective_finalize(req);
}

#endif