{
auto* group = new simgrid::smpi::Group(size_);
comm_world_ = new simgrid::smpi::Comm(group, nullptr, false, -1);
- // FIXME : using MPI_Attr_put with MPI_UNIVERSE_SIZE is forbidden and we make it a no-op (which triggers a warning
- // as MPI_ERR_ARG is returned). Directly calling Comm::attr_put breaks for now, as MPI_UNIVERSE_SIZE,is <0
- // instance.comm_world->attr_put<simgrid::smpi::Comm>(MPI_UNIVERSE_SIZE, reinterpret_cast<void*>(instance.size));
-
+ if (false) {
+ // FIXME : using MPI_Attr_put with MPI_UNIVERSE_SIZE is forbidden and we make it a no-op (which triggers a warning
+ // as MPI_ERR_ARG is returned). Directly calling Comm::attr_put breaks for now, as MPI_UNIVERSE_SIZE,is <0
+ comm_world_->attr_put<simgrid::smpi::Comm>(MPI_UNIVERSE_SIZE, reinterpret_cast<void*>(size_));
+ }
universe_size += max_no_processes;
}
#include "src/surf/surf_private.hpp"
#include "xbt/function_types.h"
+#include <cfloat>
#include <cmath>
#include <functional>
#include <set>
static inline void double_update(double* variable, double value, double precision)
{
- // printf("Updating %g -= %g +- %g\n",*variable,value,precision);
- // xbt_assert(value==0 || value>precision);
- // Check that precision is higher than the machine-dependent size of the mantissa. If not, brutal rounding may
- // happen, and the precision mechanism is not active...
- // xbt_assert(*variable< (2<<DBL_MANT_DIG)*precision && FLT_RADIX==2);
+ if (false) { // debug
+ fprintf(stderr, "Updating %g -= %g +- %g\n", *variable, value, precision);
+ xbt_assert(value == 0.0 || value > precision);
+ // Check that precision is higher than the machine-dependent size of the mantissa. If not, brutal rounding may
+ // happen, and the precision mechanism is not active...
+ xbt_assert(FLT_RADIX == 2 && *variable < precision * exp2(DBL_MANT_DIG));
+ }
*variable -= value;
if (*variable < precision)
*variable = 0.0;
if (dladdr(reinterpret_cast<void*>(address), &dlinfo))
memreg.pathname = dlinfo.dli_fname;
-#if 0 /* debug */
- std::fprintf(stderr, "Region: %016" PRIx64 "-%016" PRIx64 " | %c%c%c | %s\n", memreg.start_addr, memreg.end_addr,
- (memreg.prot & PROT_READ) ? 'r' : '-', (memreg.prot & PROT_WRITE) ? 'w' : '-',
- (memreg.prot & PROT_EXEC) ? 'x' : '-', memreg.pathname.c_str());
-#endif
+ if (false) // debug
+ std::fprintf(stderr, "Region: %016" PRIx64 "-%016" PRIx64 " | %c%c%c | %s\n", memreg.start_addr, memreg.end_addr,
+ (memreg.prot & PROT_READ) ? 'r' : '-', (memreg.prot & PROT_WRITE) ? 'w' : '-',
+ (memreg.prot & PROT_EXEC) ? 'x' : '-', memreg.pathname.c_str());
ret.push_back(std::move(memreg));
address += size;
/* Create space for a new map region in the region's array and copy the */
/* parsed stuff from the temporal memreg variable */
- // std::fprintf(stderr, "Found region for %s\n", not memreg.pathname.empty() ? memreg.pathname.c_str() : "(null)");
+ if (false) // debug
+ std::fprintf(stderr, "Found region for %s\n", not memreg.pathname.empty() ? memreg.pathname.c_str() : "(null)");
ret.push_back(std::move(memreg));
}