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

MPI RMA Backends, TCP Backend, Streaming Abstraction #18

Open
wants to merge 151 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
96850ae
initial commit to check fork
deppidan Nov 24, 2017
359a6cb
initial commit to check fork
deppidan Nov 24, 2017
a03e641
tds changes
deppidan Dec 14, 2017
9a1a2b4
tds changes
Dec 14, 2017
9d579d5
added actives_msgs_over_file.cpp
deppidan Dec 14, 2017
0a3a2c2
added actives_msgs_over_file.cpp
Dec 14, 2017
1b35b8f
jamroot switch scif to mpi, uncomment ctor output from migratable
deppidan Mar 27, 2018
fdce48f
jamroot switch scif to mpi, uncomment ctor output from migratable
Mar 27, 2018
34848b5
initial commit of mpi_rma_dynamic prototype
deppidan Mar 29, 2018
e5c46ed
initial commit of mpi_rma_dynamic prototype
Mar 29, 2018
da9c4e9
initial commit of mpi_rma_dynamic prototype
deppidan Mar 29, 2018
590fa6a
initial commit of mpi_rma_dynamic prototype
Mar 29, 2018
6686a91
use shared locks for mpi rma windows
deppidan Mar 29, 2018
e684eb4
use shared locks for mpi rma windows
Mar 29, 2018
f6c6925
compile integration of rma dynamic backend
deppidan Mar 29, 2018
6c15d13
compile integration of rma dynamic backend
deppidan Mar 29, 2018
0b5cbec
Merge branch 'master' of https://github.com/Phuzzyhead/ham
deppidan Mar 29, 2018
cc24b4f
bugfixes
deppidan Apr 4, 2018
a29c877
segfault fixes
deppidan Apr 5, 2018
2a3dc90
started implementing pairwise dynamic windows
deppidan Apr 5, 2018
c2b18ae
changed to paiwise global dynamic windows
deppidan Apr 6, 2018
b6d15c8
fixed Jamroot
deppidan Apr 6, 2018
5279080
fixed error in unused function
deppidan Apr 6, 2018
bf0dfa5
made host permanently lock all windows
deppidan Apr 7, 2018
4e2c5de
fixed send_data() for target-target-copy
deppidan Apr 7, 2018
292369f
changed benchmark for new backend
deppidan Apr 12, 2018
3a16160
added all ranks permanent window locks, only attach buffers to own wi…
deppidan Apr 12, 2018
fd36277
fixed missing flush for copy
deppidan Apr 12, 2018
3b22ec1
initial commit of truly one-sided rma backend
deppidan Apr 20, 2018
cb3246e
fixed recv_msg checking flag buffer @ wrong peer
deppidan Apr 23, 2018
8b0c0e3
fixed recv_msg returning wrong peer buffer
deppidan Apr 23, 2018
72f9f23
fixed wrong offset computation for host buffers
deppidan Apr 23, 2018
85d1989
added flag buffer init with FLAG_FALSE
deppidan Apr 23, 2018
304b71d
fixed in-buffer addressing
deppidan Apr 23, 2018
24fba45
fixed flag init for large host buffer
deppidan Apr 23, 2018
fdcd288
fixed window creation buffer pointer
deppidan Apr 24, 2018
6de2bfd
fixed size for put of flag
deppidan Apr 24, 2018
e0cc1af
fixed displacement on host window
deppidan Apr 24, 2018
339486d
fixed waiting for reply msg for data transfers
deppidan Apr 24, 2018
3f6c306
added debug output to track double-free issue
deppidan Apr 27, 2018
81675fb
added debug output to track double-free issue
deppidan Apr 27, 2018
7e3ead3
added debug output to track double-free issue
deppidan Apr 27, 2018
0d0923a
added debug output to track double-free issue
deppidan Apr 27, 2018
d7fa6ab
added debug output to track double-free issue
deppidan Apr 27, 2018
fc5e2e5
added debug output to track double-free issue
deppidan Apr 27, 2018
cf40181
added debug output to track double-free issue
deppidan Apr 27, 2018
e31cb9b
added debug output to track double-free issue
deppidan Apr 27, 2018
fbaaf63
added debug output to track double-free issue
deppidan Apr 27, 2018
383eb93
added debug output to track double-free issue
deppidan Apr 27, 2018
d2b08f5
added debug output to track double-free issue
deppidan Apr 27, 2018
2692663
introduced alternate request allocation for data transfers
deppidan Apr 27, 2018
ebc3feb
fixed data requests freeing indices @ invalidation
deppidan Apr 27, 2018
c0894ff
fixed data requests freeing indices @ invalidation
deppidan Apr 27, 2018
4917964
fixed data requests freeing indices @ invalidation
deppidan Apr 27, 2018
112e5b8
fixed data requests freeing indices @ invalidation
deppidan Apr 27, 2018
314423e
trying withou flush
deppidan Apr 27, 2018
f0ebfd5
trying withou flush
deppidan Apr 27, 2018
b2ebd10
added logging to send/recv msg
deppidan May 2, 2018
d2c5552
added time logging to recv msg
deppidan May 2, 2018
fdc1b9e
added time logging to recv msg
deppidan May 2, 2018
a403913
added time logging to recv msg
deppidan May 2, 2018
6e84d17
added time logging to send msg
deppidan May 2, 2018
90067a8
commented out Win_flush when putting msg
deppidan May 2, 2018
c9125c7
added time logging to send msg (target)
deppidan May 2, 2018
4202bb9
removed unneeded target-target window locks
deppidan May 2, 2018
178a870
commented Win_flush when putting msg back in
deppidan May 2, 2018
4ed3efe
nonfunctional changes
deppidan Jul 9, 2018
42d9303
lock-get-unlock protocol
deppidan Oct 11, 2018
7549843
test
deppidan Oct 20, 2018
1a90797
functional version, lots of changes
deppidan Oct 27, 2018
a7ad374
added CMake
deppidan Oct 28, 2018
d69ef0b
initial commit of tcp backend
deppidan Oct 31, 2018
7f778bb
changed client connection
deppidan Oct 31, 2018
9201b23
changed client connection
deppidan Oct 31, 2018
f894ec1
bla
deppidan Oct 31, 2018
da62e59
bla
deppidan Oct 31, 2018
1d8bb99
bla
deppidan Oct 31, 2018
41b9a7f
bla
deppidan Oct 31, 2018
5b2df19
bla
deppidan Oct 31, 2018
c708644
bla
deppidan Oct 31, 2018
c423ad0
bla
deppidan Oct 31, 2018
e2e35df
bla
deppidan Oct 31, 2018
50eb7cc
bla
deppidan Oct 31, 2018
1828a78
bla
deppidan Oct 31, 2018
df30d5b
bla
deppidan Oct 31, 2018
2b778ed
fixed spelling mistake
deppidan Oct 31, 2018
be3c8cc
fixed spelling mistake
deppidan Oct 31, 2018
a9408d3
trying something dumb to prevent aöready open error
deppidan Oct 31, 2018
866de30
trying something dumb to prevent aöready open error
deppidan Oct 31, 2018
3c00f53
trying something less dumb to prevent already open error
deppidan Oct 31, 2018
c4cefff
fixed check for illegal rank request
deppidan Oct 31, 2018
63736e0
fixed check for illegal rank request
deppidan Oct 31, 2018
4a9cf73
fixed check for illegal rank request
deppidan Oct 31, 2018
4afa156
fixed check for illegal rank request (kinda)
deppidan Oct 31, 2018
abd32cf
fixed async thread terminating early (wip)
deppidan Oct 31, 2018
d053cf7
removed shared pointers
deppidan Nov 2, 2018
2721d16
changed std::thread invocation
deppidan Nov 2, 2018
2581f11
debugging async ops not completing
deppidan Nov 2, 2018
4d88a32
debugging async ops not completing
deppidan Nov 2, 2018
08b774c
debugging async ops not completing
deppidan Nov 2, 2018
fd02c36
debugging async ops not completing
deppidan Nov 2, 2018
95095ea
debugging async ops not completing
deppidan Nov 2, 2018
cd4f431
debugging async ops not completing
deppidan Nov 2, 2018
3996db0
debugging async ops not completing
deppidan Nov 2, 2018
354e1d2
debugging async ops not completing
deppidan Nov 2, 2018
aa18deb
debugging async ops not completing
deppidan Nov 2, 2018
7244c92
debugging async ops not completing
deppidan Nov 2, 2018
922e9da
adding delimiter to AM transfers
deppidan Nov 2, 2018
2878033
adding delimiter to AM transfers
deppidan Nov 2, 2018
fa33ca5
adding delimiter to AM transfers
deppidan Nov 2, 2018
d520e2c
adding delimiter to AM transfers
deppidan Nov 2, 2018
5fdba9f
removed delimiters, just send full MSG_SIZE
deppidan Nov 2, 2018
77173ff
added error handling on recv_result
deppidan Nov 2, 2018
86e8bb7
added error handling on recv_result
deppidan Nov 2, 2018
d16d336
added debug output for send_result()
deppidan Nov 2, 2018
268e817
fixed send_result() target node
deppidan Nov 2, 2018
617252e
fixed send_result() target node - properly
deppidan Nov 2, 2018
9b935a6
sending full MSG_SIZE for results
deppidan Nov 2, 2018
126699a
fixed tcp to use same copy protocol as MPI
deppidan Nov 2, 2018
ff4fd42
unfixed tcp copy to not implemented... as originally intended
deppidan Nov 2, 2018
462bbbf
made sent/received completion flags volatile
deppidan Nov 6, 2018
b81187b
proper asio connetion teardown
deppidan Nov 6, 2018
09307f7
proper asio connetion teardown
deppidan Nov 6, 2018
2da089a
proper asio connetion teardown
deppidan Nov 6, 2018
e56004e
proper asio connetion teardown
deppidan Nov 6, 2018
fa9120a
proper asio connetion teardown
deppidan Nov 6, 2018
1671a12
changed work guard
deppidan Nov 6, 2018
1adea8c
changed work guard
deppidan Nov 6, 2018
5431c8e
changed work guard
deppidan Nov 6, 2018
9b9d5d4
workaround to prevent tcp target from crashing due to connection clos…
deppidan Nov 6, 2018
940c8b7
workaround to prevent tcp target from crashing due to connection clos…
deppidan Nov 6, 2018
82dc863
workaround to prevent tcp target from crashing due to connection clos…
deppidan Nov 6, 2018
5c0ba9a
workaround to prevent tcp target from crashing due to connection clos…
deppidan Nov 6, 2018
589fdd0
workaround to prevent tcp target from crashing due to connection clos…
deppidan Nov 6, 2018
476857d
testing work guard
deppidan Nov 6, 2018
2939029
testing work guard
deppidan Nov 6, 2018
442bc34
testing work guard
deppidan Nov 6, 2018
dec53c8
testing work guard
deppidan Nov 6, 2018
9b8d7ca
testing work guard
deppidan Nov 6, 2018
426f10a
implemented copy
deppidan Nov 6, 2018
c75e7d9
implemented copy
deppidan Nov 6, 2018
d3599d8
change dynamic array init for compatibility with clang
deppidan Nov 8, 2018
67f9236
change dynamic array init for compatibility with clang
deppidan Nov 8, 2018
e60f0db
added streams
deppidan Nov 9, 2018
f6c9f73
added streams
deppidan Nov 9, 2018
c4bdabb
changed test to output result too
deppidan Nov 10, 2018
96585b0
fix migratable use
deppidan Nov 13, 2018
657302e
fixed streams
Phuzzyhead Nov 14, 2018
3206fff
cleanup
deppidan Jun 8, 2019
fc47b02
cleanup
deppidan Jun 8, 2019
3415236
cleanup
deppidan Jun 8, 2019
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bin/*
benchmark/results/*
cmake-build-debug/*
48 changes: 48 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright (c) 2018 Marcel Ehrhardt <[email protected]>
# Copyright (c) 2018 Matthias Noack <[email protected]>
#
# See accompanying file LICENSE and README for further information.

project(ham LANGUAGES CXX)
cmake_minimum_required(VERSION 3.2 FATAL_ERROR) # TODO verfify

# set output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
message(STATUS "CMAKE_BINARY_DIR: " ${CMAKE_BINARY_DIR})

### thirdparty dependencies

# Boost
find_package(Boost 1.40 COMPONENTS program_options system REQUIRED)
add_library(boost_library INTERFACE)
target_include_directories (boost_library INTERFACE ${Boost_INCLUDE_DIRS})
target_link_libraries (boost_library INTERFACE ${Boost_LIBRARIES})

# MPI
find_package(MPI) # not required
if (MPI_FOUND)
add_library (mpi_library INTERFACE)
target_include_directories (mpi_library INTERFACE ${MPI_CXX_INCLUDE_PATH})
target_compile_options (mpi_library INTERFACE ${MPI_CXX_COMPILE_FLAGS})
target_link_libraries (mpi_library INTERFACE ${MPI_CXX_LIBRARIES})
endif ()

# Intel SCIF (for Xeon Phi accelerators with KNC architecture)
find_file(SCIF_HEADER_FILE "scif.h")
if (SCIF_HEADER_FILE)
set(SCIF_FOUND ON)
get_filename_component(SCIF_INCLUDE_DIR "${SCIF_HEADER_FILE}" DIRECTORY)
message(STATUS "Found SCIF: ${SCIF_HEADER_FILE}")

add_library (scif_library INTERFACE)
target_include_directories (scif_library INTERFACE ${SCIF_INCLUDE_DIR})
else ()
message(STATUS "Could NOT find SCIF (missing: scif.h)")
endif ()

# tell the compiler to be strict
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DHAM_DEBUG_ON")

add_subdirectory(thirdparty/bmt ${CMAKE_CURRENT_BINARY_DIR}/build.noma_bmt)
add_subdirectory(src)
130 changes: 87 additions & 43 deletions Jamroot
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,23 @@ rule get-boost-lib-path ( properties * )
}

lib boost_program_options : : <name>boost_program_options <conditional>@get-boost-lib-path ;
lib scif : : <name>scif ;
# lib scif : : <name>scif ;

project HAM
: source-location $(SRC)
: requirements
<include>$(INC)
<include>$(BOOST_PATH)/include
<variant>debug:<define>HAM_DEBUG_ON
<variant>debug_mic:<define>HAM_DEBUG_ON
<variant>debug_mic:<define>HAM_DEBUG_ON
# <toolset>intel:<cflags>"-static-intel"
<inlining>on # off, on, full
#<optimization>speed # off, speed, space
<cxxflags>"-std=c++11"
<cxxflags>"-hstd=c++11"
<threading>multi
# <link>static
: default-build debug release debug_mic release_mic
<link>static
: default-build release
# : default-build debug release debug_mic release_mic
;

# Object files that are compiled the same for all targets
Expand All @@ -56,40 +57,59 @@ obj offload_obj_mpi : ham/offload/offload.cpp : <library>/mpi//mpi <define>HAM_C

constant OBJ_FILES_MPI : communicator_obj_mpi runtime_obj_mpi offload_obj_mpi communicator_mpi_obj_mpi ;

obj communicator_obj_scif : ham/net/communicator.cpp : <library>scif <define>HAM_COMM_SCIF ;
obj communicator_scif_obj_scif : ham/net/communicator_scif.cpp : <library>scif <define>HAM_COMM_SCIF ;
obj runtime_obj_scif : ham/offload/runtime.cpp : <library>scif <define>HAM_COMM_SCIF ;
obj offload_obj_scif : ham/offload/offload.cpp : <library>scif <define>HAM_COMM_SCIF ;
obj communicator_obj_mpi_rma_dyn : ham/net/communicator.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC ;
obj communicator_mpi_rma_dyn_obj_mpi_rma_dyn : ham/net/communicator_mpi_rma_dynamic.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC ;
obj runtime_obj_mpi_rma_dyn : ham/offload/runtime.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC ;
obj offload_obj_mpi_rma_dyn : ham/offload/offload.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC ;

constant OBJ_FILES_SCIF : communicator_obj_scif runtime_obj_scif offload_obj_scif communicator_scif_obj_scif ;
constant OBJ_FILES_MPI_RMA_DYN : communicator_obj_mpi_rma_dyn communicator_mpi_rma_dyn_obj_mpi_rma_dyn runtime_obj_mpi_rma_dyn offload_obj_mpi_rma_dyn ;

# obj communicator_obj_scif : ham/net/communicator.cpp : <library>scif <define>HAM_COMM_SCIF ;
# obj communicator_scif_obj_scif : ham/net/communicator_scif.cpp : <library>scif <define>HAM_COMM_SCIF ;
# obj runtime_obj_scif : ham/offload/runtime.cpp : <library>scif <define>HAM_COMM_SCIF ;
# obj offload_obj_scif : ham/offload/offload.cpp : <library>scif <define>HAM_COMM_SCIF ;

# constant OBJ_FILES_SCIF : communicator_obj_scif runtime_obj_scif offload_obj_scif communicator_scif_obj_scif ;

# Libraries

obj main_obj_mpi : ham/offload/main.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI ;
obj main_obj_scif : ham/offload/main.cpp : <library>scif <define>HAM_COMM_SCIF ;
obj main_obj_mpi_rma_dyn : ham/offload/main.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC ;
# obj main_obj_scif : ham/offload/main.cpp : <library>scif <define>HAM_COMM_SCIF ;

lib ham_offload_mpi
: $(OBJ_FILES_COMMON) $(OBJ_FILES_MPI) main_obj_mpi boost_program_options
: <library>/mpi//mpi <define>HAM_COMM_MPI
;

lib ham_offload_scif
: $(OBJ_FILES_COMMON) $(OBJ_FILES_SCIF) main_obj_scif boost_program_options
: <library>scif <define>HAM_COMM_SCIF
;
lib ham_offload_mpi_rma_dyn
: $(OBJ_FILES_COMMON) $(OBJ_FILES_MPI_RMA_DYN) main_obj_mpi_rma_dyn boost_program_options
: <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC
;

# lib ham_offload_scif
# : $(OBJ_FILES_COMMON) $(OBJ_FILES_SCIF) main_obj_scif boost_program_options
# : <library>scif <define>HAM_COMM_SCIF
# ;

obj main_explicit_obj_mpi : ham/offload/main_explicit.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI ;
obj main_explicit_obj_scif : ham/offload/main_explicit.cpp : <library>scif <define>HAM_COMM_SCIF ;
obj main_explicit_obj_mpi_rma_dyn : ham/offload/main_explicit.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC ;
# obj main_explicit_obj_scif : ham/offload/main_explicit.cpp : <library>scif <define>HAM_COMM_SCIF ;

lib ham_offload_mpi_explicit
: $(OBJ_FILES_COMMON) $(OBJ_FILES_MPI) main_explicit_obj_mpi boost_program_options
: <library>/mpi//mpi <define>HAM_COMM_MPI <define>HAM_EXPLICIT
;

lib ham_offload_scif_explicit
: $(OBJ_FILES_COMMON) $(OBJ_FILES_SCIF) main_explicit_obj_scif boost_program_options
: <library>scif <define>HAM_COMM_SCIF <define>HAM_EXPLICIT
;
lib ham_offload_mpi_rma_dyn_explicit
: $(OBJ_FILES_COMMON) $(OBJ_FILES_MPI_RMA_DYN) main_explicit_obj_mpi_rma_dyn boost_program_options
: <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC <define>HAM_EXPLICIT
;

# lib ham_offload_scif_explicit
# : $(OBJ_FILES_COMMON) $(OBJ_FILES_SCIF) main_explicit_obj_scif boost_program_options
# : <library>scif <define>HAM_COMM_SCIF <define>HAM_EXPLICIT
# ;

# Benchmarks

Expand All @@ -99,11 +119,17 @@ exe benchmark_ham_offload_mpi
: <library>/mpi//mpi <library>ham_offload_mpi
;

obj benchmark_ham_offload_scif_obj : benchmark_ham_offload.cpp : <library>scif <define>HAM_COMM_SCIF ;
exe benchmark_ham_offload_scif
: benchmark_ham_offload_scif_obj boost_program_options ham_offload_scif
: <library>scif
;
obj benchmark_ham_offload_mpi_rma_dyn_obj : benchmark_ham_offload.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC ;
exe benchmark_ham_offload_mpi_rma_dyn
: benchmark_ham_offload_mpi_rma_dyn_obj boost_program_options
: <library>/mpi//mpi <library>ham_offload_mpi_rma_dyn
;

# obj benchmark_ham_offload_scif_obj : benchmark_ham_offload.cpp : <library>scif <define>HAM_COMM_SCIF ;
# exe benchmark_ham_offload_scif
# : benchmark_ham_offload_scif_obj boost_program_options ham_offload_scif
# : <library>scif
# ;

exe benchmark_intel_leo
: benchmark_intel_leo.cpp boost_program_options
Expand All @@ -116,51 +142,69 @@ exe active_msgs
: active_msgs.cpp
;

exe active_msgs_over_file
: active_msgs_over_file.cpp boost_program_options
;

exe ham_offload
: ham_offload.cpp ham_offload_scif boost_program_options
: ham_offload.cpp ham_offload_mpi_rma_dyn boost_program_options
# : <library>/mpi//mpi <define>HAM_COMM_MPI
: <library>scif <define>HAM_COMM_SCIF
: <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC
# : <library>scif <define>HAM_COMM_SCIF
;

exe ham_offload_explicit
: ham_offload_explicit.cpp ham_offload_mpi_explicit boost_program_options
: <library>/mpi//mpi <define>HAM_COMM_MPI
: ham_offload_explicit.cpp ham_offload_mpi_rma_dyn_explicit boost_program_options
# : <library>/mpi//mpi <define>HAM_COMM_MPI
: <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC
# : <library>scif <define>HAM_COMM_SCIF
;

exe inner_product_scif
: [ obj inner_product_obj : inner_product.cpp : <library>scif <define>HAM_COMM_SCIF ] ham_offload_scif boost_program_options
: <library>scif <define>HAM_COMM_SCIF
;
# exe inner_product_scif
# : [ obj inner_product_obj : inner_product.cpp : <library>scif <define>HAM_COMM_SCIF ] ham_offload_scif boost_program_options
# : <library>scif <define>HAM_COMM_SCIF
# ;

exe inner_product_mpi
: [ obj inner_product_obj : inner_product.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI ] ham_offload_mpi boost_program_options
: <library>/mpi//mpi <define>HAM_COMM_MPI
;

#
exe test_data_transfer_scif
: [ obj test_data_transfer_obj : test_data_transfer.cpp : <library>scif <define>HAM_COMM_SCIF ] ham_offload_scif boost_program_options
: <library>scif <define>HAM_COMM_SCIF
;
exe inner_product_mpi_rma_dynamic
: [ obj inner_product_obj : inner_product.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC ] ham_offload_mpi_rma_dyn boost_program_options
: <library>/mpi//mpi <cflags>-g <define>HAM_COMM_MPI_RMA_DYNAMIC
;

# exe test_data_transfer_scif
# : [ obj test_data_transfer_obj : test_data_transfer.cpp : <library>scif <define>HAM_COMM_SCIF ] ham_offload_scif boost_program_options
# : <library>scif <define>HAM_COMM_SCIF
# ;

exe test_data_transfer_mpi
: [ obj test_data_transfer_obj : test_data_transfer.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI ] ham_offload_mpi boost_program_options
: <library>/mpi//mpi <define>HAM_COMM_MPI
;


exe test_argument_transfer_scif
: [ obj test_argument_transfer_obj : test_argument_transfer.cpp : <library>scif <define>HAM_COMM_SCIF ] ham_offload_scif boost_program_options
: <library>scif <define>HAM_COMM_SCIF
exe test_data_transfer_mpi_rma_dynamic
: [ obj test_data_transfer_obj : test_data_transfer.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC ] ham_offload_mpi_rma_dyn boost_program_options
: <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC
;

# exe test_argument_transfer_scif
# : [ obj test_argument_transfer_obj : test_argument_transfer.cpp : <library>scif <define>HAM_COMM_SCIF ] ham_offload_scif boost_program_options
# : <library>scif <define>HAM_COMM_SCIF
# ;

exe test_argument_transfer_mpi
: [ obj test_argument_transfer_obj : test_argument_transfer.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI ] ham_offload_mpi boost_program_options
: <library>/mpi//mpi <define>HAM_COMM_MPI
;

exe test_argument_transfer_mpi_rma_dynamic
: [ obj test_argument_transfer_obj : test_argument_transfer.cpp : <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC ] ham_offload_mpi_rma_dyn boost_program_options
: <library>/mpi//mpi <define>HAM_COMM_MPI_RMA_DYNAMIC
;

# Explicit targets (not built by default)
explicit benchmark_intel_leo ;
explicit test_data_transfer_scif ;
# explicit test_data_transfer_scif ;
2 changes: 2 additions & 0 deletions include/ham/misc/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ namespace constants {
enum net {
MSG_SIZE = HAM_MESSAGE_SIZE,
MSG_BUFFERS = 256,
DATA_PUT_CODE = 1,
DATA_GET_CODE = 2,
};

enum arch {
Expand Down
4 changes: 2 additions & 2 deletions include/ham/misc/migratable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ class migratable
//: value(std::forward<T>(arg)) // NOTE: compatible types are allowed
: value(std::forward<Compatible>(arg)) // NOTE: compatible types are allowed
{
// std::cout << "migratable-ctor: " << value << std::endl;
// std::cout << "migratable-ctor: " << value << std::endl;
}

operator const T& () const
{
// std::cout << "migratable-conversion: " << value << std::endl;
// std::cout << "migratable-conversion: " << value << std::endl;
return value;
}
private:
Expand Down
6 changes: 5 additions & 1 deletion include/ham/misc/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
#include <algorithm>
#include <cstddef>

#include "ham/misc/migratable.hpp"

namespace ham {

typedef size_t node_t; // node type, e.g. MPI rank, identifies remote target process
typedef size_t flag_t; // MPI RMA completion flag / buffer index
typedef char byte_t;
typedef char* msg_buffer_t; // buffer type for messages

namespace net {
Expand All @@ -29,7 +33,7 @@ class result_container
T get() { return T(std::move(res)); }

private:
T res;
migratable<T> res;
};

template<>
Expand Down
17 changes: 15 additions & 2 deletions include/ham/net/communicator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ namespace net {
{
char data[constants::MSG_SIZE];
};


struct
msg_flag_buffer
{
// buffer for fully rma backend. windows will consist of several of those
char msg[constants::MSG_SIZE];
flag_t flag;
};

node_t this_node();
}
Expand All @@ -49,8 +56,14 @@ namespace net {
#elif defined HAM_COMM_SCIF
#define HAM_COMM_ONE_SIDED
#include "ham/net/communicator_scif.hpp"
#elif defined HAM_COMM_MPI_RMA_DYNAMIC
#include "ham/net/communicator_mpi_rma_dynamic.hpp"
#elif defined HAM_COMM_MPI_RMA_DYNAMIC_DATA_ONLY
#include "ham/net/communicator_mpi_rma_dynamic_data_only.hpp"
#elif defined HAM_COMM_TCP
#include "ham/net/communicator_tcp.hpp"
#else
static_assert(false, "Please define either HAM_COMM_MPI, or HAM_COMM_SCIF.");
static_assert(false, "Please define either HAM_COMM_MPI, HAM_COMM_SCIF, HAM_COMM_MPI_RMA_DYNAMIC, HAM_COMM_MPI_RMA_DYNAMIC_DATA_ONLY or HAM_COMM_TCP");
#endif

#endif // ham_net_communicator_hpp
Loading