2004-08-26 07:56:45 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00:00
|
|
|
* Copyright (c) 2004-2005 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.
|
2006-02-07 03:32:36 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2004-11-28 20:09:25 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
2006-02-07 03:32:36 +00:00
|
|
|
*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Additional copyrights may follow
|
2006-02-07 03:32:36 +00:00
|
|
|
*
|
2004-08-26 07:56:45 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte_config.h"
|
2004-09-01 23:07:40 +00:00
|
|
|
#include <string.h>
|
2004-10-22 16:06:05 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
2004-09-02 13:26:39 +00:00
|
|
|
#include <sys/types.h>
|
2004-10-22 16:06:05 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
2004-09-01 23:07:40 +00:00
|
|
|
#include <netinet/in.h>
|
2004-10-22 16:06:05 +00:00
|
|
|
#endif
|
2004-08-26 07:56:45 +00:00
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/orte_constants.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/dss/dss.h"
|
|
|
|
#include "orte/mca/ns/ns_types.h"
|
|
|
|
#include "orte/mca/oob/oob.h"
|
|
|
|
#include "orte/mca/oob/base/base.h"
|
2005-07-03 23:31:27 +00:00
|
|
|
#include "opal/util/output.h"
|
2004-07-01 14:49:54 +00:00
|
|
|
/*
|
|
|
|
* Similiar to unix send(2).
|
|
|
|
*
|
|
|
|
* @param peer (IN) Opaque name of peer process.
|
|
|
|
* @param msg (IN) Array of iovecs describing user buffers and lengths.
|
|
|
|
* @param count (IN) Number of elements in iovec array.
|
|
|
|
* @param flags (IN) Currently unused.
|
2004-08-11 22:05:02 +00:00
|
|
|
* @return OMPI error code (<0) on error or number of bytes actually sent.
|
2004-07-01 14:49:54 +00:00
|
|
|
*/
|
2006-02-07 03:32:36 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
int mca_oob_send(orte_process_name_t* peer, struct iovec *msg, int count, int tag, int flags)
|
2004-07-01 14:49:54 +00:00
|
|
|
{
|
2004-08-02 21:24:00 +00:00
|
|
|
return(mca_oob.oob_send(peer, msg, count, tag, flags));
|
2004-07-01 14:49:54 +00:00
|
|
|
}
|
2004-08-11 22:05:02 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Similiar to unix send(2) and mca_oob_send.
|
|
|
|
*
|
|
|
|
* @param peer (IN) Opaque name of peer process.
|
|
|
|
* @param buffer (IN) Prepacked OMPI_BUFFER containing data to send
|
|
|
|
* @param flags (IN) Currently unused.
|
|
|
|
* @return OMPI error code (<0) on error or number of bytes actually sent.
|
|
|
|
*/
|
2006-02-07 03:32:36 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
int mca_oob_send_packed (orte_process_name_t* peer, orte_buffer_t* buffer, int tag, int flags)
|
2004-08-11 22:05:02 +00:00
|
|
|
{
|
2005-03-14 20:57:21 +00:00
|
|
|
void *dataptr;
|
|
|
|
size_t datalen;
|
|
|
|
struct iovec msg[1];
|
|
|
|
int rc;
|
2004-08-11 22:05:02 +00:00
|
|
|
|
|
|
|
/* first build iovec from buffer information */
|
2006-02-07 03:32:36 +00:00
|
|
|
rc = orte_dss.unload(buffer, &dataptr, &datalen);
|
2005-08-15 18:25:35 +00:00
|
|
|
if(rc != ORTE_SUCCESS) {
|
2005-03-14 20:57:21 +00:00
|
|
|
return rc;
|
2005-08-15 18:25:35 +00:00
|
|
|
}
|
2006-02-07 03:32:36 +00:00
|
|
|
orte_dss.load(buffer, dataptr, datalen);
|
2004-08-11 22:05:02 +00:00
|
|
|
|
|
|
|
msg[0].iov_base = dataptr;
|
|
|
|
msg[0].iov_len = datalen;
|
|
|
|
|
|
|
|
return(mca_oob.oob_send(peer, msg, 1, tag, flags));
|
|
|
|
}
|
2006-02-07 03:32:36 +00:00
|
|
|
|