Loading ifs/scripts/compile_dep.sh +0 −2 Original line number Diff line number Diff line Loading @@ -289,8 +289,6 @@ echo "############################################################ Installing: CURR=${SOURCE}/margo prepare_build_dir ${CURR} cd ${CURR} echo "########## Applying allow init option path" git apply ${PATCH_DIR}/margo_allow_init_options.patch ./prepare.sh cd ${CURR}/build ../configure --prefix=${INSTALL} PKG_CONFIG_PATH=${INSTALL}/lib/pkgconfig CFLAGS="-Wall -O3" Loading ifs/scripts/dl_dep.sh +1 −1 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ clonedeps "mercury" "https://github.com/mercury-hpc/mercury" "v1.0.0" "--recurs # get Argobots wgetdeps "argobots" "https://github.com/pmodels/argobots/archive/v1.0rc1.tar.gz" & # get Margo clonedeps "margo" "https://xgitlab.cels.anl.gov/sds/margo.git" "2676c8cf61874c4378ed699e3ca056636a4e152b" & clonedeps "margo" "https://xgitlab.cels.anl.gov/sds/margo.git" "acb8c296a694d7e3e06756e7a102a9d1c92df0c8" & # get rocksdb wgetdeps "rocksdb" "https://github.com/facebook/rocksdb/archive/v5.15.10.tar.gz" & Loading ifs/scripts/patches/margo_allow_init_options.patchdeleted 100644 → 0 +0 −70 Original line number Diff line number Diff line From 0609a71efbc02dc3d65768c9219770277c4329de Mon Sep 17 00:00:00 2001 From: Tommaso Tocci <tommaso@tocci.pro> Date: Thu, 11 Oct 2018 23:46:19 +0200 Subject: [PATCH] Add hg_init_info to margo init --- include/margo.h | 8 ++++++++ src/margo.c | 13 +++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/include/margo.h b/include/margo.h index a5f7587..774b1f6 100644 --- a/include/margo.h +++ b/include/margo.h @@ -46,6 +46,7 @@ typedef ABT_eventual margo_request; /** * Initializes margo library. * @param [in] addr_str Mercury host address with port number + * @param [in] hg_init_info Mercury initialization options * @param [in] mode Mode to run Margo in: * - MARGO_CLIENT_MODE * - MARGO_SERVER_MODE @@ -67,6 +68,13 @@ typedef ABT_eventual margo_request; * call margo_wait_for_finalize() after margo_init() to relinguish control to * Margo. */ +margo_instance_id margo_init_info( + const char *addr_str, + int mode, + const struct hg_init_info *hg_init_info, + int use_progress_thread, + int rpc_thread_count); + margo_instance_id margo_init( const char *addr_str, int mode, diff --git a/src/margo.c b/src/margo.c index ea73fc2..da8f69e 100644 --- a/src/margo.c +++ b/src/margo.c @@ -171,7 +171,16 @@ static hg_return_t margo_handle_cache_put(margo_instance_id mid, static hg_id_t margo_register_internal(margo_instance_id mid, hg_id_t id, hg_proc_cb_t in_proc_cb, hg_proc_cb_t out_proc_cb, hg_rpc_cb_t rpc_cb, ABT_pool pool); -margo_instance_id margo_init(const char *addr_str, int mode, +margo_instance_id margo_init(const char *addr_str, + int mode, + int use_progress_thread, int rpc_thread_count) +{ + return margo_init_info(addr_str, mode, NULL, use_progress_thread, rpc_thread_count); +} + +margo_instance_id margo_init_info(const char *addr_str, + int mode, + const struct hg_init_info *hg_init_info, int use_progress_thread, int rpc_thread_count) { ABT_xstream progress_xstream = ABT_XSTREAM_NULL; @@ -268,7 +277,7 @@ margo_instance_id margo_init(const char *addr_str, int mode, rpc_pool = progress_pool; } - hg_class = HG_Init(addr_str, listen_flag); + hg_class = HG_Init_opt(addr_str, listen_flag, hg_init_info); if(!hg_class) goto err; hg_context = HG_Context_create(hg_class); -- 2.19.1 ifs/src/daemon/adafs_daemon.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -160,7 +160,11 @@ bool init_rpc_server() { hg_options.stats = HG_FALSE; hg_options.na_class = nullptr; // Start Margo (this will also initialize Argobots and Mercury internally) auto mid = margo_init_info(protocol_port.c_str(), MARGO_SERVER_MODE, &hg_options, 1, DAEMON_RPC_HANDLER_XSTREAMS); auto mid = margo_init_opt(protocol_port.c_str(), MARGO_SERVER_MODE, &hg_options, HG_TRUE, DAEMON_RPC_HANDLER_XSTREAMS); if (mid == MARGO_INSTANCE_NULL) { ADAFS_DATA->spdlogger()->error("{}() margo_init failed to initialize the Margo RPC server", __func__); return false; Loading ifs/src/preload/preload.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,11 @@ bool init_margo_client(const std::string& na_plugin) { hg_options.stats = HG_FALSE; hg_options.na_class = nullptr; ld_margo_rpc_id = margo_init_info(na_plugin.c_str(), HG_FALSE, &hg_options, HG_FALSE, 1); ld_margo_rpc_id = margo_init_opt(na_plugin.c_str(), MARGO_CLIENT_MODE, &hg_options, HG_FALSE, 1); if (ld_margo_rpc_id == MARGO_INSTANCE_NULL) { CTX->log()->error("{}() margo_init_pool failed to initialize the Margo client", __func__); return false; Loading Loading
ifs/scripts/compile_dep.sh +0 −2 Original line number Diff line number Diff line Loading @@ -289,8 +289,6 @@ echo "############################################################ Installing: CURR=${SOURCE}/margo prepare_build_dir ${CURR} cd ${CURR} echo "########## Applying allow init option path" git apply ${PATCH_DIR}/margo_allow_init_options.patch ./prepare.sh cd ${CURR}/build ../configure --prefix=${INSTALL} PKG_CONFIG_PATH=${INSTALL}/lib/pkgconfig CFLAGS="-Wall -O3" Loading
ifs/scripts/dl_dep.sh +1 −1 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ clonedeps "mercury" "https://github.com/mercury-hpc/mercury" "v1.0.0" "--recurs # get Argobots wgetdeps "argobots" "https://github.com/pmodels/argobots/archive/v1.0rc1.tar.gz" & # get Margo clonedeps "margo" "https://xgitlab.cels.anl.gov/sds/margo.git" "2676c8cf61874c4378ed699e3ca056636a4e152b" & clonedeps "margo" "https://xgitlab.cels.anl.gov/sds/margo.git" "acb8c296a694d7e3e06756e7a102a9d1c92df0c8" & # get rocksdb wgetdeps "rocksdb" "https://github.com/facebook/rocksdb/archive/v5.15.10.tar.gz" & Loading
ifs/scripts/patches/margo_allow_init_options.patchdeleted 100644 → 0 +0 −70 Original line number Diff line number Diff line From 0609a71efbc02dc3d65768c9219770277c4329de Mon Sep 17 00:00:00 2001 From: Tommaso Tocci <tommaso@tocci.pro> Date: Thu, 11 Oct 2018 23:46:19 +0200 Subject: [PATCH] Add hg_init_info to margo init --- include/margo.h | 8 ++++++++ src/margo.c | 13 +++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/include/margo.h b/include/margo.h index a5f7587..774b1f6 100644 --- a/include/margo.h +++ b/include/margo.h @@ -46,6 +46,7 @@ typedef ABT_eventual margo_request; /** * Initializes margo library. * @param [in] addr_str Mercury host address with port number + * @param [in] hg_init_info Mercury initialization options * @param [in] mode Mode to run Margo in: * - MARGO_CLIENT_MODE * - MARGO_SERVER_MODE @@ -67,6 +68,13 @@ typedef ABT_eventual margo_request; * call margo_wait_for_finalize() after margo_init() to relinguish control to * Margo. */ +margo_instance_id margo_init_info( + const char *addr_str, + int mode, + const struct hg_init_info *hg_init_info, + int use_progress_thread, + int rpc_thread_count); + margo_instance_id margo_init( const char *addr_str, int mode, diff --git a/src/margo.c b/src/margo.c index ea73fc2..da8f69e 100644 --- a/src/margo.c +++ b/src/margo.c @@ -171,7 +171,16 @@ static hg_return_t margo_handle_cache_put(margo_instance_id mid, static hg_id_t margo_register_internal(margo_instance_id mid, hg_id_t id, hg_proc_cb_t in_proc_cb, hg_proc_cb_t out_proc_cb, hg_rpc_cb_t rpc_cb, ABT_pool pool); -margo_instance_id margo_init(const char *addr_str, int mode, +margo_instance_id margo_init(const char *addr_str, + int mode, + int use_progress_thread, int rpc_thread_count) +{ + return margo_init_info(addr_str, mode, NULL, use_progress_thread, rpc_thread_count); +} + +margo_instance_id margo_init_info(const char *addr_str, + int mode, + const struct hg_init_info *hg_init_info, int use_progress_thread, int rpc_thread_count) { ABT_xstream progress_xstream = ABT_XSTREAM_NULL; @@ -268,7 +277,7 @@ margo_instance_id margo_init(const char *addr_str, int mode, rpc_pool = progress_pool; } - hg_class = HG_Init(addr_str, listen_flag); + hg_class = HG_Init_opt(addr_str, listen_flag, hg_init_info); if(!hg_class) goto err; hg_context = HG_Context_create(hg_class); -- 2.19.1
ifs/src/daemon/adafs_daemon.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -160,7 +160,11 @@ bool init_rpc_server() { hg_options.stats = HG_FALSE; hg_options.na_class = nullptr; // Start Margo (this will also initialize Argobots and Mercury internally) auto mid = margo_init_info(protocol_port.c_str(), MARGO_SERVER_MODE, &hg_options, 1, DAEMON_RPC_HANDLER_XSTREAMS); auto mid = margo_init_opt(protocol_port.c_str(), MARGO_SERVER_MODE, &hg_options, HG_TRUE, DAEMON_RPC_HANDLER_XSTREAMS); if (mid == MARGO_INSTANCE_NULL) { ADAFS_DATA->spdlogger()->error("{}() margo_init failed to initialize the Margo RPC server", __func__); return false; Loading
ifs/src/preload/preload.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,11 @@ bool init_margo_client(const std::string& na_plugin) { hg_options.stats = HG_FALSE; hg_options.na_class = nullptr; ld_margo_rpc_id = margo_init_info(na_plugin.c_str(), HG_FALSE, &hg_options, HG_FALSE, 1); ld_margo_rpc_id = margo_init_opt(na_plugin.c_str(), MARGO_CLIENT_MODE, &hg_options, HG_FALSE, 1); if (ld_margo_rpc_id == MARGO_INSTANCE_NULL) { CTX->log()->error("{}() margo_init_pool failed to initialize the Margo client", __func__); return false; Loading