2005-09-13 08:28:18 +04:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2015-02-25 02:49:23 +03:00
|
|
|
* Copyright (c) 2004-2015 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-02-25 02:49:23 +03:00
|
|
|
* Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
2005-09-13 08:28:18 +04:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2014-06-13 10:03:23 +04:00
|
|
|
* Copyright (c) 2014 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). All rights reserved.
|
2005-09-13 08:28:18 +04:00
|
|
|
* $COPYRIGHT$
|
2015-02-25 02:49:23 +03:00
|
|
|
*
|
2005-09-13 08:28:18 +04:00
|
|
|
* Additional copyrights may follow
|
2015-02-25 02:49:23 +03:00
|
|
|
*
|
2005-09-13 08:28:18 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2015-02-15 22:47:27 +03:00
|
|
|
#ifndef MCA_COLL_BASE_UTIL_EXPORT_H
|
|
|
|
#define MCA_COLL_BASE_UTIL_EXPORT_H
|
2005-09-13 08:28:18 +04:00
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
|
|
|
#include "mpi.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
|
|
|
#include "ompi/datatype/ompi_datatype.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/request/request.h"
|
|
|
|
#include "ompi/mca/pml/pml.h"
|
2005-09-13 08:28:18 +04:00
|
|
|
|
2009-08-20 15:42:18 +04:00
|
|
|
BEGIN_C_DECLS
|
2005-09-13 08:28:18 +04:00
|
|
|
|
2014-06-13 20:04:45 +04:00
|
|
|
/**
|
|
|
|
* A MPI_like function doing a send and a receive simultaneously.
|
|
|
|
* If one of the communications results in a zero-byte message the
|
|
|
|
* communication is ignored, and no message will cross to the peer.
|
|
|
|
*/
|
2015-02-25 02:49:23 +03:00
|
|
|
int ompi_coll_base_sendrecv_nonzero_actual( void* sendbuf, size_t scount,
|
2014-06-13 10:03:23 +04:00
|
|
|
ompi_datatype_t* sdatatype,
|
|
|
|
int dest, int stag,
|
2015-02-25 02:49:23 +03:00
|
|
|
void* recvbuf, size_t rcount,
|
2014-06-13 10:03:23 +04:00
|
|
|
ompi_datatype_t* rdatatype,
|
|
|
|
int source, int rtag,
|
|
|
|
struct ompi_communicator_t* comm,
|
|
|
|
ompi_status_public_t* status );
|
|
|
|
|
2005-09-13 08:28:18 +04:00
|
|
|
|
2014-06-13 20:04:45 +04:00
|
|
|
/**
|
|
|
|
* Similar to the function above this implementation of send-receive
|
|
|
|
* do not generate communications for zero-bytes messages. Thus, it is
|
|
|
|
* improper to use in the context of some algorithms for collective
|
|
|
|
* communications.
|
|
|
|
*/
|
2007-01-22 08:50:23 +03:00
|
|
|
static inline int
|
2015-02-15 22:47:27 +03:00
|
|
|
ompi_coll_base_sendrecv( void* sendbuf, size_t scount, ompi_datatype_t* sdatatype,
|
2007-01-11 00:56:59 +03:00
|
|
|
int dest, int stag,
|
2012-03-05 18:10:26 +04:00
|
|
|
void* recvbuf, size_t rcount, ompi_datatype_t* rdatatype,
|
2015-02-25 02:49:23 +03:00
|
|
|
int source, int rtag,
|
2007-01-11 00:56:59 +03:00
|
|
|
struct ompi_communicator_t* comm,
|
2007-01-22 08:50:23 +03:00
|
|
|
ompi_status_public_t* status, int myid )
|
|
|
|
{
|
2014-06-13 20:04:45 +04:00
|
|
|
if ((dest == source) && (source == myid)) {
|
2015-02-25 02:49:23 +03:00
|
|
|
return (int) ompi_datatype_sndrcv(sendbuf, (int32_t) scount, sdatatype,
|
2012-04-06 19:48:07 +04:00
|
|
|
recvbuf, (int32_t) rcount, rdatatype);
|
2007-01-22 08:50:23 +03:00
|
|
|
}
|
2015-02-25 02:49:23 +03:00
|
|
|
return ompi_coll_base_sendrecv_nonzero_actual (sendbuf, scount, sdatatype,
|
|
|
|
dest, stag,
|
2007-01-22 08:50:23 +03:00
|
|
|
recvbuf, rcount, rdatatype,
|
|
|
|
source, rtag, comm, status);
|
|
|
|
}
|
2005-09-13 08:28:18 +04:00
|
|
|
|
2009-08-20 15:42:18 +04:00
|
|
|
END_C_DECLS
|
2015-02-15 22:47:27 +03:00
|
|
|
#endif /* MCA_COLL_BASE_UTIL_EXPORT_H */
|