Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ea0d438e3e224a8467058271cf7fb620164be7c4
[simgrid.git] / examples / smpi / replay / replay.c
1 /* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved.          */
2
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. */
5
6 #include "xbt/replay.hpp"
7 #include "smpi/smpi.h"
8
9 /* This shows how to extend the trace format by adding a new kind of events.
10    This function is registered through xbt_replay_action_register() below. */
11 static void action_blah(const char* const* args)
12 {
13   /* Add your answer to the blah event here.
14      args is a strings array containing the blank-separated parameters found in the trace for this event instance. */
15 }
16
17 int main(int argc, char *argv[]) {
18   /* Connect your callback function to the "blah" event in the trace files */
19   xbt_replay_action_register("blah", action_blah);
20
21   /* The regular run of the replayer */
22   smpi_replay_run(&argc, &argv);
23   return 0;
24 }