Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for extended data types in DART #462

Merged
merged 34 commits into from
Nov 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
20bd5f9
Initial approach towards DART data types for advanced memory access p…
devreal Aug 18, 2017
77d5fe4
Add missing file
devreal Aug 21, 2017
3d74236
Merge branch 'development' into dart-feat-strides
devreal Nov 16, 2017
0cceb13
Create a max_type for every type, not just basic
devreal Nov 16, 2017
7d77bf6
Add parameter num_blocks to dart_type_create_strided
devreal Nov 16, 2017
390176b
Extend interface of dart_put* and dart_get* to include source and des…
devreal Nov 16, 2017
cca5ed9
Add dash::internal::put/get to wrap dart_put/get
devreal Nov 16, 2017
245858a
Adapt DASH to DART API changes
devreal Nov 16, 2017
3fb5adb
Catch const and volatile types in dash::dart_datatype
devreal Nov 16, 2017
99f4ada
Don't query the size of MPI_TYPE_NULL
devreal Nov 16, 2017
776a577
Add second type parameter for put/get and create strided datatypes on…
devreal Nov 17, 2017
40d4b79
Add first test case for strided get
devreal Nov 17, 2017
2d7b768
Add test cases for strided put and BlockedStridedToBlocked
devreal Nov 18, 2017
1a0fc19
Add IndexedGetSimple test case
devreal Nov 18, 2017
41f0706
Fix indentation in dart_globmem.h
devreal Nov 18, 2017
c753db9
Add IndexedPutSimple test
devreal Nov 18, 2017
c0b8559
Merge branch 'development' into dart-feat-strides
devreal Nov 19, 2017
4f0d1e2
Wrap calls to MPI_Get/Rget/Put/Rput to avoid duplicating code
devreal Nov 20, 2017
7f1cd41
Free handle in dart_get/put_handle if no requests are needed
devreal Nov 20, 2017
11015ee
Remove legacy dart_get_strided/indexed_handle
devreal Nov 20, 2017
c7298f9
Fix type constraint checks in put/get
devreal Nov 20, 2017
873baf3
Disable old checks using legacy dart_get_strided_handle interface
devreal Nov 20, 2017
a9945bc
HaloTest: Fix use of delete vs delete[]
devreal Nov 20, 2017
0360107
Move DART datatype tests to DARTOnesidedTest
devreal Nov 20, 2017
6eeae2e
Add indexed-to-indexed test
devreal Nov 20, 2017
8ca5705
Check for basic type in global memory allocation
devreal Nov 20, 2017
617334d
Add documentation for second type parameter
devreal Nov 20, 2017
0cf5643
Fix datatype tests by adding a barrier before segment destruction
devreal Nov 20, 2017
fc63e2a
More barriers for tests
devreal Nov 20, 2017
39d3680
Another missing barrier
devreal Nov 20, 2017
1761000
Merge branch 'development' into dart-feat-strides
devreal Nov 21, 2017
3f44c8d
disabled nastyMPI
fmoessbauer Nov 22, 2017
8dbbf1e
Reduce size of matrix in Halo tests
devreal Nov 22, 2017
a09a043
Fix build error with clang
devreal Nov 22, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ test:
parallel: true
- bash ./dash/scripts/circleci/run-docker.sh Minimal gnu:
parallel: true
- bash ./dash/scripts/circleci/run-docker.sh Nasty gnu:
parallel: true
# - bash ./dash/scripts/circleci/run-docker.sh Nasty gnu:
# parallel: true
- bash ./dash/scripts/circleci/run-docker.sh Release clang:
parallel: true
- grep "FAIL" ./dash-ci.log && (echo "Full log:" ; cat ./dash-ci.log ; exit 1) || exit 0:
Expand Down
127 changes: 54 additions & 73 deletions dart-if/include/dash/dart/if/dart_communication.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,13 @@ dart_ret_t dart_compare_and_swap(
* is guaranteed. A later flush operation is needed to guarantee
* local and remote completion.
*
* \param dest The local destination buffer to store the data to.
* \param gptr A global pointer determining the source of the get operation.
* \param nelem The number of elements of type \c dtype to transfer.
* \param dtype The data type of the values in buffer \c dest.
* \param dest The local destination buffer to store the data to.
* \param gptr A global pointer determining the source of the get operation.
* \param nelem The number of elements of type \c dtype to transfer.
* \param src_type The data type of the values at the source.
* \param dst_type The data type of the values in buffer \c dest.
*
* \note Base-type conversion is not performed.
*
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
*
Expand All @@ -343,7 +346,8 @@ dart_ret_t dart_get(
void * dest,
dart_gptr_t gptr,
size_t nelem,
dart_datatype_t dtype) DART_NOTHROW;
dart_datatype_t src_type,
dart_datatype_t dst_type) DART_NOTHROW;

