} while (again);
/* Autorestart all process */
- for (auto hostname: host_that_restart) {
- XBT_INFO("Restart processes on host: %s", hostname.c_str());
- SIMIX_host_autorestart(sg_host_by_name(hostname.c_str()));
+ for (auto host: host_that_restart) {
+ XBT_INFO("Restart processes on host: %s", sg_host_get_name(host));
+ SIMIX_host_autorestart(host);
}
host_that_restart.clear();
if (value > 0) {
if(isOff())
- host_that_restart.push_back(getName());
+ host_that_restart.push_back(getHost());
turnOn();
} else {
lmm_constraint_t cnst = getConstraint();
double time = 0;
int i = 0;
nbPoints_ = speedTrace->event_list.size() + 1;
- timePoints_ = static_cast<double*>(xbt_malloc0(sizeof(double) * nbPoints_));
- integral_ = static_cast<double*>(xbt_malloc0(sizeof(double) * nbPoints_));
+ timePoints_ = new double[nbPoints_];
+ integral_ = new double[nbPoints_];
for (auto val : speedTrace->event_list) {
timePoints_[i] = time;
integral_[i] = integral;
CpuTiTrace::~CpuTiTrace()
{
- xbt_free(timePoints_);
- xbt_free(integral_);
+ delete [] timePoints_;
+ delete [] integral_;
}
CpuTiTgmr::~CpuTiTgmr()
} else if (event == stateEvent_) {
if (value > 0) {
if(isOff())
- host_that_restart.push_back(getName());
+ host_that_restart.push_back(getHost());
turnOn();
} else {
turnOff();
simgrid::trace_mgr::future_evt_set *future_evt_set = nullptr;
xbt_dynar_t surf_path = nullptr;
-std::vector<std::string> host_that_restart;
+std::vector<sg_host_t> host_that_restart;
xbt_dict_t watched_hosts_lib;
namespace simgrid {
/** \ingroup SURF_simulation
* \brief List of hosts that have just restarted and whose autorestart process should be restarted.
*/
-XBT_PUBLIC_DATA(std::vector<std::string>) host_that_restart;
+XBT_PUBLIC_DATA(std::vector<sg_host_t>) host_that_restart;
extern XBT_PRIVATE double sg_sender_gap;