{
XBT_DEBUG("peer");
- auto* p = new Peer();
+ Peer p;
double start_time = simgrid::s4u::Engine::get_clock();
- p->joinChain();
- p->forwardFile();
+ p.joinChain();
+ p.forwardFile();
- simgrid::s4u::Comm::wait_all(&p->pending_sends);
+ simgrid::s4u::Comm::wait_all(&p.pending_sends);
double end_time = simgrid::s4u::Engine::get_clock();
- XBT_INFO("### %f %llu bytes (Avg %f MB/s); copy finished (simulated).", end_time - start_time, p->received_bytes,
- p->received_bytes / 1024.0 / 1024.0 / (end_time - start_time));
-
- delete p;
+ XBT_INFO("### %f %llu bytes (Avg %f MB/s); copy finished (simulated).", end_time - start_time, p.received_bytes,
+ p.received_bytes / 1024.0 / 1024.0 / (end_time - start_time));
}
static void broadcaster(int hostcount, unsigned int piece_count)
{
XBT_DEBUG("broadcaster");
- auto* bc = new Broadcaster(hostcount, piece_count);
- bc->buildChain();
- bc->sendFile();
-
- delete bc;
+ Broadcaster bc(hostcount, piece_count);
+ bc.buildChain();
+ bc.sendFile();
}
int main(int argc, char* argv[])
void* res = mailbox->get();
xbt_free(res);
} else {
- auto* data = new void*[flow_amount];
+ std::vector<void*> data(flow_amount);
// Start all comms in parallel, and wait for their completion in one shot
std::vector<simgrid::s4u::CommPtr> comms;
simgrid::s4u::Comm::wait_all(&comms);
for (int i = 0; i < flow_amount; i++)
xbt_free(data[i]);
- delete[] data;
}
XBT_INFO("receiver done.");
}
}
auto* graph = xbt_graph_new_graph(0, nullptr);
- auto* nodes = new std::map<std::string, xbt_node_t>();
- auto* edges = new std::map<std::string, xbt_edge_t>();
+ std::map<std::string, xbt_node_t> nodes;
+ std::map<std::string, xbt_edge_t> edges;
- netzone->get_impl()->get_graph(graph, nodes, edges);
- for (auto elm : *edges) {
+ netzone->get_impl()->get_graph(graph, &nodes, &edges);
+ for (auto elm : edges) {
const xbt_edge* edge = elm.second;
linkContainers(simgrid::instr::Container::by_name(static_cast<const char*>(edge->src->data)),
simgrid::instr::Container::by_name(static_cast<const char*>(edge->dst->data)), filter);
}
- delete nodes;
- delete edges;
xbt_graph_free_graph(graph, xbt_free_f, xbt_free_f, nullptr);
}
void platform_graph_export_graphviz(const std::string& output_filename)
{
auto* g = xbt_graph_new_graph(0, nullptr);
- auto* nodes = new std::map<std::string, xbt_node_t>();
- auto* edges = new std::map<std::string, xbt_edge_t>();
- s4u::Engine::get_instance()->get_netzone_root()->extract_xbt_graph(g, nodes, edges);
+ std::map<std::string, xbt_node_t> nodes;
+ std::map<std::string, xbt_edge_t> edges;
+ s4u::Engine::get_instance()->get_netzone_root()->extract_xbt_graph(g, &nodes, &edges);
std::ofstream fs;
fs.open(output_filename, std::ofstream::out);
fs << " node [shape=box, style=filled]" << std::endl;
fs << " node [width=.3, height=.3, style=filled, color=skyblue]" << std::endl << std::endl;
- for (auto const& elm : *nodes)
+ for (auto const& elm : nodes)
fs << " \"" << elm.first << "\";" << std::endl;
- for (auto const& elm : *edges) {
+ for (auto const& elm : edges) {
const char* src_s = static_cast<char*>(elm.second->src->data);
const char* dst_s = static_cast<char*>(elm.second->dst->data);
if (g->directed)
fs.close();
xbt_graph_free_graph(g, xbt_free_f, xbt_free_f, nullptr);
- delete nodes;
- delete edges;
}
/* Callbacks */
static void on_platform_created()
{
currentContainer.clear();
- auto* filter = new std::set<std::string>();
+ std::set<std::string> filter;
XBT_DEBUG("Starting graph extraction.");
- recursiveGraphExtraction(s4u::Engine::get_instance()->get_netzone_root(), Container::get_root(), filter);
+ recursiveGraphExtraction(s4u::Engine::get_instance()->get_netzone_root(), Container::get_root(), &filter);
XBT_DEBUG("Graph extraction finished.");
- delete filter;
dump_buffer(true);
}
if (my_src == my_dst)
continue;
- auto* route = new RouteCreationArgs();
+ RouteCreationArgs route;
- get_local_route(my_src, my_dst, route, nullptr);
+ get_local_route(my_src, my_dst, &route, nullptr);
XBT_DEBUG("get_route_and_latency %s -> %s", my_src->get_cname(), my_dst->get_cname());
const char *previous_name;
const char *current_name;
- if (route->gw_src) {
- previous = new_xbt_graph_node(graph, route->gw_src->get_cname(), nodes);
- previous_name = route->gw_src->get_cname();
+ if (route.gw_src) {
+ previous = new_xbt_graph_node(graph, route.gw_src->get_cname(), nodes);
+ previous_name = route.gw_src->get_cname();
} else {
previous = new_xbt_graph_node(graph, my_src->get_cname(), nodes);
previous_name = my_src->get_cname();
}
- for (auto const& link : route->link_list) {
+ for (auto const& link : route.link_list) {
const char* link_name = link->get_cname();
current = new_xbt_graph_node(graph, link_name, nodes);
current_name = link_name;
previous_name = current_name;
}
- if (route->gw_dst) {
- current = new_xbt_graph_node(graph, route->gw_dst->get_cname(), nodes);
- current_name = route->gw_dst->get_cname();
+ if (route.gw_dst) {
+ current = new_xbt_graph_node(graph, route.gw_dst->get_cname(), nodes);
+ current_name = route.gw_dst->get_cname();
} else {
current = new_xbt_graph_node(graph, my_dst->get_cname(), nodes);
current_name = my_dst->get_cname();
}
new_xbt_graph_edge(graph, previous, current, edges);
XBT_DEBUG(" %s -> %s", previous_name, current_name);
-
- delete route;
}
}
}
* both arrays, we can easily assess whether we need to route into this dimension or not.
*/
const unsigned int dsize = dimensions_.size();
- auto* myCoords = new unsigned int[dsize];
- auto* targetCoords = new unsigned int[dsize];
+ std::vector<unsigned int> myCoords(dsize);
+ std::vector<unsigned int> targetCoords(dsize);
unsigned int dim_size_product = 1;
for (unsigned i = 0; i < dsize; i++) {
unsigned cur_dim_size = dimensions_[i];
current_node = next_node;
}
- delete[] myCoords;
- delete[] targetCoords;
}
} // namespace routing
} // namespace kernel
{
prologue_return ret = prologue(1);
memcpy(ret.src, &mc_model_checker, sizeof(void*));
- const simgrid::mc::Region* region2 = new simgrid::mc::Region(simgrid::mc::RegionType::Data, ret.src, ret.size);
+ const simgrid::mc::Region region2(simgrid::mc::RegionType::Data, ret.src, ret.size);
INFO("Mismtach in MC_region_read_pointer()");
- REQUIRE(MC_region_read_pointer(region2, ret.src) == mc_model_checker);
+ REQUIRE(MC_region_read_pointer(®ion2, ret.src) == mc_model_checker);
munmap(ret.dstn, ret.size);
munmap(ret.src, ret.size);
delete ret.region0;
delete ret.region;
- delete region2;
}
/*************** End: class snap_test_helper *****************************/
}
/* Create file on remote host, write it and close it */
- auto* fd = new File(fullpath, dst_host, nullptr);
+ File fd(fullpath, dst_host, nullptr);
if (local_storage_) {
- sg_size_t write_size = fd->local_storage_->write(read_size);
- fd->local_storage_->extension<FileSystemStorageExt>()->incr_used_size(write_size);
- (*(fd->local_storage_->extension<FileSystemStorageExt>()->get_content()))[path_] = size_;
+ sg_size_t write_size = fd.local_storage_->write(read_size);
+ fd.local_storage_->extension<FileSystemStorageExt>()->incr_used_size(write_size);
+ (*(fd.local_storage_->extension<FileSystemStorageExt>()->get_content()))[path_] = size_;
}
if (local_disk_)
- fd->write(read_size);
- delete fd;
+ fd.write(read_size);
return 0;
}
void SD_task_schedulel(SD_task_t task, int count, ...)
{
va_list ap;
- auto* list = new sg_host_t[count];
+ std::vector<sg_host_t> list(count);
va_start(ap, count);
for (int i=0; i<count; i++)
list[i] = va_arg(ap, sg_host_t);
va_end(ap);
- SD_task_schedulev(task, count, list);
- delete[] list;
+ SD_task_schedulev(task, count, list.data());
}
void mpi_alltoallw_ ( void *sendbuf, int *sendcnts, int *sdispls, int* old_sendtypes, void *recvbuf, int *recvcnts,
int *rdispls, int* old_recvtypes, int* comm, int* ierr){
int size = simgrid::smpi::Comm::f2c(*comm)->size();
- auto* sendtypes = new MPI_Datatype[size];
- auto* recvtypes = new MPI_Datatype[size];
+ std::vector<MPI_Datatype> sendtypes(size);
+ std::vector<MPI_Datatype> recvtypes(size);
for(int i=0; i< size; i++){
if(FORT_IN_PLACE(sendbuf)!=MPI_IN_PLACE)
sendtypes[i] = simgrid::smpi::Datatype::f2c(old_sendtypes[i]);
recvtypes[i] = simgrid::smpi::Datatype::f2c(old_recvtypes[i]);
}
sendbuf = static_cast<char *>( FORT_IN_PLACE(sendbuf));
- *ierr = MPI_Alltoallw( sendbuf, sendcnts, sdispls, sendtypes, recvbuf, recvcnts, rdispls,
- recvtypes, simgrid::smpi::Comm::f2c(*comm));
- delete[] sendtypes;
- delete[] recvtypes;
+ *ierr = MPI_Alltoallw(sendbuf, sendcnts, sdispls, sendtypes.data(), recvbuf, recvcnts, rdispls, recvtypes.data(),
+ simgrid::smpi::Comm::f2c(*comm));
}
void mpi_exscan_ (void *sendbuf, void *recvbuf, int* count, int* datatype, int* op, int* comm, int* ierr){
int *rdispls, int* old_recvtypes, int* comm, int* request, int* ierr){
MPI_Request req;
int size = simgrid::smpi::Comm::f2c(*comm)->size();
- auto* sendtypes = new MPI_Datatype[size];
- auto* recvtypes = new MPI_Datatype[size];
+ std::vector<MPI_Datatype> sendtypes(size);
+ std::vector<MPI_Datatype> recvtypes(size);
for(int i=0; i< size; i++){
if(FORT_IN_PLACE(sendbuf)!=MPI_IN_PLACE)
sendtypes[i] = simgrid::smpi::Datatype::f2c(old_sendtypes[i]);
recvtypes[i] = simgrid::smpi::Datatype::f2c(old_recvtypes[i]);
}
sendbuf = static_cast<char *>( FORT_IN_PLACE(sendbuf));
- *ierr = MPI_Ialltoallw( sendbuf, sendcnts, sdispls, sendtypes, recvbuf, recvcnts, rdispls,
- recvtypes, simgrid::smpi::Comm::f2c(*comm), &req);
+ *ierr = MPI_Ialltoallw(sendbuf, sendcnts, sdispls, sendtypes.data(), recvbuf, recvcnts, rdispls, recvtypes.data(),
+ simgrid::smpi::Comm::f2c(*comm), &req);
if(*ierr == MPI_SUCCESS) {
*request = req->add_f();
}
- delete[] sendtypes;
- delete[] recvtypes;
}
void mpi_iexscan_ (void *sendbuf, void *recvbuf, int* count, int* datatype, int* op, int* comm, int* request, int* ierr){
void mpi_type_hindexed_ (int* count, int* blocklens, int* indices, int* old_type, int* newtype, int* ierr) {
MPI_Datatype tmp;
- auto* indices_aint = new MPI_Aint[*count];
+ std::vector<MPI_Aint> indices_aint(*count);
for(int i=0; i<*count; i++)
indices_aint[i]=indices[i];
- *ierr = MPI_Type_hindexed(*count, blocklens, indices_aint, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
+ *ierr = MPI_Type_hindexed(*count, blocklens, indices_aint.data(), simgrid::smpi::Datatype::f2c(*old_type), &tmp);
if(*ierr == MPI_SUCCESS) {
*newtype = tmp->add_f();
}
- delete[] indices_aint;
}
void mpi_type_create_hindexed_(int* count, int* blocklens, MPI_Aint* indices, int* old_type, int* newtype, int* ierr){
new simgrid::instr::VarCollTIData(request == MPI_REQUEST_IGNORED ? "reducescatter" : "ireducescatter", -1, 0,
nullptr, -1, trace_recvcounts, simgrid::smpi::Datatype::encode(datatype), ""));
- auto* recvcounts = new int[count];
+ std::vector<int> recvcounts(count);
for (int i = 0; i < count; i++)
recvcounts[i] = recvcount;
if (request == MPI_REQUEST_IGNORED)
- simgrid::smpi::colls::reduce_scatter(real_sendbuf, recvbuf, recvcounts, datatype, op, comm);
+ simgrid::smpi::colls::reduce_scatter(real_sendbuf, recvbuf, recvcounts.data(), datatype, op, comm);
else
- simgrid::smpi::colls::ireduce_scatter(real_sendbuf, recvbuf, recvcounts, datatype, op, comm, request);
- delete[] recvcounts;
+ simgrid::smpi::colls::ireduce_scatter(real_sendbuf, recvbuf, recvcounts.data(), datatype, op, comm, request);
TRACE_smpi_comm_out(rank);
smpi_bench_begin();
MPI_Offset max_offset =
min_offset +
count * datatype->get_extent(); // cheating, as we don't care about exact data location, we can skip extent
- auto* min_offsets = new MPI_Offset[size];
- auto* max_offsets = new MPI_Offset[size];
- simgrid::smpi::colls::allgather(&min_offset, 1, MPI_OFFSET, min_offsets, 1, MPI_OFFSET, comm_);
- simgrid::smpi::colls::allgather(&max_offset, 1, MPI_OFFSET, max_offsets, 1, MPI_OFFSET, comm_);
+ std::vector<MPI_Offset> min_offsets(size);
+ std::vector<MPI_Offset> max_offsets(size);
+ simgrid::smpi::colls::allgather(&min_offset, 1, MPI_OFFSET, min_offsets.data(), 1, MPI_OFFSET, comm_);
+ simgrid::smpi::colls::allgather(&max_offset, 1, MPI_OFFSET, max_offsets.data(), 1, MPI_OFFSET, comm_);
MPI_Offset min = min_offset;
MPI_Offset max = max_offset;
MPI_Offset tot = 0;
XBT_CDEBUG(smpi_pmpi, "my offsets to read : %lld:%lld, global min and max %lld:%lld", min_offset, max_offset, min,
max);
if (empty == 1) {
- delete[] min_offsets;
- delete[] max_offsets;
status->count = 0;
return MPI_SUCCESS;
}
MPI_Offset total = max - min;
if (total == tot && (datatype->flags() & DT_FLAG_CONTIGUOUS)) {
- delete[] min_offsets;
- delete[] max_offsets;
// contiguous. Just have each proc perform its read
if (status != MPI_STATUS_IGNORE)
status->count = count * datatype->size();
MPI_Offset my_chunk_start = (max - min + 1) / size * rank;
MPI_Offset my_chunk_end = ((max - min + 1) / size * (rank + 1));
XBT_CDEBUG(smpi_pmpi, "my chunks to read : %lld:%lld", my_chunk_start, my_chunk_end);
- auto* send_sizes = new int[size];
- auto* recv_sizes = new int[size];
- auto* send_disps = new int[size];
- auto* recv_disps = new int[size];
+ std::vector<int> send_sizes(size);
+ std::vector<int> recv_sizes(size);
+ std::vector<int> send_disps(size);
+ std::vector<int> recv_disps(size);
int total_sent = 0;
for (int i = 0; i < size; i++) {
send_sizes[i] = 0;
seek(min_offset, MPI_SEEK_SET);
T(this, sendbuf, totreads / datatype->size(), datatype, status);
}
- simgrid::smpi::colls::alltoall(send_sizes, 1, MPI_INT, recv_sizes, 1, MPI_INT, comm_);
+ simgrid::smpi::colls::alltoall(send_sizes.data(), 1, MPI_INT, recv_sizes.data(), 1, MPI_INT, comm_);
int total_recv = 0;
for (int i = 0; i < size; i++) {
recv_disps[i] = total_recv;
total_recv += recv_sizes[i];
}
// Set buf value to avoid copying dumb data
- simgrid::smpi::colls::alltoallv(sendbuf, send_sizes, send_disps, MPI_BYTE, buf, recv_sizes, recv_disps, MPI_BYTE,
- comm_);
+ simgrid::smpi::colls::alltoallv(sendbuf, send_sizes.data(), send_disps.data(), MPI_BYTE, buf, recv_sizes.data(),
+ recv_disps.data(), MPI_BYTE, comm_);
if (status != MPI_STATUS_IGNORE)
status->count = count * datatype->size();
smpi_free_tmp_buffer(sendbuf);
- delete[] send_sizes;
- delete[] recv_sizes;
- delete[] send_disps;
- delete[] recv_disps;
- delete[] min_offsets;
- delete[] max_offsets;
return MPI_SUCCESS;
}
}
#include "xbt/file.hpp"
#include <algorithm>
+#include <array>
#include <boost/algorithm/string.hpp> /* split */
#include <boost/tokenizer.hpp>
#include <cinttypes>
}
#endif
// If this point is reached, sendfile() actually is not available. Copy file by hand.
- const int bufsize = 1024 * 1024 * 4;
- auto* buf = new char[bufsize];
- while (int got = read(fdin, buf, bufsize)) {
+ constexpr int BUFSIZE = 1024 * 1024 * 4;
+ std::array<char, BUFSIZE> buf;
+ while (int got = read(fdin, buf.data(), BUFSIZE)) {
if (got == -1) {
xbt_assert(errno == EINTR, "Cannot read from %s", src.c_str());
} else {
- const char* p = buf;
+ const char* p = buf.data();
int todo = got;
while (int done = write(fdout, p, todo)) {
if (done == -1) {
}
}
}
- delete[] buf;
close(fdin);
close(fdout);
}
unsigned int count_requests = storage[simgrid::s4u::this_actor::get_pid()].size();
XBT_DEBUG("There are %ud elements in reqq[*]", count_requests);
if (count_requests > 0) {
- auto* requests = new MPI_Request[count_requests];
+ std::vector<MPI_Request> requests(count_requests);
unsigned int i=0;
for (auto const& pair : storage[simgrid::s4u::this_actor::get_pid()].get_store()) {
requests[i] = pair.second;
i++;
}
- simgrid::smpi::Request::waitall(count_requests, requests, MPI_STATUSES_IGNORE);
- delete[] requests;
+ simgrid::smpi::Request::waitall(count_requests, requests.data(), MPI_STATUSES_IGNORE);
}
active_processes--;
, block_indices_(new MPI_Aint[count])
, old_type_(old_type)
{
- auto* ints = new int[count + 1];
+ std::vector<int> ints(count + 1);
ints[0]=count;
for(int i=1;i<=count;i++)
ints[i]=block_lengths[i-1];
- contents_ = new Datatype_contents(MPI_COMBINER_HINDEXED, count+1, ints, count, block_indices, 1, &old_type);
- delete[] ints;
+ contents_ = new Datatype_contents(MPI_COMBINER_HINDEXED, count + 1, ints.data(), count, block_indices, 1, &old_type);
old_type_->ref();
for (int i = 0; i < count; i++) {
block_lengths_[i] = block_lengths[i];
: Type_Hindexed(size, lb, ub, flags, count, block_lengths, block_indices, old_type, old_type->get_extent())
{
delete contents_;
- auto* ints = new int[2 * count + 1];
+ std::vector<int> ints(2 * count + 1);
ints[0]=count;
for(int i=1;i<=count;i++)
ints[i]=block_lengths[i-1];
for(int i=count+1;i<=2*count;i++)
ints[i]=block_indices[i-count-1];
- contents_ = new Datatype_contents(MPI_COMBINER_INDEXED, 2*count+1, ints, 0, nullptr, 1, &old_type);
- delete[] ints;
+ contents_ = new Datatype_contents(MPI_COMBINER_INDEXED, 2 * count + 1, ints.data(), 0, nullptr, 1, &old_type);
}
int Type_Indexed::clone(MPI_Datatype* type)
, block_indices_(new MPI_Aint[count])
, old_types_(new MPI_Datatype[count])
{
- auto* ints = new int[count + 1];
+ std::vector<int> ints(count + 1);
ints[0]=count;
for(int i=1;i<=count;i++)
ints[i]=block_lengths[i-1];
- contents_ = new Datatype_contents(MPI_COMBINER_INDEXED, count+1, ints, count, block_indices, count, old_types);
- delete[] ints;
+ contents_ =
+ new Datatype_contents(MPI_COMBINER_INDEXED, count + 1, ints.data(), count, block_indices, count, old_types);
for (int i = 0; i < count; i++) {
block_lengths_[i]=block_lengths[i];
block_indices_[i]=block_indices[i];
int oldsize = size_;
int newsize = oldsize - n;
*newgroup = new Group(newsize);
- auto* to_exclude = new int[size_];
- for (int i = 0; i < oldsize; i++)
- to_exclude[i]=0;
- for (int i = 0; i < n; i++)
- to_exclude[ranks[i]]=1;
+ std::vector<bool> to_exclude(size_, false);
+ for (int i = 0; i < n; i++)
+ to_exclude[ranks[i]] = true;
int j = 0;
for (int i = 0; i < oldsize; i++) {
- if(to_exclude[i]==0){
+ if (not to_exclude[i]) {
s4u::Actor* actor = this->actor(i);
(*newgroup)->set_mapping(actor, j);
j++;
}
}
- delete[] to_exclude;
return MPI_SUCCESS;
}
Topo_Cart* Topo_Cart::sub(const int remain_dims[], MPI_Comm *newcomm) {
int oldNDims = ndims_;
- int *newDims = nullptr;
- int *newPeriodic = nullptr;
+ std::vector<int> newDims;
+ std::vector<int> newPeriodic;
if (remain_dims == nullptr && oldNDims != 0) {
return nullptr;
}
if (newNDims > 0) {
- newDims = new int[newNDims];
- newPeriodic = new int[newNDims];
+ newDims.resize(newNDims);
+ newPeriodic.resize(newNDims);
// that should not segfault
int j = 0;
}
Topo_Cart* res;
if (newNDims == 0){
- res = new Topo_Cart(getComm(), newNDims, newDims, newPeriodic, 0, newcomm);
+ res = new Topo_Cart(getComm(), newNDims, newDims.data(), newPeriodic.data(), 0, newcomm);
} else {
*newcomm = getComm()->split(color, getComm()->rank());
- auto topo = std::make_shared<Topo_Cart>(getComm(), newNDims, newDims, newPeriodic, 0, nullptr);
+ auto topo = std::make_shared<Topo_Cart>(getComm(), newNDims, newDims.data(), newPeriodic.data(), 0, nullptr);
res = topo.get();
res->setComm(*newcomm);
(*newcomm)->set_topo(topo);
}
- delete[] newDims;
- delete[] newPeriodic;
return res;
}
return MPI_ERR_DIMS;
}
- auto* position = new int[ndims_];
- this->coords(getComm()->rank(), ndims_, position);
+ std::vector<int> position(ndims_);
+ this->coords(getComm()->rank(), ndims_, position.data());
position[direction] += disp;
if(position[direction] < 0 ||
position[direction] >=dims_[direction]) {
if(periodic_[direction]) {
position[direction] %=dims_[direction];
- this->rank(position, rank_dest);
+ this->rank(position.data(), rank_dest);
} else {
*rank_dest = MPI_PROC_NULL;
}
} else {
- this->rank(position, rank_dest);
+ this->rank(position.data(), rank_dest);
}
position[direction] = position_[direction] - disp;
if(position[direction] < 0 || position[direction] >=dims_[direction]) {
if(periodic_[direction]) {
position[direction] %=dims_[direction];
- this->rank(position, rank_source);
+ this->rank(position.data(), rank_source);
} else {
*rank_source = MPI_PROC_NULL;
}
} else {
- this->rank(position, rank_source);
+ this->rank(position.data(), rank_source);
}
- delete[] position;
return MPI_SUCCESS;
}
int main(int argc, char** argv)
{
- const simgrid::s4u::Engine* engine = new simgrid::s4u::Engine(&argc, argv);
+ simgrid::s4u::Engine engine(&argc, argv);
- engine->load_platform(argv[1]);
+ engine.load_platform(argv[1]);
simgrid::s4u::Host* host = simgrid::s4u::Host::by_name("Tremblay");
simgrid::s4u::Actor::create("Suspender", host, Suspender());
receiver = simgrid::s4u::Actor::create("Receiver", host, Receiver());
- engine->run();
+ engine.run();
return 0;
}