typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
+typedef struct s_smx_simcall s_smx_simcall_t;
+typedef struct s_smx_simcall* smx_simcall_t;
+
typedef enum {
SURF_LINK_FULLDUPLEX = 2,
SURF_LINK_SHARED = 1,
((setState_t)(event->data))->container = container;
((setState_t)(event->data))->value = value;
+#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
((setState_t)(event->data))->filename = loc->filename;
((setState_t)(event->data))->linenumber = loc->linenumber;
}
+#endif
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
((pushState_t)(event->data))->value = value;
((pushState_t)(event->data))->extra = extra;
+#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
((pushState_t)(event->data))->filename = loc->filename;
((pushState_t)(event->data))->linenumber = loc->linenumber;
}
+#endif
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
#include <cstring>
-#include <algorithm>
#include <memory>
#include <list>
+#include <boost/range/algorithm.hpp>
+
#include <unistd.h>
#include <sys/wait.h>
pair->num, pair->automaton_state, pair->atomic_propositions,
pair->graph_state);
- auto res = std::equal_range(acceptancePairs_.begin(), acceptancePairs_.end(),
+ auto res = boost::range::equal_range(acceptancePairs_,
new_pair.get(), simgrid::mc::DerefAndCompareByNbProcessesAndUsedHeap());
if (pair->search_cycle) for (auto i = res.first; i != res.second; ++i) {
pair->num, pair->automaton_state, pair->atomic_propositions,
pair->graph_state);
- auto range = std::equal_range(visitedPairs_.begin(), visitedPairs_.end(),
+ auto range = boost::range::equal_range(visitedPairs_,
visited_pair.get(), simgrid::mc::DerefAndCompareByNbProcessesAndUsedHeap());
for (auto i = range.first; i != range.second; ++i) {
{
if (_sg_mc_visited != 0 && visitedPairs_.size() > (std::size_t) _sg_mc_visited) {
// Remove the oldest entry with a linear search:
- visitedPairs_.erase(std::min_element(
- visitedPairs_.begin(), visitedPairs_.end(),
+ visitedPairs_.erase(boost::min_element(visitedPairs_,
[](std::shared_ptr<VisitedPair> const a, std::shared_ptr<VisitedPair> const& b) {
return a->num < b->num; } ));
}
#include <sys/wait.h>
#include <memory>
-#include <algorithm>
+
+#include <boost/range/algorithm.hpp>
#include <xbt/log.h>
#include <xbt/sysdep.h>
{
while (states_.size() > (std::size_t) _sg_mc_visited) {
XBT_DEBUG("Try to remove visited state (maximum number of stored states reached)");
- auto min_element = std::min_element(states_.begin(), states_.end(),
+ auto min_element = boost::range::min_element(states_,
[](std::unique_ptr<simgrid::mc::VisitedState>& a, std::unique_ptr<simgrid::mc::VisitedState>& b) {
return a->num < b->num;
});
XBT_DEBUG("Snapshot %p of visited state %d (exploration stack state %d)",
new_state->system_state.get(), new_state->num, graph_state->num);
- auto range = std::equal_range(states_.begin(), states_.end(),
+ auto range = boost::range::equal_range(states_,
new_state.get(), simgrid::mc::DerefAndCompareByNbProcessesAndUsedHeap());
if (compare_snpashots)
#include <cassert>
-#include <algorithm>
-
#include <simgrid_config.h>
#include <xbt/log.h>
#endif
#include <xbt/base.h>
-
-typedef struct s_smx_simcall s_smx_simcall_t;
-typedef struct s_smx_simcall* smx_simcall_t;
+#include <simgrid/forward.h>
#ifdef __cplusplus
#include <cinttypes>
#include <cstdint>
-#include <algorithm>
#include <memory>
#include <utility>
+#include <boost/range/algorithm.hpp>
+
#include <fcntl.h>
#include <cstdlib>
#define DW_LANG_Objc DW_LANG_ObjC /* fix spelling error in older dwarf.h */
// We sort them in order to have an (somewhat) efficient by name
// lookup:
- std::sort(frame.variables.begin(), frame.variables.end(),
- MC_compare_variable);
+ boost::range::sort(frame.variables, MC_compare_variable);
// Register it:
if (klass == simgrid::dwarf::TagClass::Subprogram)
info->functions_index.shrink_to_fit();
// Sort the array by low_pc:
- std::sort(info->functions_index.begin(), info->functions_index.end(),
+ boost::range::sort(info->functions_index,
[](simgrid::mc::FunctionIndexEntry const& a,
simgrid::mc::FunctionIndexEntry const& b)
{
static void MC_post_process_variables(simgrid::mc::ObjectInformation* info)
{
// Someone needs this to be sorted but who?
- std::sort(info->global_variables.begin(), info->global_variables.end(),
- MC_compare_variable);
+ boost::range::sort(info->global_variables, MC_compare_variable);
for(simgrid::mc::Variable& variable : info->global_variables)
if (variable.type_id)
#include <assert.h>
-#include <algorithm>
+#include <boost/range/algorithm.hpp>
#include <xbt/log.h>
#include <xbt/sysdep.h>
std::size_t State::interleaveSize() const
{
- return std::count_if(this->processStates.begin(), this->processStates.end(),
- [](simgrid::mc::ProcessState const& state) { return state.isToInterleave(); });
+ return boost::range::count_if(this->processStates,
+ [](simgrid::mc::ProcessState const& p) { return p.isToInterleave(); });
}
Transition State::getTransition() const
#ifndef SIMGRID_UTIL_HTPP
#define SIMGRID_UTIL_HTPP
-#include <algorithm>
-
#include <xbt/base.h>
namespace simgrid {
#include "src/simix/Synchro.h"
-simgrid::simix::Synchro::Synchro() {
- simcalls = xbt_fifo_new();
+simgrid::simix::Synchro::Synchro()
+{
}
simgrid::simix::Synchro::~Synchro()
{
- xbt_fifo_free(simcalls);
}
void simgrid::simix::Synchro::ref()
{
refcount++;
}
+
void simgrid::simix::Synchro::unref()
{
xbt_assert(refcount > 0,
#define _SIMIX_SYNCHRO_HPP
#include <string>
+#include <list>
#include <xbt/base.h>
#include "simgrid/forward.h"
virtual ~Synchro();
e_smx_state_t state = SIMIX_WAITING; /* State of the synchro */
std::string name; /* synchro name if any */
- xbt_fifo_t simcalls = nullptr; /* List of simcalls waiting for this synchro */
- char *category = nullptr; /* For instrumentation */
+ std::list<smx_simcall_t> simcalls; /* List of simcalls waiting for this synchro */
virtual void suspend()=0;
virtual void resume()=0;
cleanupSurf();
/* if there are simcalls associated with the synchro, then answer them */
- if (xbt_fifo_size(simcalls))
+ if (!simcalls.empty())
SIMIX_comm_finish(this);
}
}
/* If there are simcalls associated with the synchro, then answer them */
- if (xbt_fifo_size(simcalls))
+ if (!simcalls.empty())
SIMIX_execution_finish(this);
}
void simgrid::simix::Io::post()
{
- xbt_fifo_item_t i;
- smx_simcall_t simcall;
-
- xbt_fifo_foreach(simcalls,i,simcall,smx_simcall_t) {
+ for (smx_simcall_t simcall : simcalls) {
switch (simcall->call) {
case SIMCALL_FILE_OPEN: {
smx_file_t tmp = xbt_new(s_smx_file_t,1);
void simgrid::simix::Sleep::post()
{
- smx_simcall_t simcall;
- e_smx_state_t state;
-
- while ((simcall = (smx_simcall_t) xbt_fifo_shift(simcalls))) {
+ while (!simcalls.empty()) {
+ smx_simcall_t simcall = simcalls.front();
+ simcalls.pop_front();
+ e_smx_state_t state;
switch (surf_sleep->getState()){
case simgrid::surf::Action::State::failed:
simcall->issuer->context->iwannadie = 1;
/**
* \brief Represents a simcall to the kernel.
*/
-typedef struct s_smx_simcall {
+struct s_smx_simcall {
e_smx_simcall_t call;
smx_process_t issuer;
int mc_value;
union u_smx_scalar args[11];
union u_smx_scalar result;
-} s_smx_simcall_t, *smx_simcall_t;
+};
#define SIMCALL_SET_MC_VALUE(simcall, value) ((simcall)->mc_value = (value))
#define SIMCALL_GET_MC_VALUE(simcall) ((simcall)->mc_value)
XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro, (int)synchro->state);
/* Associate this simcall to the synchro */
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
/* set surf's synchro */
void SIMIX_execution_finish(simgrid::simix::Exec *exec)
{
- xbt_fifo_item_t item;
- smx_simcall_t simcall;
-
- xbt_fifo_foreach(exec->simcalls, item, simcall, smx_simcall_t) {
-
+ for (smx_simcall_t simcall : exec->simcalls) {
switch (exec->state) {
case SIMIX_DONE:
void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, sg_host_t host)
{
smx_synchro_t synchro = SIMIX_file_read(fd, size, host);
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
}
void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, sg_host_t host)
{
smx_synchro_t synchro = SIMIX_file_write(fd, size, host);
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
}
void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, sg_host_t host)
{
smx_synchro_t synchro = SIMIX_file_open(fullpath, host);
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
}
void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, sg_host_t host)
{
smx_synchro_t synchro = SIMIX_file_close(fd, host);
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
}
void SIMIX_io_finish(smx_synchro_t synchro)
{
- xbt_fifo_item_t item;
- smx_simcall_t simcall;
-
- xbt_fifo_foreach(synchro->simcalls, item, simcall, smx_simcall_t) {
+ for (smx_simcall_t simcall : synchro->simcalls) {
switch (synchro->state) {
/* 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 <boost/range/algorithm.hpp>
+
#include "src/surf/surf_interface.hpp"
#include "src/simix/smx_private.h"
#include "xbt/log.h"
/* Associate this simcall to the wait synchro */
XBT_DEBUG("simcall_HANDLER_comm_wait, %p", synchro);
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
if (MC_is_active() || MC_record_replay_is_active()) {
simcall_comm_test__set__result(simcall, comm->src_proc && comm->dst_proc);
if (simcall_comm_test__get__result(simcall)){
synchro->state = SIMIX_DONE;
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
SIMIX_comm_finish(synchro);
} else {
SIMIX_simcall_answer(simcall);
simcall_comm_test__set__result(simcall, (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING));
if (simcall_comm_test__get__result(simcall)) {
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
SIMIX_comm_finish(synchro);
} else {
SIMIX_simcall_answer(simcall);
}else{
synchro = xbt_dynar_get_as(synchros, idx, smx_synchro_t);
simcall_comm_testany__set__result(simcall, idx);
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
synchro->state = SIMIX_DONE;
SIMIX_comm_finish(synchro);
}
xbt_dynar_foreach(simcall_comm_testany__get__comms(simcall), cursor,synchro) {
if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
simcall_comm_testany__set__result(simcall, cursor);
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
SIMIX_comm_finish(synchro);
return;
}
if (MC_is_active() || MC_record_replay_is_active()){
int idx = SIMCALL_GET_MC_VALUE(simcall);
synchro = xbt_dynar_get_as(synchros, idx, smx_synchro_t);
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
simcall_comm_waitany__set__result(simcall, idx);
synchro->state = SIMIX_DONE;
SIMIX_comm_finish(synchro);
xbt_dynar_foreach(synchros, cursor, synchro){
/* associate this simcall to the the synchro */
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
/* see if the synchro is already finished */
if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING){
unsigned int cursor = 0;
xbt_dynar_t synchros = simcall_comm_waitany__get__comms(simcall);
- xbt_dynar_foreach(synchros, cursor, synchro)
- xbt_fifo_remove(synchro->simcalls, simcall);
+ xbt_dynar_foreach(synchros, cursor, synchro) {
+ // Remove the first occurence of simcall:
+ auto i = boost::range::find(synchro->simcalls, simcall);
+ if (i != synchro->simcalls.end())
+ synchro->simcalls.erase(i);
+ }
}
/**
{
simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
unsigned int destroy_count = 0;
- smx_simcall_t simcall;
- while ((simcall = (smx_simcall_t) xbt_fifo_shift(synchro->simcalls))) {
+ while (!synchro->simcalls.empty()) {
+ smx_simcall_t simcall = synchro->simcalls.front();
+ synchro->simcalls.pop_front();
/* If a waitany simcall is waiting for this synchro to finish, then remove
it from the other synchros in the waitany list. Afterwards, get the
if (simcall->issuer->host->isOff()) {
simcall->issuer->context->iwannadie = 1;
SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
- } else
-
- switch (synchro->state) {
-
- case SIMIX_DONE:
- XBT_DEBUG("Communication %p complete!", synchro);
- SIMIX_comm_copy_data(synchro);
- break;
-
- case SIMIX_SRC_TIMEOUT:
- SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Communication timeouted because of sender");
- break;
-
- case SIMIX_DST_TIMEOUT:
- SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Communication timeouted because of receiver");
- break;
-
- case SIMIX_SRC_HOST_FAILURE:
- if (simcall->issuer == comm->src_proc)
- simcall->issuer->context->iwannadie = 1;
-// SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
- else
- SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
- break;
-
- case SIMIX_DST_HOST_FAILURE:
- if (simcall->issuer == comm->dst_proc)
- simcall->issuer->context->iwannadie = 1;
-// SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
- else
- SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
- break;
-
- case SIMIX_LINK_FAILURE:
-
- XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) detached:%d",
- synchro,
- comm->src_proc ? sg_host_get_name(comm->src_proc->host) : NULL,
- comm->dst_proc ? sg_host_get_name(comm->dst_proc->host) : NULL,
- simcall->issuer->name.c_str(), simcall->issuer, comm->detached);
- if (comm->src_proc == simcall->issuer) {
- XBT_DEBUG("I'm source");
- } else if (comm->dst_proc == simcall->issuer) {
- XBT_DEBUG("I'm dest");
- } else {
- XBT_DEBUG("I'm neither source nor dest");
+ } else {
+ switch (synchro->state) {
+
+ case SIMIX_DONE:
+ XBT_DEBUG("Communication %p complete!", synchro);
+ SIMIX_comm_copy_data(synchro);
+ break;
+
+ case SIMIX_SRC_TIMEOUT:
+ SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Communication timeouted because of sender");
+ break;
+
+ case SIMIX_DST_TIMEOUT:
+ SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Communication timeouted because of receiver");
+ break;
+
+ case SIMIX_SRC_HOST_FAILURE:
+ if (simcall->issuer == comm->src_proc)
+ simcall->issuer->context->iwannadie = 1;
+ // SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
+ else
+ SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
+ break;
+
+ case SIMIX_DST_HOST_FAILURE:
+ if (simcall->issuer == comm->dst_proc)
+ simcall->issuer->context->iwannadie = 1;
+ // SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
+ else
+ SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
+ break;
+
+ case SIMIX_LINK_FAILURE:
+
+ XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) detached:%d",
+ synchro,
+ comm->src_proc ? sg_host_get_name(comm->src_proc->host) : NULL,
+ comm->dst_proc ? sg_host_get_name(comm->dst_proc->host) : NULL,
+ simcall->issuer->name.c_str(), simcall->issuer, comm->detached);
+ if (comm->src_proc == simcall->issuer) {
+ XBT_DEBUG("I'm source");
+ } else if (comm->dst_proc == simcall->issuer) {
+ XBT_DEBUG("I'm dest");
+ } else {
+ XBT_DEBUG("I'm neither source nor dest");
+ }
+ SMX_EXCEPTION(simcall->issuer, network_error, 0, "Link failure");
+ break;
+
+ case SIMIX_CANCELED:
+ if (simcall->issuer == comm->dst_proc)
+ SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Communication canceled by the sender");
+ else
+ SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Communication canceled by the receiver");
+ break;
+
+ default:
+ xbt_die("Unexpected synchro state in SIMIX_comm_finish: %d", (int)synchro->state);
}
- SMX_EXCEPTION(simcall->issuer, network_error, 0, "Link failure");
- break;
-
- case SIMIX_CANCELED:
- if (simcall->issuer == comm->dst_proc)
- SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Communication canceled by the sender");
- else
- SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Communication canceled by the receiver");
- break;
-
- default:
- xbt_die("Unexpected synchro state in SIMIX_comm_finish: %d", (int)synchro->state);
}
/* if there is an exception during a waitany or a testany, indicate the position of the failed communication */
/* 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 <boost/range/algorithm.hpp>
+
#include "src/surf/surf_interface.hpp"
#include "smx_private.h"
#include "xbt/sysdep.h"
} else if (comm != nullptr) {
xbt_fifo_remove(process->comms, process->waiting_synchro);
comm->cancel();
- xbt_fifo_remove(process->waiting_synchro->simcalls, &process->simcall);
+
+ // Remove first occurence of &process->simcall:
+ auto i = boost::range::find(
+ process->waiting_synchro->simcalls,
+ &process->simcall);
+ if (i != process->waiting_synchro->simcalls.end())
+ process->waiting_synchro->simcalls.remove(&process->simcall);
+
comm->unref();
} else if (sleep != nullptr) {
if (process != simcall->issuer) {
SIMIX_simcall_answer(simcall);
} else {
- xbt_fifo_push(sync_suspend->simcalls, simcall);
+ sync_suspend->simcalls.push_back(simcall);
process->waiting_synchro = sync_suspend;
process->waiting_synchro->suspend();
}
void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout)
{
smx_synchro_t sync = SIMIX_process_join(simcall->issuer, process, timeout);
- xbt_fifo_push(sync->simcalls, simcall);
+ sync->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = sync;
}
if (sleep->surf_sleep) {
sleep->surf_sleep->cancel();
- smx_simcall_t simcall;
- while ((simcall = (smx_simcall_t) xbt_fifo_shift(sleep->simcalls))) {
+ while (!sleep->simcalls.empty()) {
+ smx_simcall_t simcall = sleep->simcalls.front();
+ sleep->simcalls.pop_front();
simcall_process_sleep__set__result(simcall, SIMIX_DONE);
simcall->issuer->waiting_synchro = NULL;
if (simcall->issuer->suspended) {
return;
}
smx_synchro_t sync = SIMIX_process_sleep(simcall->issuer, duration);
- xbt_fifo_push(sync->simcalls, simcall);
+ sync->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = sync;
}
void SIMIX_synchro_finish(smx_synchro_t synchro)
{
XBT_IN("(%p)",synchro);
- smx_simcall_t simcall = (smx_simcall_t) xbt_fifo_shift(synchro->simcalls);
+ smx_simcall_t simcall = synchro->simcalls.front();
+ synchro->simcalls.pop_front();
switch (synchro->state) {
/* FIXME: check if the host is active ? */
/* Somebody using the mutex, use a synchronization to get host failures */
synchro = SIMIX_synchro_wait(process->host, -1);
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
xbt_swag_insert(simcall->issuer, mutex->sleeping);
} else {
}
synchro = SIMIX_synchro_wait(issuer->host, timeout);
- xbt_fifo_unshift(synchro->simcalls, simcall);
+ synchro->simcalls.push_front(simcall);
issuer->waiting_synchro = synchro;
xbt_swag_insert(simcall->issuer, cond->sleeping);
XBT_OUT();
XBT_DEBUG("Wait semaphore %p (timeout:%f)", sem, timeout);
if (sem->value <= 0) {
synchro = SIMIX_synchro_wait(issuer->host, timeout);
- xbt_fifo_unshift(synchro->simcalls, simcall);
+ synchro->simcalls.push_front(simcall);
issuer->waiting_synchro = synchro;
xbt_swag_insert(issuer, sem->sleeping);
} else {
typeid(surf_network_model).name(), min_by_net,
typeid(surf_storage_model).name(), min_by_sto);
- double res = std::max(std::max(min_by_cpu, min_by_net), min_by_sto);
+ double res = std::max({min_by_cpu, min_by_net, min_by_sto});
if (min_by_cpu >= 0.0 && min_by_cpu < res)
res = min_by_cpu;
if (min_by_net >= 0.0 && min_by_net < res)
/* 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 <algorithm>
#include <utility>
#include "network_ib.hpp"
/* 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 <algorithm>
-
#include <simgrid/host.h>
#include "cpu_cas01.hpp"