From 43e4a0d7783db2c7cf10564c2fcec9d118599992 Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Tue, 21 Jul 2020 08:22:09 -0400 Subject: [PATCH 1/5] Add WANDataTransport param to SST --- source/adios2/toolkit/sst/cp/cp_reader.c | 2 +- source/adios2/toolkit/sst/dp/evpath_dp.c | 14 +++++++++++--- source/adios2/toolkit/sst/sst_data.h | 1 + .../adios2/engine/staging-common/CMakeLists.txt | 8 +++++++- .../adios2/engine/staging-common/TestSupp.cmake | 2 ++ 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/source/adios2/toolkit/sst/cp/cp_reader.c b/source/adios2/toolkit/sst/cp/cp_reader.c index 0d804265fb..d5bdb44850 100644 --- a/source/adios2/toolkit/sst/cp/cp_reader.c +++ b/source/adios2/toolkit/sst/cp/cp_reader.c @@ -412,7 +412,7 @@ attr_list ContactWriter(SstStream Stream, char *Filename, SstParams Params, } if (conn) { - DataSize = strlen(CMContactString); + DataSize = strlen(CMContactString) + 1; *conn_p = conn; } else diff --git a/source/adios2/toolkit/sst/dp/evpath_dp.c b/source/adios2/toolkit/sst/dp/evpath_dp.c index 73601c7623..30450148f3 100644 --- a/source/adios2/toolkit/sst/dp/evpath_dp.c +++ b/source/adios2/toolkit/sst/dp/evpath_dp.c @@ -277,9 +277,17 @@ static DP_RS_Stream EvpathInitReader(CP_Services Svcs, void *CP_Stream, SMPI_Comm_rank(comm, &Stream->Rank); - set_string_attr(ListenAttrs, attr_atom_from_string("CM_TRANSPORT"), - strdup("sockets")); - + if (Params->WANDataTransport) + { + set_string_attr(ListenAttrs, attr_atom_from_string("CM_TRANSPORT"), + strdup(Params->WANDataTransport)); + } + else + { + set_string_attr(ListenAttrs, attr_atom_from_string("CM_TRANSPORT"), + strdup("sockets")); + } + if (Params->DataInterface) { set_string_attr(ListenAttrs, attr_atom_from_string("IP_INTERFACE"), diff --git a/source/adios2/toolkit/sst/sst_data.h b/source/adios2/toolkit/sst/sst_data.h index 1b988b53a8..cc1baf96c8 100644 --- a/source/adios2/toolkit/sst/sst_data.h +++ b/source/adios2/toolkit/sst/sst_data.h @@ -29,6 +29,7 @@ struct _SstBlock MACRO(MarshalMethod, MarshalMethod, size_t, SstMarshalBP) \ MACRO(RegistrationMethod, RegMethod, size_t, 0) \ MACRO(DataTransport, String, char *, NULL) \ + MACRO(WANDataTransport, String, char *, NULL) \ MACRO(OpenTimeoutSecs, Int, int, 60) \ MACRO(RendezvousReaderCount, Int, int, 1) \ MACRO(QueueLimit, Int, int, 0) \ diff --git a/testing/adios2/engine/staging-common/CMakeLists.txt b/testing/adios2/engine/staging-common/CMakeLists.txt index 2c3e8eb24c..7d7053b63f 100644 --- a/testing/adios2/engine/staging-common/CMakeLists.txt +++ b/testing/adios2/engine/staging-common/CMakeLists.txt @@ -125,12 +125,18 @@ endif() set (ALL_SIMPLE_TESTS "") list (APPEND ALL_SIMPLE_TESTS ${SIMPLE_TESTS} ${SIMPLE_FORTRAN_TESTS} ${SIMPLE_MPI_TESTS} ${SIMPLE_ZFP_TESTS}) +set (SST_SPECIFIC_TESTS "") +list (APPEND SST_SPECIFIC_TESTS "1x1.SstRUDP") +if (ADIOS2_HAVE_MPI) + list (APPEND SST_SPECIFIC_TESTS "2x3.SstRUDP") +endif() + # # Setup tests for SST engine # SET (BASIC_SST_TESTS "") if(ADIOS2_HAVE_SST) - list (APPEND BASIC_SST_TESTS ${ALL_SIMPLE_TESTS} ${SPECIAL_TESTS}) + list (APPEND BASIC_SST_TESTS ${ALL_SIMPLE_TESTS} ${SPECIAL_TESTS} ${SST_SPECIFIC_TESTS}) endif() diff --git a/testing/adios2/engine/staging-common/TestSupp.cmake b/testing/adios2/engine/staging-common/TestSupp.cmake index bb24cc2e19..a518aae7be 100644 --- a/testing/adios2/engine/staging-common/TestSupp.cmake +++ b/testing/adios2/engine/staging-common/TestSupp.cmake @@ -64,6 +64,7 @@ set (STAGING_COMMON_TEST_SUPP_VERBOSE OFF) set (1x1_CMD "run_test.py.$ -nw 1 -nr 1") set (1x1.NoPreload_CMD "run_test.py.$ -nw 1 -nr 1 --rarg=PreloadMode=SstPreloadNone,RENGINE_PARAMS") +set (1x1.SstRUDP_CMD "run_test.py.$ -nw 1 -nr 1 --rarg=DataTransport=WAN,WANDataTransport=enet,RENGINE_PARAMS --warg=DataTransport=WAN,WANDataTransport=enet,WENGINE_PARAMS") set (1x1.NoData_CMD "run_test.py.$ -nw 1 -nr 1 --warg=--no_data --rarg=--no_data") set (2x2.NoData_CMD "run_test.py.$ -nw 2 -nr 2 --warg=--no_data --rarg=--no_data") set (2x2.HalfNoData_CMD "run_test.py.$ -nw 2 -nr 2 --warg=--no_data --warg=--no_data_node --warg=1 --rarg=--no_data --rarg=--no_data_node --rarg=1" ) @@ -75,6 +76,7 @@ set (2x1ZeroDataVar_CMD "run_test.py.$ -nw 2 -nr 1 --warg=--zero_data_va set (2x1ZeroDataR64_CMD "run_test.py.$ -nw 2 -nr 1 -r $ --warg=--zero_data_var") set (2x1.NoPreload_CMD "run_test.py.$ -nw 2 -nr 1 --rarg=PreloadMode=SstPreloadNone,RENGINE_PARAMS") set (2x3.ForcePreload_CMD "run_test.py.$ -nw 2 -nr 3 --rarg=PreloadMode=SstPreloadOn,RENGINE_PARAMS") +set (2x3.SstRUDP_CMD "run_test.py.$ -nw 2 -nr 3 --rarg=DataTransport=WAN,WANDataTransport=enet,RENGINE_PARAMS --warg=DataTransport=WAN,WANDataTransport=enet,WENGINE_PARAMS") set (1x2_CMD "run_test.py.$ -nw 1 -nr 2") set (3x5_CMD "run_test.py.$ -nw 3 -nr 5") set (3x5LockGeometry_CMD "run_test.py.$ -nw 3 -nr 5 --warg=--num_steps --warg=50 --warg=--ms_delay --warg=10 --rarg=--num_steps --rarg=50 --warg=--lock_geometry --rarg=--lock_geometry") From c2facd33beca8c27aee1abd8bc71b8e810b4175a Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Tue, 21 Jul 2020 08:46:15 -0400 Subject: [PATCH 2/5] Clang-format and add docs --- docs/user_guide/source/engines/sst.rst | 8 ++++++++ source/adios2/toolkit/sst/dp/evpath_dp.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/user_guide/source/engines/sst.rst b/docs/user_guide/source/engines/sst.rst index bb85da1f36..18f156d4a6 100644 --- a/docs/user_guide/source/engines/sst.rst +++ b/docs/user_guide/source/engines/sst.rst @@ -168,6 +168,14 @@ applications running on different interconnects, the Wide Area Network (WAN) option should be chosen. This value is interpreted by both SST Writer and Reader engines. +6. ``WANDataTransport``: Default **sockets**. If the SST +**DataTransport** parameter is **"WAN**, this string value specifies +the EVPath-level data transport to use for exchanging data. The value +must be a data transport known to EVPath, such as **"sockets"**, +**"enet"**, or **"ib"**. Generally both the reader and writer should +be using the same EVPath-level data transport. This value is +interpreted by both SST Writer and Reader engines. + 7. ``ControlTransport``: Default **tcp**. This string value specifies the underlying network communication mechanism to use for performing control operations in SST. SST can be configured to standard TCP diff --git a/source/adios2/toolkit/sst/dp/evpath_dp.c b/source/adios2/toolkit/sst/dp/evpath_dp.c index 30450148f3..a77414d85f 100644 --- a/source/adios2/toolkit/sst/dp/evpath_dp.c +++ b/source/adios2/toolkit/sst/dp/evpath_dp.c @@ -287,7 +287,7 @@ static DP_RS_Stream EvpathInitReader(CP_Services Svcs, void *CP_Stream, set_string_attr(ListenAttrs, attr_atom_from_string("CM_TRANSPORT"), strdup("sockets")); } - + if (Params->DataInterface) { set_string_attr(ListenAttrs, attr_atom_from_string("IP_INTERFACE"), From 4d631564d2340a6fb3ab4991d94ba3cd3674efe8 Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Tue, 21 Jul 2020 09:24:49 -0400 Subject: [PATCH 3/5] Better job on the docs fix --- docs/user_guide/source/engines/sst.rst | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/user_guide/source/engines/sst.rst b/docs/user_guide/source/engines/sst.rst index 18f156d4a6..39a1f4cbd4 100644 --- a/docs/user_guide/source/engines/sst.rst +++ b/docs/user_guide/source/engines/sst.rst @@ -168,7 +168,7 @@ applications running on different interconnects, the Wide Area Network (WAN) option should be chosen. This value is interpreted by both SST Writer and Reader engines. -6. ``WANDataTransport``: Default **sockets**. If the SST +7. ``WANDataTransport``: Default **sockets**. If the SST **DataTransport** parameter is **"WAN**, this string value specifies the EVPath-level data transport to use for exchanging data. The value must be a data transport known to EVPath, such as **"sockets"**, @@ -176,7 +176,7 @@ must be a data transport known to EVPath, such as **"sockets"**, be using the same EVPath-level data transport. This value is interpreted by both SST Writer and Reader engines. -7. ``ControlTransport``: Default **tcp**. This string value specifies +8. ``ControlTransport``: Default **tcp**. This string value specifies the underlying network communication mechanism to use for performing control operations in SST. SST can be configured to standard TCP sockets, which are very reliable and efficient, but which are limited @@ -188,7 +188,7 @@ equivalent to **scalable**. Generally both the reader and writer should be using the same control transport. This value is interpreted by both SST Writer and Reader engines. -8. ``NetworkInterface``: Default **NULL**. In situations in which +9. ``NetworkInterface``: Default **NULL**. In situations in which there are multiple possible network interfaces available to SST, this string value specifies which should be used to generate SST's contact information for writers. Generally this should *NOT* be specified @@ -201,14 +201,14 @@ will result in SST generating contact information that uses the network address associated with the loopback interface (127.0.0.1). This value is interpreted by only by the SST Writer engine. -9. ``ControlInterface``: Default **NULL**. This value is similar to the +10. ``ControlInterface``: Default **NULL**. This value is similar to the NetworkInterface parameter, but only applies to the SST layer which does messaging for control (open, close, flow and timestep management, but not actual data transfer). Generally the NetworkInterface parameter can be used to control this, but that also aplies to the Data Plane. Use ControlInterface in the event of conflicting specifications. -10. ``DataInterface``: Default **NULL**. This value is similar to the +11. ``DataInterface``: Default **NULL**. This value is similar to the NetworkInterface parameter, but only applies to the SST layer which does messaging for data transfer, not control (open, close, flow and timestep management). Generally the NetworkInterface parameter can be used to @@ -216,7 +216,7 @@ control this, but that also aplies to the Control Plane. Use DataInterface in the event of conflicting specifications. In the case of the RDMA data plane, this parameter controls the libfabric interface choice. -11. ``FirstTimestepPrecious``: Default **FALSE**. +12. ``FirstTimestepPrecious``: Default **FALSE**. FirstTimestepPrecious is a boolean parameter that affects the queueing of the first timestep presented to the SST Writer engine. If FirstTimestepPrecious is **TRUE***, then the first timestep is @@ -232,7 +232,7 @@ other reader-side operations (like requesting the LatestAvailable timestep in Engine parameters) might still cause the timestep to be skipped. This value is interpreted by only by the SST Writer engine. -12. ``AlwaysProvideLatestTimestep``: Default **FALSE**. +13. ``AlwaysProvideLatestTimestep``: Default **FALSE**. AlwaysProvideLatestTimestep is a boolean parameter that affects what of the available timesteps will be provided to the reader engine. If AlwaysProvideLatestTimestep is **TRUE***, then if there are multiple @@ -240,14 +240,14 @@ timesteps available to the reader, older timesteps will be skipped and the reader will see only the newest available upon BeginStep. This value is interpreted by only by the SST Reader engine. -13. ``OpenTimeoutSecs``: Default **60**. OpenTimeoutSecs is an integer +14. ``OpenTimeoutSecs``: Default **60**. OpenTimeoutSecs is an integer parameter that specifies the number of seconds SST is to wait for a peer connection on Open(). Currently this is only implemented on the Reader side of SST, and is a timeout for locating the contact information file created by Writer-side Open, not for completing the entire Open() handshake. Currently value is interpreted by only by the SST Reader engine. -14. ``SpeculativePreloadMode``: Default **AUTO**. In some +15. ``SpeculativePreloadMode``: Default **AUTO**. In some circumstances, SST eagerly sends all data from writers to every readers without first waiting for read requests. Generally this improves performance if every reader needs all the data, but can be @@ -260,7 +260,7 @@ is less than or equal to the value of the ``SpecAutoNodeThreshold`` engine parameter (Default value 1), eager sending is initiated. Currently value is interpreted by only by the SST Reader engine. -15. ``SpecAutoNodeThreshold``: Default **1**. If the size of the +16. ``SpecAutoNodeThreshold``: Default **1**. If the size of the reader cohort is less than or equal to this value *and* the ``SpeculativePreloadMode`` parameter is **AUTO**, SST will initiate eager data sending of all data from each writer to all readers. @@ -276,6 +276,7 @@ Currently value is interpreted by only by the SST Reader engine. QueueFullPolicy string **Block**, Discard ReserveQueueLimit integer **0** (no queue limits) DataTransport string **default varies by platform**, RDMA, WAN + WANDataTransport string **sockets**, enet, ib ControlTransport string **TCP**, Scalable NetworkInterface string **NULL** ControlInterface string **NULL** From fa7e16b4671c16919b1c11ce1c5f71632df076c8 Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Tue, 21 Jul 2020 11:59:28 -0400 Subject: [PATCH 4/5] Free WANDataTransport param --- source/adios2/toolkit/sst/cp/cp_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/adios2/toolkit/sst/cp/cp_common.c b/source/adios2/toolkit/sst/cp/cp_common.c index e796347b31..67d91d9526 100644 --- a/source/adios2/toolkit/sst/cp/cp_common.c +++ b/source/adios2/toolkit/sst/cp/cp_common.c @@ -1115,7 +1115,9 @@ extern void SstStreamDestroy(SstStream Stream) } if (Stream->ConfigParams->DataTransport) free(Stream->ConfigParams->DataTransport); - if (Stream->ConfigParams->DataTransport) + if (Stream->ConfigParams->WANDataTransport) + free(Stream->ConfigParams->WANDataTransport); + if (Stream->ConfigParams->ControlTransport) free(Stream->ConfigParams->ControlTransport); if (Stream->ConfigParams->NetworkInterface) free(Stream->ConfigParams->NetworkInterface); From f6b1a67d4837baaeb851414285bef13a34adfd89 Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Tue, 21 Jul 2020 12:50:30 -0400 Subject: [PATCH 5/5] another undiscovered leak --- source/adios2/toolkit/sst/cp/cp_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/adios2/toolkit/sst/cp/cp_common.c b/source/adios2/toolkit/sst/cp/cp_common.c index 67d91d9526..2ded97150c 100644 --- a/source/adios2/toolkit/sst/cp/cp_common.c +++ b/source/adios2/toolkit/sst/cp/cp_common.c @@ -50,6 +50,8 @@ void CP_validateParams(SstStream Stream, SstParams Params, int Writer) SelectedTransport[i] = tolower(Params->DataTransport[i]); } SelectedTransport[i] = 0; + /* free old */ + free(Params->DataTransport); /* canonicalize SelectedTransport */ if ((strcmp(SelectedTransport, "wan") == 0) ||