2004-08-26 07:56:45 +00:00
|
|
|
/*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* 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$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-08-26 07:56:45 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2004-10-22 16:06:05 +00:00
|
|
|
#include "ompi_config.h"
|
2004-08-26 07:56:45 +00:00
|
|
|
#include "include/constants.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
#include "mca/ns/ns_types.h"
|
|
|
|
|
2005-05-01 00:54:12 +00:00
|
|
|
#include "dps/dps.h"
|
2004-07-01 14:49:54 +00:00
|
|
|
#include "mca/oob/oob.h"
|
|
|
|
#include "mca/oob/base/base.h"
|
2004-10-22 16:06:05 +00:00
|
|
|
#ifdef HAVE_NETINET_IN_H
|
2004-07-01 14:49:54 +00:00
|
|
|
#include <netinet/in.h>
|
2004-10-22 16:06:05 +00:00
|
|
|
#endif
|
2004-07-01 14:49:54 +00:00
|
|
|
#include <string.h>
|
2004-08-11 21:07:16 +00:00
|
|
|
|
2004-07-01 14:49:54 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Similiar to unix recv(2)
|
|
|
|
*
|
2004-08-04 23:42:51 +00:00
|
|
|
* @param peer (IN) Opaque name of peer process or MCA_OOB_NAME_ANY for wildcard receive.
|
2004-07-01 14:49:54 +00:00
|
|
|
* @param msg (IN) Array of iovecs describing user buffers and lengths.
|
|
|
|
* @param types (IN) Parallel array to iovecs describing data type of each iovec element.
|
|
|
|
* @param count (IN) Number of elements in iovec array.
|
2004-08-02 21:24:00 +00:00
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
2004-07-15 19:08:54 +00:00
|
|
|
* @param flags (IN) May be MCA_OOB_PEEK to return up to the number of bytes provided in the
|
2004-07-01 14:49:54 +00:00
|
|
|
* iovec array without removing the message from the queue.
|
|
|
|
* @return OMPI error code (<0) on error or number of bytes actually received.
|
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
int mca_oob_recv(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_recv(peer, msg, count, tag, flags));
|
2004-07-01 14:49:54 +00:00
|
|
|
}
|
|
|
|
|
2004-08-11 21:07:16 +00:00
|
|
|
/*
|
|
|
|
* Similiar to unix recv(2)
|
|
|
|
*
|
|
|
|
* @param peer (IN) Opaque name of peer process or MCA_OOB_NAME_ANY for wildcard receive.
|
|
|
|
* @param buffer (OUT) Buffer that the OOB creates to recv this message...
|
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
|
|
|
* iovec array without removing the message from the queue.
|
|
|
|
* @return OMPI error code (<0) on error or number of bytes actually received.
|
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
int mca_oob_recv_packed(orte_process_name_t* peer, orte_buffer_t *buf, int tag)
|
2004-08-11 21:07:16 +00:00
|
|
|
{
|
2004-08-12 22:41:42 +00:00
|
|
|
int rc;
|
|
|
|
struct iovec msg[1];
|
2004-08-13 04:16:33 +00:00
|
|
|
|
Not as bad as this all may look. Tim and I made a significant change to the way we handle the startup of the oob, the seed, etc. We have made it backwards-compatible so that mpirun2 and singleton operations remain working. We had to adjust the name server and gpr as well, plus the process_info structure.
This also includes a checkpoint update to openmpi.c and ompid.c. I have re-enabled the ompid compile.
This latter raises an important point. The trunk compiles the programs like ompid just fine under Linux. It also does just fine for OSX under the dynamic libraries. However, we are seeing errors when compiling under OSX for the static case - the linker seems to have trouble resolving some variable names, even though linker diagnostics show the variables as being defined. Thus, a warning to Mac users that you may have to locally turn things off if you are trying to do static compiles. We ask, however, that you don't commit those changes that turn things off for everyone else - instead, let's try to figure out why the static compile is having a problem, and let everyone else continue to work.
Thanks
Ralph
This commit was SVN r2534.
2004-09-08 03:59:06 +00:00
|
|
|
/* setup iov */
|
|
|
|
msg[0].iov_base = NULL;
|
|
|
|
msg[0].iov_len = 0;
|
2004-08-11 21:07:16 +00:00
|
|
|
|
Not as bad as this all may look. Tim and I made a significant change to the way we handle the startup of the oob, the seed, etc. We have made it backwards-compatible so that mpirun2 and singleton operations remain working. We had to adjust the name server and gpr as well, plus the process_info structure.
This also includes a checkpoint update to openmpi.c and ompid.c. I have re-enabled the ompid compile.
This latter raises an important point. The trunk compiles the programs like ompid just fine under Linux. It also does just fine for OSX under the dynamic libraries. However, we are seeing errors when compiling under OSX for the static case - the linker seems to have trouble resolving some variable names, even though linker diagnostics show the variables as being defined. Thus, a warning to Mac users that you may have to locally turn things off if you are trying to do static compiles. We ask, however, that you don't commit those changes that turn things off for everyone else - instead, let's try to figure out why the static compile is having a problem, and let everyone else continue to work.
Thanks
Ralph
This commit was SVN r2534.
2004-09-08 03:59:06 +00:00
|
|
|
rc = mca_oob.oob_recv(peer, msg, 1, tag, MCA_OOB_ALLOC);
|
|
|
|
if(rc < 0)
|
|
|
|
return rc;
|
2004-08-11 21:07:16 +00:00
|
|
|
|
Not as bad as this all may look. Tim and I made a significant change to the way we handle the startup of the oob, the seed, etc. We have made it backwards-compatible so that mpirun2 and singleton operations remain working. We had to adjust the name server and gpr as well, plus the process_info structure.
This also includes a checkpoint update to openmpi.c and ompid.c. I have re-enabled the ompid compile.
This latter raises an important point. The trunk compiles the programs like ompid just fine under Linux. It also does just fine for OSX under the dynamic libraries. However, we are seeing errors when compiling under OSX for the static case - the linker seems to have trouble resolving some variable names, even though linker diagnostics show the variables as being defined. Thus, a warning to Mac users that you may have to locally turn things off if you are trying to do static compiles. We ask, however, that you don't commit those changes that turn things off for everyone else - instead, let's try to figure out why the static compile is having a problem, and let everyone else continue to work.
Thanks
Ralph
This commit was SVN r2534.
2004-09-08 03:59:06 +00:00
|
|
|
/* initialize buffer */
|
2005-03-14 20:57:21 +00:00
|
|
|
return orte_dps.load(buf, msg[0].iov_base, msg[0].iov_len);
|
2004-08-11 21:07:16 +00:00
|
|
|
}
|
Not as bad as this all may look. Tim and I made a significant change to the way we handle the startup of the oob, the seed, etc. We have made it backwards-compatible so that mpirun2 and singleton operations remain working. We had to adjust the name server and gpr as well, plus the process_info structure.
This also includes a checkpoint update to openmpi.c and ompid.c. I have re-enabled the ompid compile.
This latter raises an important point. The trunk compiles the programs like ompid just fine under Linux. It also does just fine for OSX under the dynamic libraries. However, we are seeing errors when compiling under OSX for the static case - the linker seems to have trouble resolving some variable names, even though linker diagnostics show the variables as being defined. Thus, a warning to Mac users that you may have to locally turn things off if you are trying to do static compiles. We ask, however, that you don't commit those changes that turn things off for everyone else - instead, let's try to figure out why the static compile is having a problem, and let everyone else continue to work.
Thanks
Ralph
This commit was SVN r2534.
2004-09-08 03:59:06 +00:00
|
|
|
|