Commit f0789559 authored by Millian Poquet's avatar Millian Poquet
Browse files

code: usage trace profile implementation

parent 3beec90a
......@@ -847,6 +847,9 @@ int main(int argc, char * argv[])
SMPI_init();
}
// Register Batsim replay functions
xbt_replay_action_register("m_usage", usage_trace_replayer);
// Let's create the machines
create_machines(main_args, &context, max_nb_machines_to_use);
......
......@@ -13,7 +13,6 @@
#include <simgrid/s4u.hpp>
#include <simgrid/plugins/energy.h>
#include <xbt/replay.hpp>
#include <smpi/smpi.h>
......@@ -69,6 +68,13 @@ void usage_trace_replayer(simgrid::xbt::ReplayAction & action)
ptask->wait();
}
/**
* @brief The actor that replays a usage trace
* @param[in] job The job whose trace is from
* @param[in] data The profile data of the job
* @param[in] termination_mbox_name The mailbox to use to synchronize the job termination
* @param[in] rank The rank of the actor of the job
*/
void usage_trace_replayer_process(JobPtr job, UsageTraceProfileData * data, const std::string & termination_mbox_name, int rank)
{
try
......
......@@ -8,6 +8,13 @@
#include "ipp.hpp"
#include "context.hpp"
#include <xbt/replay.hpp>
/**
* @brief Replays a usage over time trace action (one line)
* @param[in] action The action to replay
*/
void usage_trace_replayer(simgrid::xbt::ReplayAction & action);
/**
* @brief The process in charge of killing a job if it reaches its walltime
......
......@@ -137,6 +137,9 @@ struct SmpiProfileData
std::vector<std::string> trace_filenames; //!< all defined tracefiles
};
/**
* @brief The data associated to USAGE_TRACE profiles
*/
struct UsageTraceProfileData
{
std::vector<std::string> trace_filenames; //!< all defined tracefiles
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment