DASH  0.3.0
Communication routines in DART

A set of basic communication routines in DART. More...

Collaboration diagram for Communication routines in DART:

Collective operations

Collective operations involving all units of a given team.

dart_ret_t dart_barrier (dart_team_t team)
 DART Equivalent to MPI_Barrier. More...
 
dart_ret_t dart_bcast (void *buf, size_t nelem, dart_datatype_t dtype, dart_team_unit_t root, dart_team_t team)
 DART Equivalent to MPI broadcast. More...
 
dart_ret_t dart_scatter (const void *sendbuf, void *recvbuf, size_t nelem, dart_datatype_t dtype, dart_team_unit_t root, dart_team_t team)
 DART Equivalent to MPI scatter. More...
 
dart_ret_t dart_gather (const void *sendbuf, void *recvbuf, size_t nelem, dart_datatype_t dtype, dart_team_unit_t root, dart_team_t team)
 DART Equivalent to MPI gather. More...
 
dart_ret_t dart_allgather (const void *sendbuf, void *recvbuf, size_t nelem, dart_datatype_t dtype, dart_team_t team)
 DART Equivalent to MPI allgather. More...
 
dart_ret_t dart_allgatherv (const void *sendbuf, size_t nsendelem, dart_datatype_t dtype, void *recvbuf, const size_t *nrecvelem, const size_t *recvdispls, dart_team_t teamid)
 DART Equivalent to MPI allgatherv. More...
 
dart_ret_t dart_allreduce (const void *sendbuf, void *recvbuf, size_t nelem, dart_datatype_t dtype, dart_operation_t op, dart_team_t team)
 DART Equivalent to MPI allreduce. More...
 
dart_ret_t dart_alltoall (const void *sendbuf, void *recvbuf, size_t nelem, dart_datatype_t dtype, dart_team_t team)
 DART Equivalent to MPI alltoall. More...
 
dart_ret_t dart_reduce (const void *sendbuf, void *recvbuf, size_t nelem, dart_datatype_t dtype, dart_operation_t op, dart_team_unit_t root, dart_team_t team)
 DART Equivalent to MPI_Reduce. More...
 

Atomic operations

Operations performing element-wise atomic updates on a given global pointer.

dart_ret_t dart_accumulate (dart_gptr_t gptr, const void *values, size_t nelem, dart_datatype_t dtype, dart_operation_t op)
 Perform an element-wise atomic update on the values pointed to by gptr by applying the operation op with the corresponding value in value on them. More...
 
dart_ret_t dart_accumulate_blocking_local (dart_gptr_t gptr, const void *values, size_t nelem, dart_datatype_t dtype, dart_operation_t op)
 Perform an element-wise atomic update on the values pointed to by gptr by applying the operation op with the corresponding value in value on them. More...
 
dart_ret_t dart_fetch_and_op (dart_gptr_t gptr, const void *value, void *result, dart_datatype_t dtype, dart_operation_t op)
 Perform an element-wise atomic update on the value of type dtype pointed to by gptr by applying the operation op with value on it and return the value beforethe update in result. More...
 
dart_ret_t dart_compare_and_swap (dart_gptr_t gptr, const void *value, const void *compare, void *result, dart_datatype_t dtype)
 Atomically replace the single value pointed to by gptr with the the value in value if it is equal to compare. More...
 

Non-blocking single-sided communication routines

DART single-sided communication routines that return without guaranteeing completion.

Completion will be guaranteed after a flush operation.

dart_ret_t dart_get (void *dest, dart_gptr_t gptr, size_t nelem, dart_datatype_t src_type, dart_datatype_t dst_type)
 'REGULAR' variant of dart_get. More...
 
dart_ret_t dart_put (dart_gptr_t gptr, const void *src, size_t nelem, dart_datatype_t src_type, dart_datatype_t dst_type)
 'REGULAR' variant of dart_put. More...
 
dart_ret_t dart_flush (dart_gptr_t gptr)
 Guarantee completion of all outstanding operations involving a segment on a certain unit. More...
 
