X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/081d9a75524dd18d9b592c30bb400f1688986d1e..17ccf2e27ae2bc121dcd9e2d541f7a6c02492432:/testsuite/surf/surf_usage.c diff --git a/testsuite/surf/surf_usage.c b/testsuite/surf/surf_usage.c index 0577f21822..c7d4a2b0aa 100644 --- a/testsuite/surf/surf_usage.c +++ b/testsuite/surf/surf_usage.c @@ -30,8 +30,8 @@ const char *string_action(e_surf_action_state_t state) } -void test(void); -void test(void) +void test(char *platform); +void test(char *platform) { void *cpuA = NULL; void *cpuB = NULL; @@ -46,8 +46,8 @@ void test(void) e_surf_action_state_t stateActionC; double now = -1.0; - surf_cpu_resource_init("platform.txt"); /* Now it is possible to use CPUs */ - surf_network_resource_init("platform.txt"); /* Now it is possible to use eth0 */ + surf_cpu_resource_init(platform); /* Now it is possible to use CPUs */ + surf_network_resource_init(platform); /* Now it is possible to use eth0 */ /*********************** CPU ***********************************/ printf("%p \n", surf_cpu_resource); @@ -132,10 +132,13 @@ void test(void) surf_finalize(); } - int main(int argc, char **argv) { surf_init(&argc, argv); /* Initialize some common structures */ - test(); + if(argc==1) { + fprintf(stderr,"Usage : %s platform.txt\n",argv[0]); + return 1; + } + test(argv[1]); return 0; }