Beispiel #1
0
int main (int argc, char* argv[])
{
  /* MRA_init must be called before setting the user functions. */
  MRA_init ();
  /* Set the task cost function. */
  MRA_set_task_mra_cost_f (mra_task_cost_function);
  /* Set the map output function. */
  MRA_set_map_mra_output_f (mra_map_mra_output_function);
  /* Initialize volatility traces */
 // MRA_init_mra_cv ("parse-boinc.txt");
  /* Run the simulation. */
   // MRA_main ("mra-plat32-10M.xml", "d-mra-plat32-10M.xml", "mra32.conf","parser-boinc-180.txt");
   //MRA_main ("aula-32.xml", "d-aula-32.xml", "aula-8.conf","parser-boinc-030.txt");
   //MRA_main ("plat64.xml", "d-plat64.xml", "mra64.conf","parser-boinc-180.txt");
   //MRA_main ("mra-plat128-1G.xml", "d-mra-plat128-1G.xml", "mra128.conf","parser-boinc-180.txt");
  //  MRA_main ("mra-plat256-10M.xml", "d-mra-plat256-10M.xml", "mra256.conf","parse-boinc.txt");
  //  MRA_main ("mra-plat256-76M.xml", "d-mra-plat256-10M.xml", "mra256.conf","parse-boinc.txt"); 
  // MRA_main ("plat-2k.xml", "d-plat-2k.xml", "mra-2k.conf","parser-boinc-1500.txt"); 
    MRA_main ("plat64.xml", "d-plat64.xml", "plat64.conf","parser-boinc-padrao.txt"); 
     
  //  MRA_main ("cc-e.xml", "d-cc-e.xml", "cc-e.conf","parse-boinc.txt");     
	
//	MRA_main("mra-plat256-logn.xml","d-mra-plat256-10M.xml", "mra256.conf","parse-boinc.txt");
  //MRA_main ("mrbitdew-sophia-50.xml", "d-mrbitdew-sophia-50.xml", "mrbitdew-50.conf", "parse-boinc.txt");
     //   MRA_main ("mra-plat-45.xml", "d-mra-plat-45.xml", "mra45.conf","parse-boinc.txt");
  return 0;
}
int main (int argc, char* argv[])
{
    /* MRA_user_init must be called before setting the user functions. */
    MRA_user_init ();
    /* MRSG_user_init must be called before setting the user functions. */
    MRSG_user_init ();
    /* Set the task cost MRA function. */
    MRA_set_task_mra_cost_f (mra_task_cost_function);
    /* Set the task cost MRSG function. */
    MRSG_set_task_cost_f (mrsg_task_cost_function);
    /* Set the MRA_map output function. */
    MRA_set_map_mra_output_f (mra_map_output_function);
    /* Set the MRSG_map output function. */
    MRSG_set_map_output_f (mrsg_map_output_function);


    /* Run the MRSG simulation. */
     //BIGHYBRID_main ("plat350-350.xml","d-plat350-350.xml","bighyb-plat350-350.conf","parser-boinc-080.txt");

     /*
       Check the args given in the command line:
         < 5 : invalid (something is missing)
         = 5 : no simgrid arg
         > 5 : simgrid arg
     */
     if(argc < 5)
     {
     	printf("usage : %s plat.xml depoly.xml plat.conf machines-trace.txt",argv[0]);
     	exit(0);
     }else if (argc == 5){
      int sg_argc = argc -4;
      MSG_init (&sg_argc, argv);
      printf("\n%s %s %s %s",argv[argc-4],argv[argc-3],argv[argc-2],argv[argc-1]);
      BIGHYBRID_main (argv[argc-4],argv[argc-3],argv[argc-2],argv[argc-1]);

     }else{
       int sg_argc = argc -4;
    //	printf("WITH SIMGRID %s\n%s %s %s %s\n",argv[1],argv[sg_argc],argv[sg_argc+1], argv[sg_argc+2],argv[sg_argc+3]);
       MSG_init (&sg_argc, argv);
      // BIGHYBRID_main (argv[sg_argc+1],argv[sg_argc+2], argv[sg_argc+3],argv[sg_argc+4]);
       BIGHYBRID_main (argv[sg_argc],argv[sg_argc+1], argv[sg_argc+2],argv[sg_argc+3]);
     }

    return 0;
}