From 93ce0d679f2201528dd037dccf64fbb207c04a33 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20B=C3=A9daride?= Date: Tue, 6 May 2014 15:23:50 +0200 Subject: [PATCH] Fix tesh-simdag-flatifier --- buildtools/Cmake/AddTests.cmake | 1 - src/surf/workstation_ptask_L07.cpp | 10 +++++----- src/surf/workstation_ptask_L07.hpp | 5 ++--- teshsuite/simdag/platforms/flatifier.c | 2 +- teshsuite/simdag/platforms/flatifier.tesh | 10 +++++----- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/buildtools/Cmake/AddTests.cmake b/buildtools/Cmake/AddTests.cmake index 0c4cc437ec..ab1dd931ee 100644 --- a/buildtools/Cmake/AddTests.cmake +++ b/buildtools/Cmake/AddTests.cmake @@ -109,7 +109,6 @@ IF(NOT enable_memcheck) ### SIMIX ### # BEGIN TESH TESTS - # BEGIN CONTEXTS FACTORY IF(HAVE_RAWCTX) ADD_TESH(tesh-simix-factory-default --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check_defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check_defaults factory_raw.tesh) ELSEIF(CONTEXT_UCONTEXT) diff --git a/src/surf/workstation_ptask_L07.cpp b/src/surf/workstation_ptask_L07.cpp index a2b4ac6607..30e25d4f2c 100644 --- a/src/surf/workstation_ptask_L07.cpp +++ b/src/surf/workstation_ptask_L07.cpp @@ -301,7 +301,8 @@ CpuPtr CpuL07Model::createResource(const char *name, xbt_dynar_t powerPeak, name); CpuL07Ptr cpu = new CpuL07(this, name, cpu_properties, - power_initial, power_scale, power_trace,state_initial, state_trace); + power_initial, power_scale, power_trace, + core, state_initial, state_trace); xbt_lib_set(host_lib, name, SURF_CPU_LEVEL, static_cast(cpu)); @@ -427,11 +428,10 @@ double WorkstationL07::getConsumedEnergy() } CpuL07::CpuL07(CpuL07ModelPtr model, const char* name, xbt_dict_t props, - double power_initial, - double power_scale, tmgr_trace_t power_trace, - e_surf_resource_state_t state_initial, tmgr_trace_t state_trace) + double power_initial, double power_scale, tmgr_trace_t power_trace, + int core, e_surf_resource_state_t state_initial, tmgr_trace_t state_trace) : Cpu(model, name, props, lmm_constraint_new(ptask_maxmin_system, this, power_initial * power_scale), - 1, power_initial, power_scale) + core, power_initial, power_scale) { xbt_assert(m_powerScale > 0, "Power has to be >0"); diff --git a/src/surf/workstation_ptask_L07.hpp b/src/surf/workstation_ptask_L07.hpp index aea13ee620..7dd269137c 100644 --- a/src/surf/workstation_ptask_L07.hpp +++ b/src/surf/workstation_ptask_L07.hpp @@ -131,9 +131,8 @@ class CpuL07 : public Cpu { tmgr_trace_event_t p_powerEvent; public: CpuL07(CpuL07ModelPtr model, const char* name, xbt_dict_t properties, - double power_scale, - double power_initial, tmgr_trace_t power_trace, - e_surf_resource_state_t state_initial, tmgr_trace_t state_trace); + double power_scale, double power_initial, tmgr_trace_t power_trace, + int core, e_surf_resource_state_t state_initial, tmgr_trace_t state_trace); bool isUsed(); //bool isUsed() {DIE_IMPOSSIBLE;}; void updateState(tmgr_trace_event_t event_type, double value, double date); diff --git a/teshsuite/simdag/platforms/flatifier.c b/teshsuite/simdag/platforms/flatifier.c index 128b9b7857..5c33f70653 100644 --- a/teshsuite/simdag/platforms/flatifier.c +++ b/teshsuite/simdag/platforms/flatifier.c @@ -148,7 +148,7 @@ int main(int argc, char **argv) SD_workstation_get_power(hosts[i])); props = SD_workstation_get_properties(hosts[i]); if (SD_workstation_get_cores(hosts[i])>1) { - printf(" cores=\"%d\"", SD_workstation_get_cores(hosts[i])); + printf(" core=\"%d\"", SD_workstation_get_cores(hosts[i])); } if (props && !xbt_dict_is_empty(props)) { printf(">\n"); diff --git a/teshsuite/simdag/platforms/flatifier.tesh b/teshsuite/simdag/platforms/flatifier.tesh index fe5f803561..260c38edd2 100644 --- a/teshsuite/simdag/platforms/flatifier.tesh +++ b/teshsuite/simdag/platforms/flatifier.tesh @@ -143,11 +143,11 @@ $ ${bindir:=.}/flatifier$EXEEXT one_cluster_multicore.xml "--log=root.fmt:[%10.6 > > > -> -> -> -> -> +> +> +> +> +> > > > -- 2.20.1