2013-10-23 15:59:14 +00:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
|
|
|
/*
|
2015-01-06 10:52:19 -07:00
|
|
|
* Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights
|
2013-10-23 15:59:14 +00:00
|
|
|
* reserved.
|
2014-07-31 09:55:11 +00:00
|
|
|
* Copyright (c) 2014 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). All rights reserved.
|
2013-10-23 15:59:14 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
#include "opal_config.h"
|
2013-10-23 15:59:14 +00:00
|
|
|
#include "btl_scif_frag.h"
|
|
|
|
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
|
|
|
#define lmin(a,b) ((a) < (b) ? (a) : (b))
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiate a get operation.
|
|
|
|
*/
|
2015-01-06 10:52:19 -07:00
|
|
|
int mca_btl_scif_get (mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *endpoint, void *local_address,
|
|
|
|
uint64_t remote_address, mca_btl_base_registration_handle_t *local_handle,
|
|
|
|
mca_btl_base_registration_handle_t *remote_handle, size_t size, int flags,
|
|
|
|
int order, mca_btl_base_rdma_completion_fn_t cbfunc, void *cbcontext, void *cbdata)
|
|
|
|
{
|
|
|
|
int rc, mark, scif_flags = 0;
|
2013-10-23 15:59:14 +00:00
|
|
|
off_t roffset, loffset;
|
|
|
|
#if defined(SCIF_TIMING)
|
|
|
|
struct timespec ts;
|
|
|
|
|
|
|
|
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts);
|
|
|
|
|
|
|
|
mca_btl_scif_component.get_count++;
|
|
|
|
#endif
|
|
|
|
|
2015-01-06 10:52:19 -07:00
|
|
|
BTL_VERBOSE(("Using DMA Get from remote address %" PRIx64 " to local address %p",
|
|
|
|
remote_address, local_address));
|
2013-10-23 15:59:14 +00:00
|
|
|
|
2015-01-06 10:52:19 -07:00
|
|
|
roffset = remote_handle->scif_offset + (off_t)(remote_address - remote_handle->scif_base);
|
|
|
|
loffset = local_handle->scif_offset + (off_t)((intptr_t)local_address - local_handle->scif_base);
|
2015-06-23 20:59:57 -07:00
|
|
|
|
2013-10-23 15:59:14 +00:00
|
|
|
if (mca_btl_scif_component.rma_use_cpu) {
|
2015-01-06 10:52:19 -07:00
|
|
|
scif_flags = SCIF_RMA_USECPU;
|
2013-10-23 15:59:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (mca_btl_scif_component.rma_sync) {
|
2015-01-06 10:52:19 -07:00
|
|
|
scif_flags |= SCIF_RMA_SYNC;
|
2013-10-23 15:59:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* start the read */
|
2015-01-06 10:52:19 -07:00
|
|
|
rc = scif_readfrom (endpoint->scif_epd, loffset, size, roffset, scif_flags);
|
2013-10-23 15:59:14 +00:00
|
|
|
if (OPAL_UNLIKELY(-1 == rc)) {
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
return OPAL_ERROR;
|
2013-10-23 15:59:14 +00:00
|
|
|
}
|
|
|
|
|
2015-01-06 10:52:19 -07:00
|
|
|
if (!(scif_flags & SCIF_RMA_SYNC)) {
|
2013-10-23 15:59:14 +00:00
|
|
|
/* according to the scif documentation is is better to use a fence rather
|
|
|
|
* than using the SCIF_RMA_SYNC flag with scif_readfrom */
|
|
|
|
scif_fence_mark (endpoint->scif_epd, SCIF_FENCE_INIT_SELF, &mark);
|
|
|
|
scif_fence_wait (endpoint->scif_epd, mark);
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(SCIF_TIMING)
|
|
|
|
SCIF_UPDATE_TIMER(mca_btl_scif_component.get_time,
|
|
|
|
mca_btl_scif_component.get_time_max, ts);
|
|
|
|
#endif
|
|
|
|
|
2015-01-06 10:52:19 -07:00
|
|
|
/* always call the callback function */
|
|
|
|
cbfunc (btl, endpoint, local_address, local_handle, cbcontext, cbdata, OPAL_SUCCESS);
|
2013-10-23 15:59:14 +00:00
|
|
|
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
return OPAL_SUCCESS;
|
2013-10-23 15:59:14 +00:00
|
|
|
}
|