1 /* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "simgrid/msg.h"
8 /* Main function of the process I want to start manually */
9 static int process_function(int argc, char *argv[])
11 msg_task_t task = MSG_task_create("task", 100, 0, NULL);
12 MSG_task_execute (task);
13 MSG_task_destroy (task);
17 int main(int argc, char *argv[])
19 MSG_init(&argc, argv);
20 xbt_assert(argc > 1, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
22 MSG_create_environment(argv[1]);
23 MSG_process_create("simple_func", process_function, NULL, MSG_get_host_by_name("Tremblay"));
24 MSG_process_create("simple_func", process_function, NULL, MSG_get_host_by_name("Fafard"));