Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit cd0f051d authored by Millian Poquet's avatar Millian Poquet

Towards working SMPI jobs (does not work yet)

parent 113b3b1c
......@@ -5,6 +5,7 @@
#include <unistd.h>
#include <simgrid/msg.h>
#include <smpi/smpi.h>
#include <simgrid/plugins/energy.h>
#include <boost/algorithm/string/case_conv.hpp>
......@@ -232,18 +233,22 @@ int main(int argc, char * argv[])
load_json_workload(&context, mainArgs.workloadFilename);
context.jobs.setProfiles(&context.profiles);
if (context.trace_schedule)
context.paje_tracer.setFilename(mainArgs.exportPrefix + "_schedule.trace");
XBT_INFO("Checking whether SMPI is used or not...");
bool smpi_used = context.jobs.containsSMPIJob();
if (!smpi_used)
context.smpi_used = context.jobs.containsSMPIJob();
if (!context.smpi_used)
{
XBT_INFO("SMPI will NOT be used.");
MSG_config("host/model", "ptask_L07");
}
else
{
XBT_INFO("SMPI will be used.");
register_smpi_applications(&context);
SMPI_init();
}
if (context.trace_schedule)
context.paje_tracer.setFilename(mainArgs.exportPrefix + "_schedule.trace");
XBT_INFO("Creating the machines...");
MSG_create_environment(mainArgs.platformFilename.c_str());
......@@ -285,6 +290,9 @@ int main(int argc, char * argv[])
msg_error_t res = MSG_main();
if (context.smpi_used)
SMPI_finalize();
// Finalization
if (context.trace_schedule)
context.paje_tracer.finalize(&context, MSG_get_clock());
......
......@@ -21,6 +21,7 @@ struct BatsimContext
long long microseconds_used_by_scheduler = 0;
bool energy_used;
bool smpi_used;
bool allow_space_sharing;
bool trace_schedule;
std::string platform_filename;
......
......@@ -34,8 +34,8 @@ int killer_process(int argc, char *argv[])
int smpi_replay_process(int argc, char *argv[])
{
for(int index = 0; index < argc; index++)
XBT_DEBUG("smpi_replay_process, arg %d = '%s'", index, argv[index]);
/* for(int index = 0; index < argc; index++)
XBT_DEBUG("smpi_replay_process, arg %d = '%s'", index, argv[index]);*/
smpi_replay_run(&argc, &argv);
return 0;
......@@ -214,7 +214,7 @@ int execute_profile(BatsimContext *context,
argv[0] = xbt_strdup("1"); // Fonction_replay_label (can be ignored, for log only),
argv[1] = str_instance_id; // Instance Id (application) job_id is used
argv[2] = str_rank_id; // Rank Id
argv[3] = (char*) data->trace_filenames[i].c_str();
argv[3] = xbt_strdup((char*) data->trace_filenames[i].c_str());
argv[4] = xbt_strdup("0"); //
MSG_process_create_with_arguments(str_pname, smpi_replay_process, NULL, allocation->hosts[i], 5, argv );
......@@ -222,6 +222,7 @@ int execute_profile(BatsimContext *context,
// todo: avoid memory leaks
free(str_pname);
}
return 1;
}
else
xbt_die("Cannot execute job %d: the profile type '%s' is unknown", job->id, job->profile.c_str());
......
......@@ -5,9 +5,12 @@
#include <rapidjson/document.h>
#include <smpi/smpi.h>
#include "context.hpp"
#include "jobs.hpp"
#include "profiles.hpp"
#include "jobs_execution.hpp"
using namespace std;
using namespace rapidjson;
......@@ -80,3 +83,16 @@ void load_json_workload(BatsimContext *context, const std::string &filename)
check_worload_validity(context);
XBT_INFO("Workload seems to be valid.");
}
void register_smpi_applications(BatsimContext *context)
{
XBT_INFO("Registering SMPI applications...");
for (auto mit : context->jobs.jobs())
{
Job * job = mit.second;
string job_id_str = to_string(job->id);
XBT_INFO("Registering app. instance='%s', nb_process=%d", job_id_str.c_str(), job->required_nb_res);
SMPI_app_instance_register(job_id_str.c_str(), smpi_replay_process, job->required_nb_res);
}
XBT_INFO("SMPI applications have been registered");
}
......@@ -5,5 +5,5 @@
struct BatsimContext;
void check_worload_validity(BatsimContext * context);
void load_json_workload(BatsimContext * context, const std::string & json_filename);
void register_smpi_applications(BatsimContext * context);
Markdown is supported
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