#include "src/smpi/include/smpi_actor.hpp"
#include "src/surf/HostImpl.hpp"
-#include <climits>
+#include <limits>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_comm, smpi, "Logging specific to SMPI (comm)");
MPI_Comm Comm::find_intra_comm(int * leader){
//get the indices of all processes sharing the same simix host
int intra_comm_size = 0;
- int min_index = INT_MAX; // the minimum index will be the leader
+ aid_t min_index = std::numeric_limits<aid_t>::max(); // the minimum index will be the leader
sg_host_self()->get_impl()->foreach_actor([this, &intra_comm_size, &min_index](auto& actor) {
- if (this->group()->rank(actor.get_pid()) != MPI_UNDEFINED) { // Is this process in the current group?
+ aid_t index = actor.get_pid();
+ if (this->group()->rank(index) != MPI_UNDEFINED) { // Is this process in the current group?
intra_comm_size++;
- int index = actor.get_pid();
if (index < min_index)
min_index = index;
}