From: Arnaud Legrand Date: Mon, 4 Feb 2013 09:53:17 +0000 (+0100) Subject: Add a new test on availability for the SimDAG API. X-Git-Tag: v3_9_90~510^2~55 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8d28f426ad63dda86cb4b558c13140240ba503d0 Add a new test on availability for the SimDAG API. Issue was reported by Ricardo Rodriguez on 29/12/12 and fixed in previous commits. --- diff --git a/buildtools/Cmake/AddTests.cmake b/buildtools/Cmake/AddTests.cmake index 8c8a2afca3..ca4830cdd2 100644 --- a/buildtools/Cmake/AddTests.cmake +++ b/buildtools/Cmake/AddTests.cmake @@ -106,6 +106,7 @@ if(NOT enable_memcheck) ADD_TEST(tesh-simdag-mxn-3 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn/test_intra_scatter.tesh) ADD_TEST(tesh-simdag-par-1 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask/test_comp_only_seq.tesh) ADD_TEST(tesh-simdag-par-2 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask/test_comp_only_par.tesh) + ADD_TEST(tesh-simdag-availability ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/availability/availability_test.tesh) # MSG examples ADD_TEST(msg-file ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/ --setenv srcdir=${CMAKE_HOME_DIRECTORY}/ --cd ${CMAKE_HOME_DIRECTORY}/examples/ ${CMAKE_HOME_DIRECTORY}/examples/msg/io/io.tesh) diff --git a/buildtools/Cmake/DefinePackages.cmake b/buildtools/Cmake/DefinePackages.cmake index b49c63cb41..090b6e7037 100644 --- a/buildtools/Cmake/DefinePackages.cmake +++ b/buildtools/Cmake/DefinePackages.cmake @@ -794,6 +794,7 @@ set(TESHSUITE_CMAKEFILES_TXT teshsuite/simdag/network/p2p/CMakeLists.txt teshsuite/simdag/partask/CMakeLists.txt teshsuite/simdag/platforms/CMakeLists.txt + teshsuite/simdag/availability/CMakeLists.txt teshsuite/xbt/CMakeLists.txt teshsuite/smpi/CMakeLists.txt teshsuite/smpi/mpich-test/CMakeLists.txt diff --git a/buildtools/Cmake/MakeExe.cmake b/buildtools/Cmake/MakeExe.cmake index 1ca6822fc6..9cf775f5ea 100644 --- a/buildtools/Cmake/MakeExe.cmake +++ b/buildtools/Cmake/MakeExe.cmake @@ -22,6 +22,7 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms) +add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/availability) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/env) diff --git a/teshsuite/simdag/availability/CMakeLists.txt b/teshsuite/simdag/availability/CMakeLists.txt new file mode 100644 index 0000000000..a866b6d9a8 --- /dev/null +++ b/teshsuite/simdag/availability/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 2.6) + +set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}") + +add_executable(availability_test availability_test.c) + +### Add definitions for compile +if(NOT WIN32) + target_link_libraries(availability_test simgrid m) +else() + target_link_libraries(availability_test simgrid) +endif() + +set(tesh_files + ${tesh_files} + ${CMAKE_CURRENT_SOURCE_DIR}/availability_test.tesh + PARENT_SCOPE + ) +set(xml_files + ${xml_files} + ${CMAKE_CURRENT_SOURCE_DIR}/simulacrum_7_hosts.xml + PARENT_SCOPE + ) +set(teshsuite_src + ${teshsuite_src} + ${CMAKE_CURRENT_SOURCE_DIR}/availability_test.c + PARENT_SCOPE + ) +set(bin_files + ${bin_files} + PARENT_SCOPE + ) +set(txt_files + ${txt_files} + ${CMAKE_CURRENT_SOURCE_DIR}/linkBandwidth7.bw + PARENT_SCOPE + ) diff --git a/teshsuite/simdag/availability/availability_test.c b/teshsuite/simdag/availability/availability_test.c new file mode 100644 index 0000000000..1fb03f480d --- /dev/null +++ b/teshsuite/simdag/availability/availability_test.c @@ -0,0 +1,177 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +typedef struct { + FILE *daxFile; + FILE *envFile; +} XMLfiles; + + +static void usage(char *name) +{ + fprintf(stdout, "Error on parameters.\n"); + fprintf(stdout, "usage: %s \n", name); +} + +static void checkParameters(int argc, char *argv[]) +{ + if (argc != 3) { + int i; + printf("====%d===\n",argc); + for(i=0; i [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304' +> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07 +> Scheduling DAX... +> Scheduling root to node: Host 26 +> Scheduling ID00000@mProjectPP to node: Host 27 +> Scheduling ID00001@mProjectPP to node: Host 28 +> Scheduling ID00002@mProjectPP to node: Host 29 +> Scheduling ID00003@mProjectPP to node: Host 30 +> Scheduling ID00004@mProjectPP to node: Host 31 +> Scheduling ID00005@mDiffFit to node: Host 32 +> Scheduling ID00006@mDiffFit to node: Host 26 +> Scheduling ID00007@mDiffFit to node: Host 27 +> Scheduling ID00008@mDiffFit to node: Host 28 +> Scheduling ID00009@mDiffFit to node: Host 29 +> Scheduling ID00010@mDiffFit to node: Host 30 +> Scheduling ID00011@mDiffFit to node: Host 31 +> Scheduling ID00012@mDiffFit to node: Host 32 +> Scheduling ID00013@mDiffFit to node: Host 26 +> Scheduling ID00014@mConcatFit to node: Host 27 +> Scheduling ID00015@mBgModel to node: Host 28 +> Scheduling ID00016@mBackground to node: Host 29 +> Scheduling ID00017@mBackground to node: Host 30 +> Scheduling ID00018@mBackground to node: Host 31 +> Scheduling ID00019@mBackground to node: Host 32 +> Scheduling ID00020@mBackground to node: Host 26 +> Scheduling ID00021@mImgTbl to node: Host 27 +> Scheduling ID00022@mAdd to node: Host 28 +> Scheduling ID00023@mShrink to node: Host 29 +> Scheduling ID00024@mJPEG to node: Host 30 +> Scheduling end to node: Host 26 +> DAX scheduled +> Simulation end. Time: 164.052870 + diff --git a/teshsuite/simdag/availability/linkBandwidth7.bw b/teshsuite/simdag/availability/linkBandwidth7.bw new file mode 100644 index 0000000000..34a24c324b --- /dev/null +++ b/teshsuite/simdag/availability/linkBandwidth7.bw @@ -0,0 +1,5 @@ +PERIODICITY 8.0 +1.007044263744508 6.846527733924368E7 +4.199387092709633 1.0335587797993976E8 +5.319464737378834 1.0591433767387845E7 +7.237437222882919 7.037797434537312E7 diff --git a/teshsuite/simdag/availability/simulacrum_7_hosts.xml b/teshsuite/simdag/availability/simulacrum_7_hosts.xml new file mode 100644 index 0000000000..835e3127e8 --- /dev/null +++ b/teshsuite/simdag/availability/simulacrum_7_hosts.xml @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +