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.
|
2014-06-13 20:04:45 +04:00
|
|
|
* Copyright (c) 2004-2014 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2007-01-19 17:48:47 +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$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_COLL_TUNED_UTIL_EXPORT_H
|
|
|
|
#define MCA_COLL_TUNED_UTIL_EXPORT_H
|
|
|
|
|
|
|
|
#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.
|
|
|
|
*/
|
2014-06-13 10:03:23 +04:00
|
|
|
int ompi_coll_tuned_sendrecv_nonzero_actual( void* sendbuf, size_t scount,
|
|
|
|
ompi_datatype_t* sdatatype,
|
|
|
|
int dest, int stag,
|
|
|
|
void* recvbuf, size_t rcount,
|
|
|
|
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
|
2012-03-05 18:10:26 +04:00
|
|
|
ompi_coll_tuned_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,
|
2007-01-11 00:56:59 +03:00
|
|
|
int source, int rtag,
|
|
|
|
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)) {
|
- 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
|
|
|
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
|
|
|
}
|
2014-06-13 10:03:23 +04:00
|
|
|
return ompi_coll_tuned_sendrecv_nonzero_actual (sendbuf, scount, sdatatype,
|
2007-01-22 08:50:23 +03:00
|
|
|
dest, stag,
|
|
|
|
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
|
2005-09-13 08:28:18 +04:00
|
|
|
#endif /* MCA_COLL_TUNED_UTIL_EXPORT_H */
|
|
|
|
|
|
|
|
|