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.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* 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.
|
|
|
|
* $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
|
|
|
|
|
|
|
/* prototypes */
|
2007-01-11 00:56:59 +03:00
|
|
|
int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount,
|
|
|
|
ompi_datatype_t* sdatatype,
|
2006-10-18 06:00:46 +04:00
|
|
|
int dest, int stag,
|
2007-01-11 00:56:59 +03:00
|
|
|
void* recvbuf, int rcount,
|
|
|
|
ompi_datatype_t* rdatatype,
|
2006-10-18 06:00:46 +04:00
|
|
|
int source, int rtag,
|
|
|
|
struct ompi_communicator_t* comm,
|
|
|
|
ompi_status_public_t* status );
|
2005-09-13 08:28:18 +04:00
|
|
|
|
|
|
|
|
|
|
|
/* inline functions */
|
|
|
|
|
2007-01-22 08:50:23 +03:00
|
|
|
static inline int
|
2007-01-11 00:56:59 +03:00
|
|
|
ompi_coll_tuned_sendrecv( void* sendbuf, int scount, ompi_datatype_t* sdatatype,
|
|
|
|
int dest, int stag,
|
|
|
|
void* recvbuf, int rcount, ompi_datatype_t* rdatatype,
|
|
|
|
int source, int rtag,
|
|
|
|
struct ompi_communicator_t* comm,
|
2007-01-22 08:50:23 +03:00
|
|
|
ompi_status_public_t* status, int myid )
|
|
|
|
{
|
|
|
|
if ((dest == myid) && (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,
|
2007-01-22 08:50:23 +03:00
|
|
|
recvbuf, (int32_t) rcount, rdatatype);
|
|
|
|
}
|
|
|
|
return ompi_coll_tuned_sendrecv_actual (sendbuf, scount, sdatatype,
|
|
|
|
dest, stag,
|
|
|
|
recvbuf, rcount, rdatatype,
|
|
|
|
source, rtag, comm, status);
|
|
|
|
}
|
2005-09-13 08:28:18 +04:00
|
|
|
|
2007-01-11 00:56:59 +03:00
|
|
|
int
|
|
|
|
ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, int scount,
|
|
|
|
ompi_datatype_t* sdatatype,
|
|
|
|
int dest, int stag,
|
|
|
|
void* recvbuf, int rcount,
|
|
|
|
ompi_datatype_t* rdatatype,
|
|
|
|
int source, int rtag,
|
|
|
|
struct ompi_communicator_t* comm,
|
|
|
|
ompi_status_public_t* status );
|
2006-02-01 02:21:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
/* inline functions */
|
|
|
|
|
2007-01-11 00:56:59 +03:00
|
|
|
static inline int
|
|
|
|
ompi_coll_tuned_sendrecv_localcompleted( void* sendbuf, int scount,
|
|
|
|
ompi_datatype_t* sdatatype,
|
|
|
|
int dest, int stag,
|
|
|
|
void* recvbuf, int rcount,
|
|
|
|
ompi_datatype_t* rdatatype,
|
|
|
|
int source, int rtag,
|
|
|
|
struct ompi_communicator_t* comm,
|
|
|
|
ompi_status_public_t* status, int myid )
|
2006-02-01 02:21:46 +03:00
|
|
|
{
|
2007-01-11 00:56:59 +03:00
|
|
|
if ((dest == myid) && (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,
|
2007-01-11 00:56:59 +03:00
|
|
|
recvbuf, (int32_t) rcount, rdatatype);
|
2006-02-01 02:21:46 +03:00
|
|
|
}
|
2007-01-11 00:56:59 +03:00
|
|
|
return ompi_coll_tuned_sendrecv_actual_localcompleted (sendbuf, scount,
|
|
|
|
sdatatype, dest,
|
|
|
|
stag,
|
|
|
|
recvbuf, rcount,
|
|
|
|
rdatatype,
|
|
|
|
source, rtag, comm,
|
|
|
|
status);
|
2006-02-01 02:21:46 +03:00
|
|
|
}
|
2005-09-13 08:28:18 +04:00
|
|
|
|
2007-01-18 00:29:13 +03:00
|
|
|
/* inline functions */
|
2007-01-23 04:19:11 +03:00
|
|
|
static inline int
|
2007-01-18 00:29:13 +03:00
|
|
|
ompi_coll_tuned_isendrecv( void* sendbuf, int scount, ompi_datatype_t* sdtype,
|
|
|
|
int dest, int stag, ompi_request_t** sreq,
|
|
|
|
void* recvbuf, int rcount, ompi_datatype_t* rdtype,
|
|
|
|
int source, int rtag, ompi_request_t** rreq,
|
2007-01-23 04:19:11 +03:00
|
|
|
struct ompi_communicator_t* comm ) {
|
|
|
|
int ret, line;
|
|
|
|
|
|
|
|
ret = MCA_PML_CALL(irecv(recvbuf, rcount, rdtype, source, rtag, comm, rreq));
|
|
|
|
if (MPI_SUCCESS != ret) { line = __LINE__; goto error_handler; }
|
|
|
|
|
|
|
|
ret = MCA_PML_CALL(isend(sendbuf, scount, sdtype, dest, stag,
|
|
|
|
MCA_PML_BASE_SEND_STANDARD, comm, sreq));
|
|
|
|
if (MPI_SUCCESS != ret) { line = __LINE__; goto error_handler; }
|
|
|
|
|
|
|
|
return MPI_SUCCESS;
|
|
|
|
error_handler:
|
2008-06-09 18:53:58 +04:00
|
|
|
OPAL_OUTPUT((ompi_coll_tuned_stream, "%s:%d\tError occurred %d\n",
|
2007-01-23 04:19:11 +03:00
|
|
|
__FILE__, line, ret));
|
|
|
|
return ret;
|
|
|
|
}
|
2007-01-18 00:29:13 +03: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 */
|
|
|
|
|
|
|
|
|