-/* $Id$ */
-
/* A few basic tests for the surf library */
-/* Copyright (c) 2004 Arnaud Legrand. All rights reserved. */
+/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. 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. */
/* Let's do something on it */
commAB =
- surf_network_model->extension.network.communicate(cardA, cardB,
+ surf_network_model->extension.network.communicate("Cpu A","Cpu B", 0, 1, /* FIXME: hardcoding host number is bad */
150.0, -1.0);
surf_solve(); /* Takes traces into account. Returns 0.0 */
action->model_type->action_unref(action);
}
- } while (surf_solve() >= 0.0);
+ } while ((xbt_swag_size(surf_network_model->states.running_action_set) ||
+ xbt_swag_size(surf_cpu_model->states.running_action_set)) &&
+ surf_solve() >= 0.0);
DEBUG0("Simulation Terminated");
}