double priority, double bound);
XBT_PUBLIC(smx_activity_t)
simcall_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount,
- double* bytes_amount, double amount, double rate, double timeout);
+ double* bytes_amount, double rate, double timeout);
XBT_PUBLIC(void) simcall_execution_cancel(smx_activity_t execution);
XBT_PUBLIC(void) simcall_execution_set_priority(smx_activity_t execution, double priority);
XBT_PUBLIC(void) simcall_execution_set_bound(smx_activity_t execution, double bound);
xbt_assert(mc_model_checker == nullptr, "This should be called from the client side");
#endif
- return req->call == SIMCALL_COMM_ISEND
- || req->call == SIMCALL_COMM_IRECV
- || req->call == SIMCALL_COMM_WAIT
- || req->call == SIMCALL_COMM_WAITANY
- || req->call == SIMCALL_COMM_TEST
- || req->call == SIMCALL_COMM_TESTANY
- || req->call == SIMCALL_MC_RANDOM
- || req->call == SIMCALL_MUTEX_LOCK
- || req->call == SIMCALL_MUTEX_TRYLOCK
- ;
+ return req->call == SIMCALL_COMM_ISEND || req->call == SIMCALL_COMM_IRECV || req->call == SIMCALL_COMM_WAIT ||
+ req->call == SIMCALL_COMM_WAITANY || req->call == SIMCALL_COMM_TEST || req->call == SIMCALL_COMM_TESTANY ||
+ req->call == SIMCALL_MC_RANDOM || req->call == SIMCALL_MUTEX_LOCK || req->call == SIMCALL_MUTEX_TRYLOCK ||
+ req->call == SIMCALL_MUTEX_UNLOCK;
}
}
simdata->compute =
boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(simcall_execution_parallel_start(
task->name, simdata->host_nb, simdata->host_list, simdata->flops_parallel_amount,
- simdata->bytes_parallel_amount, 1.0, -1.0, timeout));
+ simdata->bytes_parallel_amount, -1.0, timeout));
XBT_DEBUG("Parallel execution action created: %p", simdata->compute.get());
} else {
simdata->compute = boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(
* \return A new SIMIX execution synchronization
*/
smx_activity_t simcall_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list,
- double* flops_amount, double* bytes_amount, double amount, double rate,
- double timeout)
+ double* flops_amount, double* bytes_amount, double rate, double timeout)
{
/* checking for infinite values */
for (int i = 0 ; i < host_nb ; ++i) {
}
}
- xbt_assert(std::isfinite(amount), "amount is not finite!");
xbt_assert(std::isfinite(rate), "rate is not finite!");
- return simcall_BODY_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate,
- timeout);
+ return simcall_BODY_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout);
}
/**
{
simgrid::simix::marshal<double*>(simcall->args[4], arg);
}
-static inline double simcall_execution_parallel_start__get__amount(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<double>(simcall->args[5]);
-}
-static inline double simcall_execution_parallel_start__getraw__amount(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[5]);
-}
-static inline void simcall_execution_parallel_start__set__amount(smx_simcall_t simcall, double arg)
-{
- simgrid::simix::marshal<double>(simcall->args[5], arg);
-}
static inline double simcall_execution_parallel_start__get__rate(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[6]);
+ return simgrid::simix::unmarshal<double>(simcall->args[5]);
}
static inline double simcall_execution_parallel_start__getraw__rate(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[6]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args[5]);
}
static inline void simcall_execution_parallel_start__set__rate(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[6], arg);
+ simgrid::simix::marshal<double>(simcall->args[5], arg);
}
static inline double simcall_execution_parallel_start__get__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[7]);
+ return simgrid::simix::unmarshal<double>(simcall->args[6]);
}
static inline double simcall_execution_parallel_start__getraw__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[7]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args[6]);
}
static inline void simcall_execution_parallel_start__set__timeout(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[7], arg);
+ simgrid::simix::marshal<double>(simcall->args[6], arg);
}
static inline boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
simcall_execution_parallel_start__get__result(smx_simcall_t simcall)
inline static boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
simcall_BODY_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount,
- double* bytes_amount, double amount, double rate, double timeout)
+ double* bytes_amount, double rate, double timeout)
{
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate, timeout);
+ if (0)
+ SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout);
return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>, const char*, int, sg_host_t*, double*,
- double*, double, double, double>(SIMCALL_EXECUTION_PARALLEL_START, name, host_nb, host_list,
- flops_amount, bytes_amount, amount, rate, timeout);
+ double*, double, double>(SIMCALL_EXECUTION_PARALLEL_START, name, host_nb, host_list, flops_amount,
+ bytes_amount, rate, timeout);
}
inline static void
simgrid::simix::unmarshal<const char*>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1]),
simgrid::simix::unmarshal<sg_host_t*>(simcall->args[2]), simgrid::simix::unmarshal<double*>(simcall->args[3]),
simgrid::simix::unmarshal<double*>(simcall->args[4]), simgrid::simix::unmarshal<double>(simcall->args[5]),
- simgrid::simix::unmarshal<double>(simcall->args[6]), simgrid::simix::unmarshal<double>(simcall->args[7])));
+ simgrid::simix::unmarshal<double>(simcall->args[6])));
SIMIX_simcall_answer(simcall);
break;
int process_sleep(double duration) [[block]];
boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> execution_start(const char* name, double flops_amount, double priority, double bound);
-boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate, double timeout) [[nohandler]];
+boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double rate, double timeout) [[nohandler]];
void execution_cancel(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution) [[nohandler]];
void execution_set_priority(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution, double priority) [[nohandler]];
void execution_set_bound(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution, double bound) [[nohandler]];
{
/* Clean Simulator data */
if (xbt_swag_size(process_list) != 0) {
- char *msg = xbt_strdup("Shutting down host, but it's not empty:");
- char *tmp;
+ std::string msg = std::string("Shutting down host, but it's not empty:");
smx_actor_t process = nullptr;
- xbt_swag_foreach(process, process_list) {
- tmp = bprintf("%s\n\t%s", msg, process->name.c_str());
- free(msg);
- msg = tmp;
- }
+ xbt_swag_foreach(process, process_list) msg = msg + "\n\t" + process->name.c_str();
+
SIMIX_display_process_status();
- THROWF(arg_error, 0, "%s", msg);
+ THROWF(arg_error, 0, "%s", msg.c_str());
}
for (auto arg : auto_restart_processes)
delete arg;
boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
SIMIX_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount,
- double* bytes_amount, double amount, double rate, double timeout)
+ double* bytes_amount, double rate, double timeout)
{
/* alloc structures and initialize */
SIMIX_execution_start(smx_actor_t issuer, const char* name, double flops_amount, double priority, double bound);
XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
SIMIX_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount,
- double* bytes_amount, double amount, double rate, double timeout);
+ double* bytes_amount, double rate, double timeout);
#endif