/* A few basic tests for the surf library */
-/* Copyright (c) 2004-2014. The SimGrid Team.
+/* Copyright (c) 2004-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. */
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
#include <stdio.h>
#include "simgrid/sg_config.h"
#include "surf/surf.h"
void test(char *platform);
void test(char *platform)
{
- void *cpuA = NULL;
- void *cpuB = NULL;
- void *cardA = NULL;
- void *cardB = NULL;
+ sg_host_t cpuA = NULL;
+ sg_host_t cpuB = NULL;
surf_action_t actionA = NULL;
surf_action_t actionB = NULL;
surf_action_t actionC = NULL;
/*********************** Network *******************************/
XBT_DEBUG("%p", surf_network_model);
- cardA = sg_routing_edge_by_name_or_null("Cpu A");
- cardB = sg_routing_edge_by_name_or_null("Cpu B");
-
- /* Let's check that those two processors exist */
- XBT_DEBUG("Cpu A: %p", cardA);
- XBT_DEBUG("Cpu B: %p", cardB);
/* Let's do something on it */
- surf_network_model_communicate(surf_network_model, cardA, cardB, 150.0, -1.0);
+ surf_network_model_communicate(surf_network_model, cpuA, cpuB, 150.0, -1.0);
surf_solve(-1.0); /* Takes traces into account. Returns 0.0 */
do {
XBT_DEBUG("Simulation Terminated");
}
-#ifdef __BORLANDC__
-#pragma argsused
-#endif
-
int main(int argc, char **argv)
{
surf_init(&argc, argv); /* Initialize some common structures */