| 12
 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
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 
 | /*
 * Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
 *                         University Research and Technology
 *                         Corporation.  All rights reserved.
 * Copyright (c) 2004-2005 The University of Tennessee and The University
 *                         of Tennessee Research Foundation.  All rights
 *                         reserved.
 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
 *                         University of Stuttgart.  All rights reserved.
 * Copyright (c) 2004-2005 The Regents of the University of California.
 *                         All rights reserved.
 * Copyright (c) 2015      Los Alamos National Security, LLC.  All rights
 *                         reserved.
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 */
#include "orte_config.h"
#include "orte/util/name_fns.h"
#include "opal/mca/base/base.h"
#include "opal/util/output.h"
#include "orte/mca/rml/base/base.h"
#include "orte/mca/rml/rml_types.h"
#include "orte/mca/rml/rml.h"
#include "rml_ftrm.h"
orte_rml_component_t mca_rml_ftrm_wrapped_component;
orte_rml_module_t   orte_rml_ftrm_wrapped_module;
/*
 * Init (Module)
 */
int orte_rml_ftrm_module_enable_comm(void)
{
    int ret;
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: module_init(): Normal...");
    if( NULL != orte_rml_ftrm_wrapped_module.enable_comm ) {
        if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.enable_comm() ) ) {
            return ret;
        }
    }
    return ORTE_SUCCESS;
}
/*
 * Finalize (Module)
 */
int orte_rml_ftrm_module_finalize(void)
{
    int ret;
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: module_finalize()");
    if( NULL != orte_rml_ftrm_wrapped_module.finalize ) {
        if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.finalize() ) ) {
            return ret;
        }
    }
    return ORTE_SUCCESS;
}
/*
 * Get URI
 */
char * orte_rml_ftrm_get_contact_info(void)
{
    char * rtn_val = NULL;
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: get_uri()");
    if( NULL != orte_rml_ftrm_wrapped_module.get_contact_info ) {
        rtn_val = orte_rml_ftrm_wrapped_module.get_contact_info();
    }
    return rtn_val;
}
/*
 * Set CONTACT_INFO
 */
void orte_rml_ftrm_set_contact_info(const char* contact_info)
{
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: set_contact_info()");
    if( NULL != orte_rml_ftrm_wrapped_module.set_contact_info ) {
        orte_rml_ftrm_wrapped_module.set_contact_info(contact_info);
    }
}
/*
 * Ping
 */
int orte_rml_ftrm_ping(const char* uri, const struct timeval* tv)
{
    int ret;
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: ping()");
    if( NULL != orte_rml_ftrm_wrapped_module.ping ) {
        if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.ping(uri, tv) ) ) {
            return ret;
        }
    }
    return ORTE_SUCCESS;
}
/*
 * Send Non-blocking
 */
int orte_rml_ftrm_send_nb(orte_process_name_t* peer,
                          struct iovec* msg,
                          int count,
                          orte_rml_tag_t tag,
                          orte_rml_callback_fn_t cbfunc,
                          void* cbdata)
{
    int ret;
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: send_nb(%s, %d, %d )",
                        ORTE_NAME_PRINT(peer), count, tag);
    if( NULL != orte_rml_ftrm_wrapped_module.send_nb ) {
        if(ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.send_nb(peer, msg, count, tag, cbfunc, cbdata))) {
            return ret;
        }
    }
    return ORTE_SUCCESS;
}
/*
 * Send Buffer Non-blocking
 */
int orte_rml_ftrm_send_buffer_nb(orte_process_name_t* peer,
                                 opal_buffer_t* buffer,
                                 orte_rml_tag_t tag,
                                 orte_rml_buffer_callback_fn_t cbfunc,
                                 void* cbdata)
{
    int ret;
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: send_buffer_nb(%s, %d )",
                        ORTE_NAME_PRINT(peer), tag);
    if( NULL != orte_rml_ftrm_wrapped_module.send_buffer_nb ) {
        if(ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.send_buffer_nb(peer, buffer, tag, cbfunc, cbdata))) {
            return ret;
        }
    }
    return ORTE_SUCCESS;
}
/*
 * Recv Non-blocking
 */
void orte_rml_ftrm_recv_nb(orte_process_name_t* peer,
                          orte_rml_tag_t tag,
			  bool persistent,
                          orte_rml_callback_fn_t cbfunc,
                          void* cbdata)
{
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: recv_nb(%s, %d, %d )",
                        ORTE_NAME_PRINT(peer), tag, persistent);
    if( NULL != orte_rml_ftrm_wrapped_module.recv_nb ) {
        orte_rml_ftrm_wrapped_module.recv_nb(peer, tag, persistent, cbfunc, cbdata);
    }
}
/*
 * Recv Buffer Non-blocking
 */
void orte_rml_ftrm_recv_buffer_nb(orte_process_name_t* peer,
                                 orte_rml_tag_t tag,
                                 bool persistent,
                                 orte_rml_buffer_callback_fn_t cbfunc,
                                 void* cbdata)
{
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: recv_buffer_nb(%s, %d, %d)",
                        ORTE_NAME_PRINT(peer), tag, persistent);
    if( NULL != orte_rml_ftrm_wrapped_module.recv_buffer_nb ) {
        orte_rml_ftrm_wrapped_module.recv_buffer_nb(peer, tag, persistent, cbfunc, cbdata);
    }
}
/*
 * Recv Cancel
 */
void orte_rml_ftrm_recv_cancel(orte_process_name_t* peer, orte_rml_tag_t tag)
{
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: recv_cancel()");
    if( NULL != orte_rml_ftrm_wrapped_module.recv_cancel ) {
        orte_rml_ftrm_wrapped_module.recv_cancel(peer, tag);
    }
}
/*
 * Register a callback on loss of connection
 */
int orte_rml_ftrm_add_exception_handler(orte_rml_exception_callback_t cbfunc)
{
    int ret;
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: add_exception_handler()");
    if( NULL != orte_rml_ftrm_wrapped_module.add_exception_handler ) {
        if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.add_exception_handler(cbfunc) ) ) {
            return ret;
        }
    }
    return ORTE_SUCCESS;
}
int orte_rml_ftrm_del_exception_handler(orte_rml_exception_callback_t cbfunc)
{
    int ret;
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: del_exception_handler()");
    if( NULL != orte_rml_ftrm_wrapped_module.del_exception_handler ) {
        if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.del_exception_handler(cbfunc) ) ) {
            return ret;
        }
    }
    return ORTE_SUCCESS;
}
void orte_rml_ftrm_purge(orte_process_name_t *peer)
{
    opal_output_verbose(20, rml_ftrm_output_handle,
                        "orte_rml_ftrm: purge()");
    if( NULL != orte_rml_ftrm_wrapped_module.purge ) {
        orte_rml_ftrm_wrapped_module.purge(peer);
    }
}
 |