- if (argc < 3) {
- printf("Usage: %s platform_file deployment_file\n", argv[0]);
- printf("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]);
- exit(1);
- }
- platform_file = argv[1];
- application_file = argv[2];
+ xbt_assert(argc > 2,"Usage: %s platform_file deployment_file\n"
+ "\nexample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);
+
+ MSG_create_environment(argv[1]);
+
+ MSG_function_register("master", master);
+ MSG_function_register("slave", slave);
+ // launch two MPI applications as well, one using master_mpi function as main on 2 nodes
+ SMPI_app_instance_register("master_mpi", master_mpi,2);
+ // the second performing an alltoall on 4 nodes
+ SMPI_app_instance_register("alltoall_mpi", alltoall_mpi,4);
+ MSG_launch_application(argv[2]);
+ SMPI_init();