/******************************* Host simcalls ********************************/
#ifdef __cplusplus
-XBT_PUBLIC smx_activity_t simcall_execution_parallel_start(const std::string& name, int host_nb,
- const sg_host_t* host_list, const double* flops_amount,
- const double* bytes_amount, double rate, double timeout);
XBT_PUBLIC e_smx_state_t simcall_execution_wait(const smx_activity_t& execution);
XBT_PUBLIC e_smx_state_t simcall_execution_test(const smx_activity_t& execution);
#endif
XBT_ATTRIB_DEPRECATED_v325("Please use Exec::start()") XBT_PUBLIC smx_activity_t
simcall_execution_start(const std::string& name, const std::string& category, double flops_amount, double priority,
double bound, sg_host_t host);
+
+// Should be deprecated in v325 too but is still used in other deprecated calls
+XBT_PUBLIC smx_activity_t simcall_execution_parallel_start(const std::string& name, int host_nb,
+ const sg_host_t* host_list, const double* flops_amount,
+ const double* bytes_amount, double rate, double timeout);
#endif
#endif
#include "simgrid/Exception.hpp"
#include "simgrid/modelchecker.h"
#include "src/mc/mc_replay.hpp"
-#include "src/simix/smx_host_private.hpp"
#include "src/surf/HostImpl.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/surf_interface.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/include/surf/surf.hpp"
#include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
#include "src/kernel/activity/ExecImpl.hpp"
#include "xbt/asserts.h" // xbt_log_no_loc
#include "src/include/surf/surf.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/plugins/vm/VmHostExt.hpp"
-#include "src/simix/smx_host_private.hpp"
#include "src/surf/cpu_cas01.hpp"
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_vm, "S4U virtual machines");
#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/VirtualMachine.hpp"
#include "src/kernel/activity/ExecImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
#include "src/simix/smx_private.hpp"
#include "src/surf/HostImpl.hpp"
#include "src/kernel/activity/SynchroRaw.hpp"
#include "src/mc/mc_replay.hpp"
#include "src/mc/remote/Client.hpp"
-#include "src/simix/smx_host_private.hpp"
#include "src/surf/HostImpl.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/kernel/activity/MutexImpl.hpp"
#include "src/mc/mc_replay.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
#include "popping_bodies.cpp"
-/**
- * @ingroup simix_process_management
- * @brief Creates a synchro that may involve parallel computation on
- * several hosts and communication between them.
- *
- * @param name Name of the execution synchro to create
- * @param host_nb Number of hosts where the synchro will be executed
- * @param host_list Array (of size host_nb) of hosts where the synchro will be executed
- * @param flops_amount Array (of size host_nb) of computation amount of hosts (in bytes)
- * @param bytes_amount Array (of size host_nb * host_nb) representing the communication
- * amount between each pair of hosts
- * @param rate the SURF action rate
- * @param timeout timeout
- * @return A new SIMIX execution synchronization
- */
-smx_activity_t simcall_execution_parallel_start(const std::string& name, int host_nb, const sg_host_t* host_list,
- const double* flops_amount, const double* bytes_amount, double rate,
- double timeout)
-{
- /* Check that we are not mixing VMs and PMs in the parallel task */
- bool is_a_vm = (nullptr != dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[0]));
- for (int i = 1; i < host_nb; i++) {
- bool tmp_is_a_vm = (nullptr != dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[i]));
- xbt_assert(is_a_vm == tmp_is_a_vm, "parallel_execute: mixing VMs and PMs is not supported (yet).");
- }
-
- /* checking for infinite values */
- for (int i = 0 ; i < host_nb ; ++i) {
- if (flops_amount != nullptr)
- xbt_assert(std::isfinite(flops_amount[i]), "flops_amount[%d] is not finite!", i);
- if (bytes_amount != nullptr) {
- for (int j = 0 ; j < host_nb ; ++j) {
- xbt_assert(std::isfinite(bytes_amount[i + host_nb * j]),
- "bytes_amount[%d+%d*%d] is not finite!", i, host_nb, j);
- }
- }
- }
-
- xbt_assert(std::isfinite(rate), "rate is not finite!");
- return simgrid::simix::simcall([name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout] {
- return SIMIX_execution_parallel_start(std::move(name), host_nb, host_list, flops_amount, bytes_amount, rate,
- timeout);
- });
-}
-
/**
* @ingroup simix_host_management
* @brief Waits for the completion of an execution synchro and destroy it.
[exec, bound] { boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(exec)->set_bound(bound); });
}
+// deprecated
smx_activity_t simcall_execution_start(const std::string& name, const std::string& category, double flops_amount,
double priority, double bound, sg_host_t host)
{
});
}
+// deprecated
+smx_activity_t simcall_execution_parallel_start(const std::string& name, int host_nb, const sg_host_t* host_list,
+ const double* flops_amount, const double* bytes_amount, double rate,
+ double timeout)
+{
+ /* Check that we are not mixing VMs and PMs in the parallel task */
+ bool is_a_vm = (nullptr != dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[0]));
+ for (int i = 1; i < host_nb; i++) {
+ bool tmp_is_a_vm = (nullptr != dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[i]));
+ xbt_assert(is_a_vm == tmp_is_a_vm, "parallel_execute: mixing VMs and PMs is not supported (yet).");
+ }
+
+ /* checking for infinite values */
+ for (int i = 0; i < host_nb; ++i) {
+ if (flops_amount != nullptr)
+ xbt_assert(std::isfinite(flops_amount[i]), "flops_amount[%d] is not finite!", i);
+ if (bytes_amount != nullptr) {
+ for (int j = 0; j < host_nb; ++j) {
+ xbt_assert(std::isfinite(bytes_amount[i + host_nb * j]), "bytes_amount[%d+%d*%d] is not finite!", i, host_nb,
+ j);
+ }
+ }
+ }
+ xbt_assert(std::isfinite(rate), "rate is not finite!");
+
+ std::vector<simgrid::s4u::Host*> hosts;
+ std::vector<double> flops_parallel_amount;
+ std::vector<double> bytes_parallel_amount;
+ for (int i = 0; i < host_nb; i++) {
+ hosts.push_back(host_list[i]);
+ flops_parallel_amount.push_back(flops_amount[i]);
+ for (int j = 0; j < host_nb; j++)
+ bytes_parallel_amount.push_back(bytes_amount[i]);
+ }
+ return simgrid::simix::simcall([name, hosts, flops_parallel_amount, bytes_parallel_amount, timeout] {
+ return simgrid::kernel::activity::ExecImplPtr(new simgrid::kernel::activity::ExecImpl(std::move(name), ""))
+ ->set_timeout(timeout)
+ ->start(hosts, flops_parallel_amount, bytes_parallel_amount);
+ });
+}
+
// deprecated
void SIMIX_comm_finish(smx_activity_t synchro)
{
#include "src/mc/mc_forward.hpp"
#endif
#include "src/kernel/activity/ConditionVariableImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
fd.write('#include "src/mc/mc_forward.hpp"\n')
fd.write('#endif\n')
fd.write('#include "src/kernel/activity/ConditionVariableImpl.hpp"\n')
- fd.write('#include "src/simix/smx_host_private.hpp"\n')
fd.write('\n')
fd.write('XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);\n\n')
#include "src/kernel/activity/SynchroRaw.hpp"
#include "src/mc/mc_record.hpp"
#include "src/mc/mc_replay.hpp"
-#include "src/simix/smx_host_private.hpp"
#include "src/simix/smx_private.hpp"
#include "src/surf/StorageImpl.hpp"
#include "src/surf/xml/platf.hpp"
+++ /dev/null
-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "mc/mc.h"
-#include "smx_private.hpp"
-#include "src/kernel/activity/CommImpl.hpp"
-#include "src/kernel/activity/ExecImpl.hpp"
-#include "src/mc/mc_replay.hpp"
-#include "src/plugins/vm/VirtualMachineImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_host, simix, "SIMIX hosts");
-
-simgrid::kernel::activity::ExecImplPtr
-SIMIX_execution_parallel_start(std::string name, int host_nb, const sg_host_t* host_list, const double* flops_amount,
- const double* bytes_amount, double rate, double timeout)
-{
- simgrid::kernel::activity::ExecImplPtr exec =
- simgrid::kernel::activity::ExecImplPtr(new simgrid::kernel::activity::ExecImpl(std::move(name), ""));
-
- std::vector<simgrid::s4u::Host*> hosts;
- for (int i = 0; i < host_nb; i++)
- hosts.push_back(host_list[i]);
- /* set surf's synchro */
- if (not MC_is_active() && not MC_record_replay_is_active()) {
- exec->surf_action_ = surf_host_model->execute_parallel(hosts, flops_amount, bytes_amount, rate);
- if (exec->surf_action_ != nullptr) {
- exec->surf_action_->set_data(exec.get());
- }
- }
-
- XBT_DEBUG("Create parallel execute synchro %p", exec.get());
-
- return exec;
-}
-
+++ /dev/null
-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef SIMIX_HOST_PRIVATE_HPP
-#define SIMIX_HOST_PRIVATE_HPP
-
-#include "src/simix/ActorImpl.hpp"
-
-#include <boost/intrusive/list.hpp>
-
-XBT_PRIVATE simgrid::kernel::activity::ExecImplPtr
-SIMIX_execution_parallel_start(std::string name, int host_nb, const sg_host_t* host_list, const double* flops_amount,
- const double* bytes_amount, double rate, double timeout);
-
-#endif
#include "src/include/simgrid/sg_config.hpp"
#include "src/include/surf/surf.hpp"
#include "src/kernel/EngineImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
#include "src/simix/smx_private.hpp"
#include "src/surf/HostImpl.hpp"
#include "src/surf/xml/platf_private.hpp"
src/simix/popping_generated.cpp
src/simix/popping_enum.h
src/simix/popping_accessors.hpp
- src/simix/smx_host_private.hpp
src/simix/smx_private.hpp
src/smpi/colls/coll_tuned_topo.hpp
src/smpi/colls/colls_private.hpp
src/simix/smx_deployment.cpp
src/simix/smx_environment.cpp
src/simix/smx_global.cpp
- src/simix/smx_host.cpp
src/simix/ActorImpl.cpp
src/simix/ActorImpl.hpp
src/simix/popping.cpp