/**
* 'REGULAR' variant of dart_put.
Expand All @@ -352,10 +356,13 @@ dart_ret_t dart_get(
* is guaranteed. A later flush operation is needed to guarantee
* local and remote completion.
*
* \param gptr A global pointer determining the target of the put operation.
* \param src The local source buffer to load the data from.
* \param nelem The number of elements of type \c dtype to transfer.
* \param dtype The data type of the values in buffer \c src.
* \param gptr A global pointer determining the target of the put operation.
* \param src The local source buffer to load the data from.
* \param nelem The number of elements of type \c dtype to transfer.
* \param src_type The data type of the values in buffer \c src.
* \param dst_type The data type of the values at the target.
*
* \note Base-type conversion is not performed.
*
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
*
Expand All @@ -366,7 +373,8 @@ dart_ret_t dart_put(
dart_gptr_t gptr,
const void * src,
size_t nelem,
dart_datatype_t dtype) DART_NOTHROW;
dart_datatype_t src_type,
dart_datatype_t dst_type) DART_NOTHROW;


/**
Expand Down Expand Up @@ -453,49 +461,6 @@ dart_ret_t dart_flush_local_all(
*/
typedef struct dart_handle_struct * dart_handle_t;

typedef enum {
STRIDED_TO_STRIDED = 0,
STRIDED_TO_CONTIG,
CONTIG_TO_STRIDED
} dart_stride_option;

dart_ret_t dart_get_strided_handle(
void * dest,
dart_gptr_t gptr,
size_t nblocks,
size_t nelems_block,
size_t stride,
dart_datatype_t dtype,
dart_stride_option stride_opt,
dart_handle_t * handle);

dart_ret_t dart_get_indexed_handle(
void * dest,
dart_gptr_t gptr,
size_t nblocks,
size_t nelems_block,
int* indexes,
dart_datatype_t dtype,
dart_stride_option stride_opt,
dart_handle_t * handle);

/**
* '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.
*
* \param dest Local target memory to store the data.
* \param gptr Global pointer being the source of the data transfer.
* \param nelem The number of elements of \c dtype in buffer \c dest.
* \param dtype The data type of the values in buffer \c dest.
* \param[out] handle Pointer to DART handle to instantiate for later use with \c dart_wait, \c dart_wait_all etc.
*
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
*
* \threadsafe
* \ingroup DartCommunication
*/
#define DART_HANDLE_NULL (dart_handle_t)NULL

