Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change the comment of Task.setBound to fit the native semantic
[simgrid.git] / examples / msg / masterslave / masterslave_arg.c
index ecaafac..611b26d 100644 (file)
@@ -98,8 +98,8 @@ int main(int argc, char *argv[])
 
   MSG_create_environment(argv[1]);
 
-  number_of_jobs = atol(argv[2]);
-  number_of_slaves = atol(argv[3]);
+  number_of_jobs = xbt_str_parse_int(argv[2], "Invalid amount of jobs: %s");
+  number_of_slaves = xbt_str_parse_int(argv[3], "Invalid amount of slaves: %s");
   xbt_dynar_t host_dynar = MSG_hosts_as_dynar();
   long number_max = xbt_dynar_length(host_dynar);
   XBT_INFO("Got %ld slaves, %ld tasks to process, and %ld hosts", number_of_slaves, number_of_jobs,number_max);