Loading CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ mark_as_advanced(CLIENT_LOG_MESSAGE_SIZE) option(GKFS_USE_GUIDED_DISTRIBUTION "Use guided data distributor " OFF) message(STATUS "[gekkofs] Guided data distributor: ${GKFS_USE_GUIDED_DISTRIBUTION}") set(GKFS_USE_GUIDED_DISTRIBUTION_PATH "guided.txt" CACHE STRING "File Path for guided distributor") set(GKFS_USE_GUIDED_DISTRIBUTION_PATH "/tmp/guided.txt" CACHE STRING "File Path for guided distributor") set_property(CACHE GKFS_USE_GUIDED_DISTRIBUTION_PATH PROPERTY STRINGS) message(STATUS "[gekkofs] Guided data distributor input file path: ${GKFS_USE_GUIDED_DISTRIBUTION_PATH}") Loading scripts/compile_dep.sh +1 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,7 @@ if check_dependency "ofi" "${DEP_CONFIG[@]}"; then cd ${CURR} ./autogen.sh cd ${CURR}/build OFI_CONFIG="../configure --prefix=${INSTALL} --enable-tcp=yes --enable-efa=no" OFI_CONFIG="../configure --prefix=${INSTALL} --enable-tcp=yes" if check_dependency "verbs" "${DEP_CONFIG[@]}"; then OFI_CONFIG="${OFI_CONFIG} --enable-verbs=yes" elif check_dependency "psm2" "${DEP_CONFIG[@]}"; then Loading tests/unit/CMakeLists.txt +4 −2 Original line number Diff line number Diff line Loading @@ -34,11 +34,13 @@ target_link_libraries(catch2_main add_executable(tests test_example_00.cpp test_example_01.cpp test_guided_distributor.cpp ) target_link_libraries(tests catch2_main fmt::fmt distributor ) # Catch2's contrib folder includes some helper functions Loading tests/unit/test_guided_distributor.cpp 0 → 100644 +44 −0 Original line number Diff line number Diff line /* Copyright 2018-2020, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2020, Johannes Gutenberg Universitaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the SPPEXA project funded by the DFG. SPDX-License-Identifier: MIT */ #include <catch2/catch.hpp> #include <fmt/format.h> #include <global/rpc/distributor.hpp> TEST_CASE( "Guided distributor Testing", "[Distributor]" ) { GIVEN( "A distributor" ) { auto d = gkfs::rpc::GuidedDistributor(); REQUIRE( d.locate_data("/t.c01",1,10) == 3 ); REQUIRE( d.locate_data("/t.c02",1,10) == 3 ); REQUIRE( d.locate_data("/t.c03",1,10) == 3 ); REQUIRE( d.locate_data("/t.c04",1,10) == 3 ); REQUIRE( d.locate_data("/t.c05",1,10) == 3 ); REQUIRE( d.locate_data("/t.c06",1,10) == 3 ); REQUIRE( d.locate_data("/t.c07",1,10) == 3 ); // Next result is random ? REQUIRE ( (d.locate_data("/t.c01",5,10) + d.locate_data("/t.c02",5,10) + d.locate_data("/t.c03",5,10) + d.locate_data("/t.c04",5,10) + d.locate_data("/t.c05",5,10) + d.locate_data("/t.c06",5,10) + d.locate_data("/t.c07",5,10) ) == 42); } } Loading
CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ mark_as_advanced(CLIENT_LOG_MESSAGE_SIZE) option(GKFS_USE_GUIDED_DISTRIBUTION "Use guided data distributor " OFF) message(STATUS "[gekkofs] Guided data distributor: ${GKFS_USE_GUIDED_DISTRIBUTION}") set(GKFS_USE_GUIDED_DISTRIBUTION_PATH "guided.txt" CACHE STRING "File Path for guided distributor") set(GKFS_USE_GUIDED_DISTRIBUTION_PATH "/tmp/guided.txt" CACHE STRING "File Path for guided distributor") set_property(CACHE GKFS_USE_GUIDED_DISTRIBUTION_PATH PROPERTY STRINGS) message(STATUS "[gekkofs] Guided data distributor input file path: ${GKFS_USE_GUIDED_DISTRIBUTION_PATH}") Loading
scripts/compile_dep.sh +1 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,7 @@ if check_dependency "ofi" "${DEP_CONFIG[@]}"; then cd ${CURR} ./autogen.sh cd ${CURR}/build OFI_CONFIG="../configure --prefix=${INSTALL} --enable-tcp=yes --enable-efa=no" OFI_CONFIG="../configure --prefix=${INSTALL} --enable-tcp=yes" if check_dependency "verbs" "${DEP_CONFIG[@]}"; then OFI_CONFIG="${OFI_CONFIG} --enable-verbs=yes" elif check_dependency "psm2" "${DEP_CONFIG[@]}"; then Loading
tests/unit/CMakeLists.txt +4 −2 Original line number Diff line number Diff line Loading @@ -34,11 +34,13 @@ target_link_libraries(catch2_main add_executable(tests test_example_00.cpp test_example_01.cpp test_guided_distributor.cpp ) target_link_libraries(tests catch2_main fmt::fmt distributor ) # Catch2's contrib folder includes some helper functions Loading
tests/unit/test_guided_distributor.cpp 0 → 100644 +44 −0 Original line number Diff line number Diff line /* Copyright 2018-2020, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2020, Johannes Gutenberg Universitaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the SPPEXA project funded by the DFG. SPDX-License-Identifier: MIT */ #include <catch2/catch.hpp> #include <fmt/format.h> #include <global/rpc/distributor.hpp> TEST_CASE( "Guided distributor Testing", "[Distributor]" ) { GIVEN( "A distributor" ) { auto d = gkfs::rpc::GuidedDistributor(); REQUIRE( d.locate_data("/t.c01",1,10) == 3 ); REQUIRE( d.locate_data("/t.c02",1,10) == 3 ); REQUIRE( d.locate_data("/t.c03",1,10) == 3 ); REQUIRE( d.locate_data("/t.c04",1,10) == 3 ); REQUIRE( d.locate_data("/t.c05",1,10) == 3 ); REQUIRE( d.locate_data("/t.c06",1,10) == 3 ); REQUIRE( d.locate_data("/t.c07",1,10) == 3 ); // Next result is random ? REQUIRE ( (d.locate_data("/t.c01",5,10) + d.locate_data("/t.c02",5,10) + d.locate_data("/t.c03",5,10) + d.locate_data("/t.c04",5,10) + d.locate_data("/t.c05",5,10) + d.locate_data("/t.c06",5,10) + d.locate_data("/t.c07",5,10) ) == 42); } }