-static void action_init(const char *const *action)
-{
- XBT_DEBUG("Initialize the counters");
- CHECK_ACTION_PARAMS(action, 0, 1)
- if(action[2])
- MPI_DEFAULT_TYPE = MPI_DOUBLE; // default MPE datatype
- else
- MPI_DEFAULT_TYPE = MPI_BYTE; // default TAU datatype
-
- /* start a simulated timer */
- smpi_process()->simulated_start();
- /*initialize the number of active processes */
- active_processes = smpi_process_count();
-
- set_reqq_self(new std::vector<MPI_Request>);
-}
-
-static void action_finalize(const char *const *action)
-{
- /* Nothing to do */
-}
-
-static void action_comm_size(const char *const *action)
-{
- communicator_size = parse_double(action[2]);
- log_timed_action (action, smpi_process()->simulated_elapsed());
-}
-
-static void action_comm_split(const char *const *action)
-{
- log_timed_action (action, smpi_process()->simulated_elapsed());
-}
-
-static void action_comm_dup(const char *const *action)
-{
- log_timed_action (action, smpi_process()->simulated_elapsed());
-}
-
-static void action_compute(const char *const *action)
-{
- CHECK_ACTION_PARAMS(action, 1, 0)
- double clock = smpi_process()->simulated_elapsed();
- double flops= parse_double(action[2]);
- int my_proc_id = Actor::self()->getPid();
-
- TRACE_smpi_computing_in(my_proc_id, flops);
- smpi_execute_flops(flops);
- TRACE_smpi_computing_out(my_proc_id);
-
- log_timed_action (action, clock);
-}
-
-static void action_send(const char *const *action)
-{
- CHECK_ACTION_PARAMS(action, 2, 1)
- int to = atoi(action[2]);
- double size=parse_double(action[3]);
- double clock = smpi_process()->simulated_elapsed();
-
- MPI_Datatype MPI_CURRENT_TYPE = (action[4]) ? decode_datatype(action[4]) : MPI_DEFAULT_TYPE;
-
- int my_proc_id = Actor::self()->getPid();
- int dst_traced = MPI_COMM_WORLD->group()->actor(to)->getPid();
-
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
- new simgrid::instr::Pt2PtTIData("send", to, size, encode_datatype(MPI_CURRENT_TYPE)));
- if (not TRACE_smpi_view_internals())
- TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, 0, size * MPI_CURRENT_TYPE->size());
-
- Request::send(nullptr, size, MPI_CURRENT_TYPE, to , 0, MPI_COMM_WORLD);
-
- TRACE_smpi_comm_out(my_proc_id);
-
- log_timed_action(action, clock);
-}
-
-static void action_Isend(const char *const *action)
-{
- CHECK_ACTION_PARAMS(action, 2, 1)
- int to = atoi(action[2]);
- double size=parse_double(action[3]);
- double clock = smpi_process()->simulated_elapsed();