X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5089a0a98b27f5eeee62321dff4f025f1648f025..cfbf3bda3a828313326d322fa92fb6719904d1a4:/src/smpi/colls/smpi_openmpi_selector.cpp diff --git a/src/smpi/colls/smpi_openmpi_selector.cpp b/src/smpi/colls/smpi_openmpi_selector.cpp index 46eca5e992..650806640e 100644 --- a/src/smpi/colls/smpi_openmpi_selector.cpp +++ b/src/smpi/colls/smpi_openmpi_selector.cpp @@ -1,6 +1,6 @@ /* selector for collective algorithms based on openmpi's default coll_tuned_decision_fixed selector */ -/* Copyright (c) 2009-2019. The SimGrid Team. +/* Copyright (c) 2009-2021. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -8,6 +8,8 @@ #include "colls_private.hpp" +#include + namespace simgrid { namespace smpi { @@ -100,12 +102,12 @@ int barrier__ompi(MPI_Comm comm) /* * the use the recursive doubling algorithm, otherwise*/ /* * bruck is the one we want.*/ { - int has_one = 0; + bool has_one = false; for( ; communicator_size > 0; communicator_size >>= 1 ) { if( communicator_size & 0x1 ) { if( has_one ) return barrier__ompi_bruck(comm); - has_one = 1; + has_one = true; } } } @@ -565,7 +567,7 @@ int scatter__ompi(const void *sbuf, int scount, (block_size < small_block_size)) { std::unique_ptr tmp_buf; if (rank != root) { - tmp_buf.reset(new unsigned char[rcount * rdtype->get_extent()]); + tmp_buf = std::make_unique(rcount * rdtype->get_extent()); sbuf = tmp_buf.get(); scount = rcount; sdtype = rdtype;