Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Deprecate functions MSG_global_init() / MSG_global_init_args() in flavor of MSG_init()
[simgrid.git] / examples / msg / parallel_task / test_ptask.c
index 80fe67b..07c340f 100644 (file)
@@ -20,11 +20,6 @@ int redistribute(int argc, char *argv[]);
 MSG_error_t test_all(const char *platform_file,
                      const char *application_file);
 
-typedef enum {
-  PORT_22 = 0,
-  MAX_CHANNEL
-} channel_t;
-
 
 int execute(int argc, char *argv[])
 {
@@ -49,7 +44,7 @@ int execute(int argc, char *argv[])
                 "Unknown host %s. Stopping Now! ", argv[i]);
   }
 
-  int read;
+  _XBT_GNUC_UNUSED int read;
   read = sscanf(argv[argc - 2], "%lg", &computation_amount);
   xbt_assert(read, "Invalid argument %s\n", argv[argc - 2]);
   read = sscanf(argv[argc - 1], "%lg", &communication_amount);
@@ -105,7 +100,7 @@ int redistribute(int argc, char *argv[])
                 "Unknown host %s. Stopping Now! ", argv[i]);
   }
 
-  int read;
+  _XBT_GNUC_UNUSED int read;
   read = sscanf(argv[argc - 1], "%lg", &communication_amount);
   xbt_assert(read, "Invalid argument %s\n", argv[argc - 1]);
   computation_duration = (double *) calloc(host_list_size, sizeof(double));
@@ -145,7 +140,6 @@ MSG_error_t test_all(const char *platform_file,
   MSG_config("workstation/model", "ptask_L07");
 
   /*  Simulation setting */
-  MSG_set_channel_number(MAX_CHANNEL);
   MSG_create_environment(platform_file);
 
   /*   Application deployment */
@@ -164,7 +158,7 @@ int main(int argc, char *argv[])
 {
   MSG_error_t res = MSG_OK;
 
-  MSG_global_init(&argc, argv);
+  MSG_init(&argc, argv);
   if (argc < 3) {
     printf("Usage: %s platform_file deployment_file\n", argv[0]);
     exit(1);