-/* Copyright (c) 2012. The SimGrid Team.
+/* Copyright (c) 2012, 2014-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+
#include "kademlia.h"
#include "node.h"
#include "task.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
#include "xbt/asserts.h"
/** @addtogroup MSG_examples
MSG_init(&argc, argv);
/* Check the arguments */
- if (argc < 3) {
- printf("Usage: %s platform_file deployment_file \n", argv[0]);
- return -1;
- }
+ xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
+ "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+ argv[0], argv[0]);
const char *platform_file = argv[1];
const char *deployment_file = argv[2];
XBT_CRITICAL("Messages created: %ld", smx_total_comms);
XBT_INFO("Simulated time: %g", MSG_get_clock());
- if (res == MSG_OK)
- return 0;
- else
- return 1;
+ return res != MSG_OK;
}