X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ee7e9c2e455536ab817ae0136acfbb53822eecd..d1ddbd23d6d9204fe614bd26a2c064f51f7820b0:/testsuite/surf/surf_usage.c diff --git a/testsuite/surf/surf_usage.c b/testsuite/surf/surf_usage.c index f69a9cf047..a3dc2cabf5 100644 --- a/testsuite/surf/surf_usage.c +++ b/testsuite/surf/surf_usage.c @@ -47,7 +47,6 @@ void test(char *platform) surf_action_t actionA = NULL; surf_action_t actionB = NULL; surf_action_t actionC = NULL; - surf_action_t commAB = NULL; e_surf_action_state_t stateActionA; e_surf_action_state_t stateActionB; e_surf_action_state_t stateActionC; @@ -59,8 +58,8 @@ void test(char *platform) /*********************** CPU ***********************************/ XBT_DEBUG("%p", surf_cpu_model); - cpuA = surf_model_resource_by_name(surf_cpu_model, "Cpu A"); - cpuB = surf_model_resource_by_name(surf_cpu_model, "Cpu B"); + cpuA = surf_cpu_resource_by_name("Cpu A"); + cpuB = surf_cpu_resource_by_name("Cpu B"); /* Let's check that those two processors exist */ XBT_DEBUG("%s : %p", surf_resource_name(cpuA), cpuA); @@ -83,17 +82,16 @@ void test(char *platform) /*********************** Network *******************************/ XBT_DEBUG("%p", surf_network_model); - cardA = surf_model_resource_by_name(surf_network_model, "Cpu A"); - cardB = surf_model_resource_by_name(surf_network_model, "Cpu B"); + cardA = surf_network_resource_by_name("Cpu A"); + cardB = surf_network_resource_by_name("Cpu B"); /* Let's check that those two processors exist */ XBT_DEBUG("%s : %p", surf_resource_name(cardA), cardA); XBT_DEBUG("%s : %p", surf_resource_name(cardB), cardB); /* Let's do something on it */ - commAB = - surf_network_model->extension.network.communicate("Cpu A", "Cpu B", - 150.0, -1.0); + surf_network_model->extension.network.communicate("Cpu A", "Cpu B", + 150.0, -1.0); surf_solve(-1.0); /* Takes traces into account. Returns 0.0 */ do {