dart_ret_t dart_flush_all (dart_gptr_t gptr)
 Guarantee completion of all outstanding operations involving a segment on all units. More...
 
dart_ret_t dart_flush_local (dart_gptr_t gptr)
 Guarantee local completion of all outstanding operations involving a segment on a certain unit. More...
 
dart_ret_t dart_flush_local_all (dart_gptr_t gptr)
 Guarantee completion of all outstanding operations involving a segment on all units. More...
 

Non-blocking single-sided communication operations using handles

The handle can be used to wait for a specific operation to complete using wait functions.

dart_ret_t dart_get_handle (void *dest, dart_gptr_t gptr, size_t nelem, dart_datatype_t src_type, dart_datatype_t dst_type, dart_handle_t *handle)
 'HANDLE' variant of dart_get. More...
 
dart_ret_t dart_put_handle (dart_gptr_t gptr, const void *src, size_t nelem, dart_datatype_t src_type, dart_datatype_t dst_type, dart_handle_t *handle)
 'HANDLE' variant of dart_put. More...
 
dart_ret_t dart_wait (dart_handle_t *handle)
 Wait for the local and remote completion of an operation. More...
 
dart_ret_t dart_waitall (dart_handle_t handles[], size_t n)
 Wait for the local and remote completion of operations. More...
 
dart_ret_t dart_wait_local (dart_handle_t *handle)
 Wait for the local completion of an operation. More...
 
dart_ret_t dart_waitall_local (dart_handle_t handles[], size_t n)
 Wait for the local completion of operations. More...
 
dart_ret_t dart_test_local (dart_handle_t *handle, int32_t *result)
 Test for the local completion of an operation. More...
 
dart_ret_t dart_test (dart_handle_t *handleptr, int32_t *is_finished)
 Test for the completion of an operation and ensure remote completion. More...
 
dart_ret_t dart_testall_local (dart_handle_t handles[], size_t n, int32_t *result)
 Test for the local completion of operations. More...
 
dart_ret_t dart_testall (dart_handle_t handles[], size_t n, int32_t *is_finished)
 Test for the completion of operations and ensure remote completion. More...
 

Blocking single-sided communication operations

These operations will block until completion of put and get is guaranteed.

dart_ret_t dart_get_blocking (void *dest, dart_gptr_t gptr, size_t nelem, dart_datatype_t src_type, dart_datatype_t dst_type)
 'BLOCKING' variant of dart_get. More...
 
dart_ret_t dart_put_blocking (dart_gptr_t gptr, const void *src, size_t nelem, dart_datatype_t src_type, dart_datatype_t dst_type)
 'BLOCKING' variant of dart_put. More...
 

Blocking two-sided communication operations

These operations will block until the operation is finished, i.e., the message has been successfully received.

dart_ret_t dart_send (const void *sendbuf, size_t nelem, dart_datatype_t dtype, int tag, dart_global_unit_t unit)
 DART Equivalent to MPI send. More...
 
dart_ret_t dart_recv (void *recvbuf, size_t nelem, dart_datatype_t dtype, int tag, dart_global_unit_t unit)
 DART Equivalent to MPI recv. More...
 
dart_ret_t dart_sendrecv (const void *sendbuf, size_t send_nelem, dart_datatype_t send_dtype, int send_tag, dart_global_unit_t dest, void *recvbuf, size_t recv_nelem, dart_datatype_t recv_dtype, int recv_tag, dart_global_unit_t src)
 DART Equivalent to MPI sendrecv. More...
 

Detailed Description

A set of basic communication routines in DART.

The semantics of the routines below are the same as with MPI. DART data types specified using dart_datatype_t are directly mapped to MPI data types.

Function Documentation

◆ dart_accumulate()

