-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
Infiniband parcelport #2419
Merged
Merged
Infiniband parcelport #2419
Changes from all commits
Commits
Show all changes
177 commits
Select commit
Hold shift + click to select a range
c9ef2ae
Add minimal parcelport plugin interface from Heller
biddisco cb12a39
Add necessary code to make minimal parcelport example compile
biddisco 4cba3d6
Rename minimal plugin to verbs
biddisco 4ad6c15
Find verbs and rdma_cm scripts
biddisco a07abc7
First version that allows two nodes to make a connection
biddisco 3b7eb1e
Many CMake changes to handle parcelport compilation
biddisco 56fabf5
First not fully functional version of infiniband verbs interface
biddisco dbf144b
add simple profiler to network_storage example
biddisco 1cccdee
Fix potentially unnecessary lock
biddisco d2f6e05
fix MSVC compilation problem
biddisco 7545a74
Debug message and #define cleanup in storage example
biddisco 2ffc65e
Changes to reflect chunk allocation reworking
biddisco 296c2ce
Move message header/tag utilities into location for reuse by any parc…
biddisco f7395fb
.gitignore for rdmahelper external library
biddisco 62c1637
Create header in-place using registered memory block direct from allo…
biddisco 73f278c
put_parcel + callback + memory region release working for simple sends
biddisco 166ae28
Begin implementation of send of parcels using verbs parcelport
biddisco f6fa8b9
Add disable_deallocate flag to allocator so that we can take the buff…
biddisco ff9f7a7
Implement multiple SGE for header/chunks and disable deallocate of me…
biddisco 86f213a
Remove copy from receive buffer into decode_parcels by using a custom…
biddisco 11846ce
Fix serialization related changes after merge with new serialization …
biddisco ea27900
Wrapper class to takes an rdma buffer and pass it to the parcel decod…
biddisco 866a749
Implement zero-copy chunk get in verbs parcelport using rdma read fro…
biddisco 7fe653e
Initialize remote key to zero in constructor
biddisco e7c1142
Lots of fixes to handle chunks correctly and pass them into the decod…
biddisco fd85fe6
Disable reuse of tags to prevent verbs async collisions
biddisco d874303
Make sure zerocopy chunks are at least as big as default_chunk_size
biddisco a368ebb
use unsigned int in header
biddisco 552aaeb
Allow one to pass rdma key into serialization chunk create
biddisco e527bb7
Used memory chunks must be kept until parcel_buffer decode destroys them
biddisco 234debd
Fix boost dyn_link problem with Boost_USE_STATIC_LIBS check
biddisco b959c14
Implement stop function and close down connection on termination
biddisco 79742ca
Don't release RDMA zero copy buffers back into pool
biddisco 743d235
Undo changes to tag_provider from mpi parcelport as verbs uses atomic…
biddisco 8dc5464
Remove debug log messages from non verbs parcelport code
biddisco fa04c52
Add locks around maps to improve thread safety.
biddisco 27b7102
Implement move assignment operator
biddisco af11850
Fix race condition for postSend_xN, add more debug messages
biddisco 7a79000
Fix race : rdma get completing before send has filled get tag map
biddisco 7759311
Tidy up the recv structure handling, use iterator based lookup
biddisco 63e4162
Put a mutex around the active receive list erase call
biddisco c591325
Clean up HPX_WITH_XXX and HPX_HAVE_XXX for VERBS options after merge …
biddisco 4f8fa64
Fix problems with faulty declarations of locks and clean up typedefs
biddisco 061080a
Thread safety for handle_completion in line with changes in RdmaContr…
biddisco f208798
Fix CMake Rdmahelper compile_definitions for logging
biddisco aa94a12
Move InitiatedConnection flag control into RdmaClient class
biddisco 95e2436
Only run background_work on an HPX thread and limit number of sends a…
biddisco 6309e97
Add ignore_while_checking<lock> to guard against a suspend while lock…
biddisco 4ec39a3
Fix a race if send completion thread suspended during zero copy rdma …
biddisco 9e4f800
Use atomic counter in rdma get handler for safety
biddisco 86c9b98
Fix extra background_work when send queue full, can lose a parcel if …
biddisco e7819ad
Move simple_profiler into its own header for clarity
biddisco 62454e3
Add a parcelport handling thread to network storage test
biddisco bebdb5f
Use async_cb for management of argument lifetimes
biddisco 2e817ae
Improve shutdown/stop code to not delete iterator during loop
biddisco 8509364
User a boolean flag for zero-copy list instead of vector size to prot…
biddisco f9d96fd
Fix get of boolean from char array - incorrect Bigendian result from …
biddisco ad4bebc
#define syntax cleaned to remove _HAVE_ from non binary defines
biddisco 3aa4b6b
Fix unsupported Immediate data send on BGAS, move handlers into their…
biddisco 3bc9174
Fix IBV_WC_SEND not setting the byte_len to the transferred size
biddisco 5f116bc
Clean up locality definition and remove unused port value
biddisco 1313848
Make sure header space is large enough for int storage in final slot
biddisco 334af32
Provide a const iterator access to wrapped pointer vector
biddisco 78937c9
Fix warning about uninitialized var, remove debug code
biddisco 3cf0b92
Add a high priority background_work hpx thread for the lifetime of th…
biddisco 345c19e
Fix race in network storage buffer insert/delete
biddisco b5f43f0
Enable verbs parcelport in normal testing framework
biddisco 4ee0aef
CMake sets #define for unsupported immediate data if roq network sele…
biddisco ff5670f
Experimental work on connection race fix
biddisco 5ed92c2
Replace hpx_SOURCE_DIR with PROJECT_SOURCE_DIR
biddisco abb45d3
Fix broken immediate data for normal (non roq) machines
biddisco ef9490b
Convert background thread to run on custom scheduler
biddisco 6f195b6
Refill client receives as soon as possible after a receive is popped
biddisco 4eaaecc
Fix issues from merge. Parcels are now move only
biddisco f35322a
Update parcelport to use new future_await_container to extract/wait f…
biddisco 9e8248f
Fix unsigned comparison compilation error
biddisco 9ef86ea
Clean up names of #defined constants used for chunk management
biddisco a086973
Make use of custom scheduler conditional (disabled for now)
biddisco 81edbf6
First version of conversion to parcelport_impl usage
biddisco a4d3d33
Redesign of pinned memory wrapping for send/recv
biddisco 8d9ac25
Clean up some memory allocation usage
biddisco 87ad651
Remove some old unused code and fix a merge issue
biddisco 96350f8
Fix mutex/lock use, safe_bool and shared_ptr after merge with latest hpx
biddisco 534b32b
Fix boost/std shared ptr compilation problems
biddisco 5e8bfeb
MPI_CXX_LIBRARIES incorrectly used
biddisco a6add3b
Remove hpx_fwd.hpp
biddisco c6dda69
Fix hang caused by incorect condition variable check
biddisco 3277d94
Support RDMA get of message region when it does not fit in header
biddisco 9b2728a
Clean up stop (fix hang) of parcelport during shutdown
biddisco 6ad7a4a
Fix a memory leak after CopyFromStorage returns a buffer
biddisco bd115e2
Improve debug tracking of receive parcel count
biddisco 01bc2f7
No need to delete user/temp regions as the chunk pool now handles it
biddisco d661542
Fixes to custom scheduler. No boost mutexes etc
biddisco 5ccbaea
Add immediate send trait for parcels with no futures, bypasses parcel…
biddisco 75a51f5
Do not define RDMAHELPER_HAVE_HPX as the rdma helper code will do this
biddisco a153320
Replace boost chrono with std chrono
biddisco d3b0931
Add readers_writers_mutex for OS/hpx locking of map
biddisco 6f3fc16
Add concurrent unordered map with readers_writer_lock support
biddisco fed8491
Enable bootstrapping for verbs parcelport
biddisco f882168
Do not reset AGAS address if user supplied one
biddisco d590e41
Disable compiler optimization around atomics and clean up code
biddisco aa66fe0
Start factoring/moving rdma helper code into new location
biddisco fe99a41
Cleanup namespaces and typedefs in unordered map
biddisco 83d049c
Redo connection code to handle races between simulateneous connections
biddisco 861993e
Some debug code to see suspended tasks
biddisco a3153d3
Adding rdma related utilities to remove dependency on rdmahelper library
biddisco 3dec89b
Replace std::map with concurrent::map for send/receive data
biddisco d4765c4
Add #define to switch between lockfree and normal stack with mutex
biddisco 4019f96
Redesign connection code to improve support for N>2 nodes
biddisco b4c4646
is_in_map returns a pair<iterator,bool> for better thread safety
biddisco 8c845f3
Start removal of rdmahelper library - Cleanup of parcelport
biddisco 42cf97f
Add a sliding semaphore to limit the number of put/gets generated at …
biddisco f9726b5
Adding rdma_device from former rdma helper library
biddisco 2fe2a56
Add can_send_immediate to verbs PP
biddisco ffdbc9d
Remove some obsolete commented out code
biddisco 1bfefd6
Cleanup message header to save a little space
biddisco e6d885f
Redesign header struct to simplify chunk/message rdma or piggyback se…
biddisco c57acd4
Add special lock types for debugging
biddisco 7116abc
Add new sender_receiver base class for all connections
biddisco 5e628c6
Rename barrier to rwl_barrier to avoid macro collision
biddisco 30798c6
Use rdma_lock class for improved debugging
biddisco f5787d6
Fix verbs scheduler to work with latest hpx master
biddisco c6c4aac
Improve customization of parcel sending for bypassing of connection c…
biddisco 25532dd
Add sliding semaphore option and fix merge/rebase commits
biddisco def6b23
Use boost::small_vector for some internals to save a malloc
biddisco d299518
Add throttling of sends by using can_send_immediate to service the pa…
biddisco 1d8a7fb
Fix verbs PP bootstrapping setup (again)
biddisco 0f173bb
Remove obsolete #includes and code. Also fix a debug statement.
biddisco 048d816
Clean up #ifdefs to make things more consistent for options/debug/etc
biddisco b6e4d08
Remove chunk allocator traits specialization as it is not used
biddisco aab7404
Set good params for max_preposts and send_queue depth
biddisco 0cdaf33
Cleanup logging to reduce duplicated macros
biddisco 4a888dd
Clean up and refactor all the #define names after adding parcelport_v…
biddisco ff36cf4
Throttling of sending threads by suspending them if the send queues a…
biddisco a43cd99
DIRECT actions cannot (yet) return futures, so add an #ifdef to swap …
biddisco 0c6d9c9
Add --no-local option to allow pure network benchmarking (no writes t…
biddisco 7cecab6
Always set correct local IP address to improve console/worker connection
biddisco d14917f
Fix get_locality_name to return something more sensible/unique
biddisco 3014c43
Only start io threads when bootstrapping with verbs is ON
biddisco 6d372c9
Fix mistake in network_storage BW calculation
biddisco dbdbceb
Remove sliding semaphore as verbs PP now has throttling capability.
biddisco 8f8183d
Add documentation to explain memory pool usage
biddisco 5f02524
Moving all infiniband related routines into main verbs parcelport dir
biddisco 76e6048
Deadlock fix for event channel connection handling
biddisco 1b4b04e
Fix parcelport registration macro and verbs+boost linking after lib s…
biddisco f60c1b4
Fix inspect, formatting and naming of variables/files
biddisco 18606a4
Fixing Inspect report errors
biddisco 9370582
Add atomic performance counter (that does nothing when disabled)
biddisco 748dbb2
memory_chunk_pool_allocator is obsolete, remove it and references to it
biddisco 3430846
Clean up some problems only present when full logging enabled
biddisco ac7fd2a
Replace boost::array with std::array
biddisco 974dfad
Redesign (futurize) connection setup code for verbs parcelport
biddisco 92065e7
Tweak parcelport_connection to remove one unnecessary buffer move in …
biddisco 0d476ad
Do not ack same rdma_cm_event twice
biddisco b2cb84f
Fix parcelport shutdown by flushing and waiting for receive buffers t…
biddisco 33db41d
Fix shutdown error : Destroy QP before CQ, also set retries back to i…
biddisco 80de7f0
Add a force option to refill preposts so it is not skipped on initial…
biddisco 22cf0ab
Do not process parcels that arrive after hpx::stopped is set
biddisco fea480d
Handle RDMA_CM_EVENT_TIMEWAIT_EXIT on disconnection correctly
biddisco 6c362d2
Clean up some shutdown checks and some map queries + debug tweaks
biddisco c195839
Merge remote-tracking branch 'stellar/master' into verbs_rebased
biddisco 08180be
Use Shared Receive Queue and shared Completion Queue
biddisco bb770d8
Do not check for queued parcels if using 'immediate send' traits/prot…
biddisco c7f04f3
Fix a race caused by incoming connection completing just as outgoing …
biddisco d6440ac
Remove request events for completion queue as we do not use them
biddisco 57001c9
Fix retry timout and rnr_retry (7=infinite) counters after recent deb…
biddisco ea08016
Add warmup to network_storage test and clean up profiler output
biddisco 5498882
Merge remote-tracking branch 'stellar/master' into verbs_rebased
biddisco 83d6f18
Smooth out block cyclic distribution and flag error if 'nolocal' opti…
biddisco 2c10900
Merge branch 'master' into verbs_rebased
3ce2f1d
Properly setting verbs include directories
1b85669
Fixing errors reported by clang sanitizers:
ad0c6c3
Fixing warnings and inspect violations
biddisco 40efbbe
Partially fix a deadlock during connection setup
biddisco e81c5ac
Revert "Always set correct local IP address to improve console/worker…
biddisco ec1dbc2
Fix inspect report errors
biddisco 70f6406
Merge branch 'master' into verbs_rebased
biddisco File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (c) 2014 John Biddiscombe | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
# - Try to find IB Verbs | ||
# Once done this will define | ||
# IB_VERBS_FOUND - System has IB Verbs | ||
# IB_VERBS_INCLUDE_DIRS - The IB Verbs include directories | ||
# IB_VERBS_LIBRARIES - The libraries needed to use IB Verbs | ||
|
||
find_path(IB_VERBS_INCLUDE_DIR verbs.h | ||
HINTS /usr/local/include /usr/include/infiniband) | ||
|
||
find_library(IB_VERBS_LIBRARY NAMES ibverbs | ||
PATHS /usr/local/lib /usr/lib) | ||
|
||
set(IB_VERBS_INCLUDE_DIRS ${IB_VERBS_INCLUDE_DIR}) | ||
set(IB_VERBS_LIBRARIES ${IB_VERBS_LIBRARY}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
# handle the QUIETLY and REQUIRED arguments and set IB_VERBS_FOUND to TRUE | ||
# if all listed variables are TRUE | ||
find_package_handle_standard_args(IB_VERBS DEFAULT_MSG | ||
IB_VERBS_INCLUDE_DIR IB_VERBS_LIBRARY) | ||
|
||
mark_as_advanced(IB_VERBS_INCLUDE_DIR IB_VERBS_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (c) 2014 John Biddiscombe | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# - Try to find RDMA CM | ||
# Once done this will define | ||
# RDMA_CM_FOUND - System has RDMA CM | ||
# RDMA_CM_INCLUDE_DIRS - The RDMA CM include directories | ||
# RDMA_CM_LIBRARIES - The libraries needed to use RDMA CM | ||
|
||
find_path(RDMA_CM_INCLUDE_DIR rdma_cma.h | ||
HINTS /usr/local/include /usr/include/rdma) | ||
|
||
find_library(RDMA_CM_LIBRARY NAMES rdmacm | ||
PATHS /usr/local/lib /usr/lib) | ||
|
||
set(RDMA_CM_INCLUDE_DIRS ${RDMA_CM_INCLUDE_DIR}) | ||
set(RDMA_CM_LIBRARIES ${RDMA_CM_LIBRARY}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
# handle the QUIETLY and REQUIRED arguments and set RDMA_CM_FOUND to TRUE | ||
# if all listed variables are TRUE | ||
find_package_handle_standard_args(RDMA_CM DEFAULT_MSG | ||
RDMA_CM_INCLUDE_DIR RDMA_CM_LIBRARY) | ||
|
||
mark_as_advanced(RDMA_CM_INCLUDE_DIR RDMA_CM_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
|
||
#include <cstdint> | ||
#include <memory> | ||
#include <utility> | ||
|
||
namespace hpx { namespace parcelset { | ||
|
||
|
@@ -25,6 +26,10 @@ namespace hpx { namespace parcelset { | |
struct parcelport_connection | ||
: std::enable_shared_from_this<Connection> | ||
{ | ||
//////////////////////////////////////////////////////////////////////// | ||
typedef BufferType buffer_type; | ||
typedef parcel_buffer<buffer_type, ChunkType> parcel_buffer_type; | ||
|
||
private: | ||
HPX_NON_COPYABLE(parcelport_connection); | ||
|
||
|
@@ -92,6 +97,15 @@ namespace hpx { namespace parcelset { | |
parcelport_connection(typename BufferType::allocator_type const & alloc) | ||
: buffer_(alloc) | ||
{} | ||
|
||
parcelport_connection(typename BufferType::allocator_type * alloc) | ||
: buffer_(std::move(buffer_type(alloc)),alloc) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this ctor really necessary? the move shouldn't be necessary here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll check this and fix it. |
||
{} | ||
|
||
parcelport_connection(parcel_buffer_type && buffer) | ||
: buffer_(std::move(buffer)) | ||
{} | ||
|
||
#endif | ||
|
||
#if defined(HPX_TRACK_STATE_OF_OUTGOING_TCP_CONNECTION) | ||
|
@@ -103,10 +117,6 @@ namespace hpx { namespace parcelset { | |
|
||
virtual ~parcelport_connection() {} | ||
|
||
//////////////////////////////////////////////////////////////////////// | ||
typedef BufferType buffer_type; | ||
typedef parcel_buffer<buffer_type, ChunkType> parcel_buffer_type; | ||
|
||
/// buffer for data | ||
parcel_buffer_type buffer_; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a good idea to use two different logging libraries in HPX? The one we currently use might not be the best of all choices, but having two at the same time isn't a compelling option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The majority of the rdma code was originally in its own mini library and was using boost log. The logging code is only activated when enabled via cmake options and I would not expect anyone other than myself or another developer interested in the verbs parcelport to activate it.
I agree that we should have just one logging options, but this has proven to be my #1 mean of diagnosing problems and leaving it in for the time being is not going to cost anyone. In the long term we should migrate to a single logging infrastructure - but I'd like to postpone this until this is proven to be production stable.