/**
Expand All @@ -504,12 +469,15 @@ dart_ret_t dart_get_indexed_handle(
* dart_wait*() call or a fence/flush operation is needed to guarantee
* completion.
*
* \param dest Local target memory to store the data.
* \param gptr Global pointer being the source of the data transfer.
* \param nelem The number of elements of \c dtype in buffer \c dest.
* \param dtype The data type of the values in buffer \c dest.
* \param dest Local target memory to store the data.
* \param gptr Global pointer being the source of the data transfer.
* \param nelem The number of elements of \c dtype in buffer \c dest.
* \param src_type The data type of the values at the source.
* \param dst_type The data type of the values in buffer \c dest.
* \param[out] handle Pointer to DART handle to instantiate for later use with \c dart_wait, \c dart_wait_all etc.
*
* \note Base-type conversion is not performed.
*
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
*
* \threadsafe
Expand All @@ -519,7 +487,8 @@ dart_ret_t dart_get_handle(
void * dest,
dart_gptr_t gptr,
size_t nelem,
dart_datatype_t dtype,
dart_datatype_t src_type,
dart_datatype_t dst_type,
dart_handle_t * handle) DART_NOTHROW;

/**
Expand All @@ -528,12 +497,15 @@ dart_ret_t dart_get_handle(
* dart_wait*() call or a fence/flush operation is needed to guarantee
* completion.
*
* \param gptr Global pointer being the target of the data transfer.
* \param src Local source memory to transfer data from.
* \param nelem The number of elements of type \c dtype to transfer.
* \param dtype The data type of the values in buffer \c dest.
* \param gptr Global pointer being the target of the data transfer.
* \param src Local source memory to transfer data from.
* \param nelem The number of elements of type \c dtype to transfer.
* \param src_type The data type of the values in buffer \c src.
* \param dst_type The data type of the values at the target.
* \param[out] handle Pointer to DART handle to instantiate for later use with \c dart_wait, \c dart_wait_all etc.
*
* \note Base-type conversion is not performed.
*
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
*
* \threadsafe
Expand All @@ -543,7 +515,8 @@ dart_ret_t dart_put_handle(
dart_gptr_t gptr,
const void * src,
size_t nelem,
dart_datatype_t dtype,
dart_datatype_t src_type,
dart_datatype_t dst_type,
dart_handle_t * handle) DART_NOTHROW;

/**
Expand Down Expand Up @@ -657,10 +630,13 @@ dart_ret_t dart_testall_local(
* 'BLOCKING' variant of dart_get.
* Both local and remote completion is guaranteed.
*
* \param dest Local target memory to store the data.
* \param gptr Global pointer being the source of the data transfer.
* \param nelem The number of elements of type \c dtype to transfer.
* \param dtype The data type of the values in buffer \c dest.
* \param dest Local target memory to store the data.
* \param gptr Global pointer being the source of the data transfer.
* \param nelem The number of elements of type \c dtype to transfer.
* \param src_type The data type of the values at the source.
* \param dst_type The data type of the values in buffer \c dest.
*
* \note Base-type conversion is not performed.
*
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
*
Expand All @@ -671,16 +647,20 @@ dart_ret_t dart_get_blocking(
void * dest,
dart_gptr_t gptr,
size_t nelem,
dart_datatype_t dtype) DART_NOTHROW;
dart_datatype_t src_type,
dart_datatype_t dst_type) DART_NOTHROW;

/**
* 'BLOCKING' variant of dart_put.
* Both local and remote completion is guaranteed.
*
* \param gptr Global pointer being the target of the data transfer.
* \param src Local source memory to transfer data from.
* \param nelem The number of elements of type \c dtype to transfer.
* \param dtype The data type of the values in buffer \c dest.
* \param gptr Global pointer being the target of the data transfer.
* \param src Local source memory to transfer data from.
* \param nelem The number of elements of type \c dtype to transfer.
* \param src_type The data type of the values in buffer \c src.
* \param dst_type The data type of the values at the target.
*
* \note Base-type conversion is not performed.
*
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
*
Expand All @@ -691,7 +671,8 @@ dart_ret_t dart_put_blocking(
dart_gptr_t gptr,
const void * src,
size_t nelem,
dart_datatype_t dtype) DART_NOTHROW;
dart_datatype_t src_type,
dart_datatype_t dst_type) DART_NOTHROW;

/** \} */

Expand Down
14 changes: 7 additions & 7 deletions dart-if/include/dash/dart/if/dart_globmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ dart_ret_t dart_memfree(dart_gptr_t gptr) DART_NOTHROW;
*/
dart_ret_t dart_team_memalloc_aligned(
dart_team_t teamid,
size_t nelem,
size_t nelem,
dart_datatype_t dtype,
dart_gptr_t * gptr) DART_NOTHROW;

Expand Down Expand Up @@ -362,10 +362,10 @@ dart_ret_t dart_team_memfree(
*/
dart_ret_t dart_team_memregister_aligned(
dart_team_t teamid,
size_t nelem,
size_t nelem,
dart_datatype_t dtype,
void * addr,
dart_gptr_t * gptr) DART_NOTHROW;
void * addr,
dart_gptr_t * gptr) DART_NOTHROW;

/**
* Collective function, attaches external memory previously allocated by
Expand All @@ -386,10 +386,10 @@ dart_ret_t dart_team_memregister_aligned(
*/
dart_ret_t dart_team_memregister(
dart_team_t teamid,
size_t nlelem,
size_t nlelem,
dart_datatype_t dtype,
void * addr,
dart_gptr_t * gptr) DART_NOTHROW;
void * addr,
dart_gptr_t * gptr) DART_NOTHROW;

/**
* Collective function similar to dart_team_memfree() but on previously
Expand Down
Loading