dart_ret_t dart_accumulate ( dart_gptr_t  gptr,
const void *  values,
size_t  nelem,
dart_datatype_t  dtype,
dart_operation_t  op 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Perform an element-wise atomic update on the values pointed to by gptr by applying the operation op with the corresponding value in value on them.

DART Equivalent to MPI_Accumulate.

Parameters
gptrA global pointer determining the target of the accumulate operation.
valuesThe local buffer holding the elements to accumulate.
nelemThe number of local elements to accumulate per unit.
dtypeThe data type to use in the accumulate operation op.
opThe accumulation operation to perform.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

Referenced by dash::GlobAsyncRef< dash::Atomic< T > >::set().

◆ dart_accumulate_blocking_local()

dart_ret_t dart_accumulate_blocking_local ( dart_gptr_t  gptr,
const void *  values,
size_t  nelem,
dart_datatype_t  dtype,
dart_operation_t  op 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Perform an element-wise atomic update on the values pointed to by gptr by applying the operation op with the corresponding value in value on them.

DART Equivalent to MPI_Accumulate. In contrast to dart_accumulate, this function blocks until the local buffer can be reused.

Parameters
gptrA global pointer determining the target of the accumulate operation.
valuesThe local buffer holding the elements to accumulate.
nelemThe number of local elements to accumulate per unit.
dtypeThe data type to use in the accumulate operation op.
opThe accumulation operation to perform.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

Referenced by dash::GlobAsyncRef< dash::Atomic< T > >::op(), and dash::GlobAsyncRef< dash::Atomic< T > >::set().

◆ dart_allgather()

dart_ret_t dart_allgather ( const void *  sendbuf,
void *  recvbuf,
size_t  nelem,
dart_datatype_t  dtype,
dart_team_t  team 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI allgather.

Parameters
sendbufThe buffer containing the data to be sent by each unit.
recvbufThe buffer to hold the received data.
nelemNumber of values sent by each process and received from each unit.
dtypeThe data type of values in sendbuf and recvbuf.
teamThe team to participate in the allgather.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

Referenced by dash::min_element().

◆ dart_allgatherv()

dart_ret_t dart_allgatherv ( const void *  sendbuf,
size_t  nsendelem,
dart_datatype_t  dtype,
void *  recvbuf,
const size_t *  nrecvelem,
const size_t *  recvdispls,
dart_team_t  teamid 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI allgatherv.

Parameters
sendbufThe buffer containing the data to be sent by each unit.
nsendelemNumber of values to be sent by this unit.
dtypeThe data type of values in sendbuf and recvbuf.
recvbufThe buffer to hold the received data.
nrecvelemArray containing the number of values to receive from each unit.
recvdisplsArray containing the displacements of data received from each unit in recvbuf.
teamidThe team to participate in the allgatherv.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

◆ dart_allreduce()

dart_ret_t dart_allreduce ( const void *  sendbuf,
void *  recvbuf,
size_t  nelem,
dart_datatype_t  dtype,
dart_operation_t  op,
dart_team_t  team 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI allreduce.

Parameters
sendbufThe buffer containing the data to be sent by each unit.
recvbufThe buffer to hold the received data.
nelemNumber of elements sent by each process and received from each unit.
dtypeThe data type of values in sendbuf and recvbuf to use in op.
opThe reduction operation to perform.
teamThe team to participate in the allreduce.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

Referenced by dash::equal(), and dash::find().

◆ dart_alltoall()

dart_ret_t dart_alltoall ( const void *  sendbuf,
void *  recvbuf,
size_t  nelem,
dart_datatype_t  dtype,
dart_team_t  team 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI alltoall.

Parameters
sendbufThe buffer containing the data to be sent by each unit.
recvbufThe buffer to hold the received data.
nelemNumber of elements sent by each process and received from each unit. The value of this parameter must not execeed INT_MAX.
dtypeThe data type of values in sendbuf and recvbuf to use in op.
teamThe team to participate in the allreduce.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

◆ dart_barrier()

dart_ret_t dart_barrier ( dart_team_t  team)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI_Barrier.

Parameters
teamThe team to perform a barrier on.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

Referenced by dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::barrier(), and dash::Team::is_member().

◆ dart_bcast()

dart_ret_t dart_bcast ( void *  buf,
size_t  nelem,
dart_datatype_t  dtype,
dart_team_unit_t  root,
dart_team_t  team 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI broadcast.

Parameters
bufBuffer that is the source (on root) or the destination of the broadcast.
nelemThe number of values to broadcast/receive.
dtypeThe data type of values in buf.
rootThe unit that broadcasts data to all other members in team
teamThe team to participate in the broadcast.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

Referenced by dash::coarray::cobroadcast(), and dash::Shared< ElementType >::init().

◆ dart_compare_and_swap()

dart_ret_t dart_compare_and_swap ( dart_gptr_t  gptr,
const void *  value,
const void *  compare,
void *  result,
dart_datatype_t  dtype 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Atomically replace the single value pointed to by gptr with the the value in value if it is equal to compare.

If the replacement succeeded, the resulting value is stored in result or the original value otherwise.

DART Equivalent to MPI_Compare_and_swap.

Parameters
gptrA global pointer determining the target of the compare-and-swap operation.
valuePointer to an element of type dtype to be swapped with the the value in gptr.
comparePointer to the value to compare gptr with. The swap will be performed if *(gptr) == *(compare).
resultPointer to an element of type dtype to hold the value of the element referenced by gptr before the operation before the swap.
dtypeData data type of all involved data elements. Note that only integral types are supported.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

Referenced by dash::GlobAsyncRef< dash::Atomic< T > >::compare_exchange().

◆ dart_fetch_and_op()

dart_ret_t dart_fetch_and_op ( dart_gptr_t  gptr,
const void *  value,
void *  result,
dart_datatype_t  dtype,
dart_operation_t  op 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Perform an element-wise atomic update on the value of type dtype pointed to by gptr by applying the operation op with value on it and return the value beforethe update in result.

DART Equivalent to MPI_Fetch_and_op.

Parameters
gptrA global pointer determining the target of the fetch-and-op operation.
valuePointer to an element of type dtype to be involved in operation op on the value referenced by gptr.
resultPointer to an element of type dtype to hold the value of the element referenced by gptr before the operation op.
dtypeThe data type to use in the operation op.
opThe operation to perform.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

Referenced by dash::GlobAsyncRef< dash::Atomic< T > >::fetch_op(), dash::GlobAsyncRef< dash::Atomic< T > >::get(), dash::GlobSharedRef< T, GlobalPointerType >::operator=(), and dash::GlobRef< T >::operator=().

◆ dart_flush()

dart_ret_t dart_flush ( dart_gptr_t  gptr)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Guarantee completion of all outstanding operations involving a segment on a certain unit.

Guarantees local and remote completion of all pending puts and gets on a certain memory allocation / window / segment for the target unit specified in gptr. Similar to MPI_Win_flush().

Parameters
gptrGlobal pointer identifying the segment and unit to complete outstanding operations for.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

Referenced by dash::fence(), dash::GlobLocalMemoryPool< dash::HostSpace >::flush(), dash::Shared< ElementType >::flush(), dash::GlobAsyncRef< T >::flush(), dash::GlobAsyncRef< dash::Atomic< T > >::flush(), dash::GlobLocalMemoryPool< dash::HostSpace >::flush_local(), dash::GlobSharedRef< T, GlobalPointerType >::operator=(), and dash::GlobRef< T >::operator=().

◆ dart_flush_all()

dart_ret_t dart_flush_all ( dart_gptr_t  gptr)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Guarantee completion of all outstanding operations involving a segment on all units.

Guarantees local and remote completion of all pending puts and gets on a certain memory allocation / window / segment for all target units. Similar to MPI_Win_flush_all().

Parameters
gptrGlobal pointer identifying the segment to complete outstanding operations for.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

Referenced by dash::GlobLocalMemoryPool< dash::HostSpace >::flush(), dash::GlobAsyncIter< ElementType, PatternType >::get(), and dash::GlobAsyncIter< ElementType, PatternType >::wait().

◆ dart_flush_local()

dart_ret_t dart_flush_local ( dart_gptr_t  gptr)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Guarantee local completion of all outstanding operations involving a segment on a certain unit.

Guarantees local completion of all pending puts and gets on a certain memory allocation / window / segment for the target unit specified in gptr. -> MPI_Win_flush_local()

Parameters
gptrGlobal pointer identifying the segment and unit to complete outstanding operations for.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

Referenced by dash::fence_local(), dash::GlobLocalMemoryPool< dash::HostSpace >::flush_local(), and dash::GlobAsyncRef< dash::Atomic< T > >::get().

◆ dart_flush_local_all()

dart_ret_t dart_flush_local_all ( dart_gptr_t  gptr)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Guarantee completion of all outstanding operations involving a segment on all units.

Guarantees local completion of all pending puts and gets on a certain memory allocation / window / segment for the all units. -> MPI_Win_flush_local_all()

Parameters
gptrGlobal pointer identifying the segment to complete outstanding operations for.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

Referenced by dash::GlobLocalMemoryPool< dash::HostSpace >::flush_local(), and dash::GlobAsyncIter< ElementType, PatternType >::push().

◆ dart_gather()

dart_ret_t dart_gather ( const void *  sendbuf,
void *  recvbuf,
size_t  nelem,
dart_datatype_t  dtype,
dart_team_unit_t  root,
dart_team_t  team 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI gather.

Parameters
sendbufThe buffer containing the data to be sent by each unit.
recvbufThe buffer to hold the received data on unit root.
nelemNumber of elements of type dtype sent by each process and received from each unit at unit root.
dtypeThe data type of values in sendbuf and recvbuf.
rootThe unit that gathers all data from units in team.
teamThe team to participate in the gather.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

◆ dart_get()

dart_ret_t dart_get ( void *  dest,
dart_gptr_t  gptr,
size_t  nelem,
dart_datatype_t  src_type,
dart_datatype_t  dst_type 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

'REGULAR' variant of dart_get.

Copy data referenced by a global pointer into local memory. When this functions returns, neither local nor remote completion is guaranteed. A later flush operation is needed to guarantee local and remote completion.

Parameters
destThe local destination buffer to store the data to.
gptrA global pointer determining the source of the get operation.
nelemThe number of elements of type dtype to transfer.
src_typeThe data type of the values at the source.
dst_typeThe data type of the values in buffer dest.
Note
Base-type conversion is not performed.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_get_blocking()

dart_ret_t dart_get_blocking ( void *  dest,
dart_gptr_t  gptr,
size_t  nelem,
dart_datatype_t  src_type,
dart_datatype_t  dst_type 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

'BLOCKING' variant of dart_get.

Both local and remote completion is guaranteed.

Parameters
destLocal target memory to store the data.
gptrGlobal pointer being the source of the data transfer.
nelemThe number of elements of type dtype to transfer.
src_typeThe data type of the values at the source.
dst_typeThe data type of the values in buffer dest.
Note
Base-type conversion is not performed.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_get_handle()

dart_ret_t dart_get_handle ( void *  dest,
dart_gptr_t  gptr,
size_t  nelem,
dart_datatype_t  src_type,
dart_datatype_t  dst_type,
dart_handle_t handle 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

'HANDLE' variant of dart_get.

Neither local nor remote completion is guaranteed. A later dart_wait*() call or a fence/flush operation is needed to guarantee completion.

Parameters
destLocal target memory to store the data.
gptrGlobal pointer being the source of the data transfer.
nelemThe number of elements of dtype in buffer dest.
src_typeThe data type of the values at the source.
dst_typeThe data type of the values in buffer dest.
[out]handlePointer to DART handle to instantiate for later use with dart_wait, dart_wait_all etc.
Note
Base-type conversion is not performed.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_put()

dart_ret_t dart_put ( dart_gptr_t  gptr,
const void *  src,
size_t  nelem,
dart_datatype_t  src_type,
dart_datatype_t  dst_type 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

'REGULAR' variant of dart_put.

Copy data from local memory into memory referenced by a global pointer. When this functions returns, neither local nor remote completion is guaranteed. A later flush operation is needed to guarantee local and remote completion.

Parameters
gptrA global pointer determining the target of the put operation.
srcThe local source buffer to load the data from.
nelemThe number of elements of type dtype to transfer.
src_typeThe data type of the values in buffer src.
dst_typeThe data type of the values at the target.
Note
Base-type conversion is not performed.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_put_blocking()

dart_ret_t dart_put_blocking ( dart_gptr_t  gptr,
const void *  src,
size_t  nelem,
dart_datatype_t  src_type,
dart_datatype_t  dst_type 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

'BLOCKING' variant of dart_put.

Both local and remote completion is guaranteed.

Parameters
gptrGlobal pointer being the target of the data transfer.
srcLocal source memory to transfer data from.
nelemThe number of elements of type dtype to transfer.
src_typeThe data type of the values in buffer src.
dst_typeThe data type of the values at the target.
Note
Base-type conversion is not performed.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_put_handle()

dart_ret_t dart_put_handle ( dart_gptr_t  gptr,
const void *  src,
size_t  nelem,
dart_datatype_t  src_type,
dart_datatype_t  dst_type,
dart_handle_t handle 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

'HANDLE' variant of dart_put.

Neither local nor remote completion is guaranteed. A later dart_wait*() call or a fence/flush operation is needed to guarantee completion.

Parameters
gptrGlobal pointer being the target of the data transfer.
srcLocal source memory to transfer data from.
nelemThe number of elements of type dtype to transfer.
src_typeThe data type of the values in buffer src.
dst_typeThe data type of the values at the target.
[out]handlePointer to DART handle to instantiate for later use with dart_wait, dart_wait_all etc.
Note
Base-type conversion is not performed.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_recv()

dart_ret_t dart_recv ( void *  recvbuf,
size_t  nelem,
dart_datatype_t  dtype,
int  tag,
dart_global_unit_t  unit 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI recv.

Parameters
recvbufBuffer for the incoming data.
nelemNumber of values received by the unit
dtypeThe data type of values in recvbuf.
tagMessage tag for the distinction between different messages.
unitUnit sending the message.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

Referenced by dash::coarray::sync_images().

◆ dart_reduce()

dart_ret_t dart_reduce ( const void *  sendbuf,
void *  recvbuf,
size_t  nelem,
dart_datatype_t  dtype,
dart_operation_t  op,
dart_team_unit_t  root,
dart_team_t  team 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI_Reduce.

Parameters
sendbufBuffer containing nelem elements to reduce using op.
recvbufBuffer of size nelem to store the result of the element-wise operation op in.
nelemThe number of elements of type dtype in sendbuf and recvbuf.
dtypeThe data type of values stored in sendbuf and recvbuf.
opThe reduce operation to perform.
rootThe unit receiving the reduced values.
teamThe team to perform the reduction on.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

◆ dart_scatter()

dart_ret_t dart_scatter ( const void *  sendbuf,
void *  recvbuf,
size_t  nelem,
dart_datatype_t  dtype,
dart_team_unit_t  root,
dart_team_t  team 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI scatter.

Parameters
sendbufThe buffer containing the data to be sent by unit root.
recvbufThe buffer to hold the received data.
nelemNumber of values sent to each process and received by each unit.
dtypeThe data type of values in sendbuf and recvbuf.
rootThe unit that scatters data to all units in team.
teamThe team to participate in the scatter.
Returns
DART_OK on success, any other of dart_ret_t otherwise.

{team}

◆ dart_send()

dart_ret_t dart_send ( const void *  sendbuf,
size_t  nelem,
dart_datatype_t  dtype,
int  tag,
dart_global_unit_t  unit 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI send.

Parameters
sendbufBuffer containing the data to be sent by the unit.
nelemNumber of values sent to the specified unit.
dtypeThe data type of values in sendbuf.
tagMessage tag for the distinction between different messages.
unitUnit the message is sent to.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

Referenced by dash::coarray::sync_images().

◆ dart_sendrecv()

dart_ret_t dart_sendrecv ( const void *  sendbuf,
size_t  send_nelem,
dart_datatype_t  send_dtype,
int  send_tag,
dart_global_unit_t  dest,
void *  recvbuf,
size_t  recv_nelem,
dart_datatype_t  recv_dtype,
int  recv_tag,
dart_global_unit_t  src 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

DART Equivalent to MPI sendrecv.

Parameters
sendbufBuffer containing the data to be sent by the source unit.
send_nelemNumber of values sentby the source unit.
send_dtypeThe data type of values in sendbuf.
destUnitthe message is sent to.
send_tagMessage tag for the distinction between different messages of the source unit.
recvbufBuffer for the incoming data.
recv_nelemNumber of values received by the destination unit.
recv_dtypeThe data type of values in recvbuf.
srcUnit sending the message.
recv_tagMessage tag for the distinction between different messages of the destination unit.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_test()

dart_ret_t dart_test ( dart_handle_t handleptr,
int32_t *  is_finished 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Test for the completion of an operation and ensure remote completion.

If the transfer completed, the handle is invalidated and may not be used in another dart_wait or dart_test operation.

Parameters
handleThe handle of an operation to test for completion.
[out]resultTrue if the operation has completed.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_test_local()

dart_ret_t dart_test_local ( dart_handle_t handle,
int32_t *  result 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Test for the local completion of an operation.

If the transfer completed, the handle is invalidated and may not be used in another dart_wait or dart_test operation.

Parameters
handleThe handle of an operation to test for completion.
[out]resultTrue if the operation has completed.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_testall()

dart_ret_t dart_testall ( dart_handle_t  handles[],
size_t  n,
int32_t *  is_finished 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Test for the completion of operations and ensure remote completion.

If the transfers completed, the handles are invalidated and may not be used in another dart_wait or dart_test operation.

Parameters
handlesArray of handles of operations to test for completion.
nNumber of handles to test for completion.
[out]resultTrue if all operations have completed.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_testall_local()

dart_ret_t dart_testall_local ( dart_handle_t  handles[],
size_t  n,
int32_t *  result 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Test for the local completion of operations.

If the transfers completed, the handles are invalidated and may not be used in another dart_wait or dart_test operation.

Parameters
handlesArray of handles of operations to test for completion.
nNumber of handles to test for completion.
[out]resultTrue if all operations have completed.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_wait()

dart_ret_t dart_wait ( dart_handle_t handle)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Wait for the local and remote completion of an operation.

Parameters
handleThe handle of the operation to wait for.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_wait_local()

dart_ret_t dart_wait_local ( dart_handle_t handle)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Wait for the local completion of an operation.

Upon success, the handle is invalidated and may not be used in another dart_wait or dart_test operation.

Parameters
handleHandle of an operations to wait for.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

Referenced by dash::halo::HaloUpdateEnv< HaloBlock_t, SigReady >::update_at(), and dash::halo::HaloUpdateEnv< HaloBlock_t, SigReady >::wait().

◆ dart_waitall()

dart_ret_t dart_waitall ( dart_handle_t  handles[],
size_t  n 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Wait for the local and remote completion of operations.

Upon success, the handle is invalidated and may not be used in another dart_wait or dart_test operation.

Parameters
handlesArray of handles of operations to wait for.
nNumber of handles to wait for.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.

◆ dart_waitall_local()

dart_ret_t dart_waitall_local ( dart_handle_t  handles[],
size_t  n 
)

#include </tmp/tmporruphar/dart-if/include/dash/dart/if/dart_communication.h>

Wait for the local completion of operations.

Upon success, the handles are invalidated and may not be used in another dart_wait or dart_test operation.

Parameters
handlesArray of handles of operations to wait for.
nNumber of handles to wait for.
Returns
DART_OK on success, any other of dart_ret_t otherwise.
Thread safety
This function is safe to be called by multiple threads in parallel.