static void simulate_bootup(simgrid::s4u::Host* host)
{
- int previous_pstate = host->get_pstate();
+ unsigned long previous_pstate = host->get_pstate();
XBT_INFO("Switch to virtual pstate 3, that encodes the 'booting up' state in that platform");
host->set_pstate(3);
XBT_INFO("Wait 150s to simulate the boot time.");
simgrid::s4u::this_actor::sleep_for(150);
- XBT_INFO("The host is now up and running. Switch back to previous pstate %d", previous_pstate);
+ XBT_INFO("The host is now up and running. Switch back to previous pstate %lu", previous_pstate);
host->set_pstate(previous_pstate);
}
static void simulate_shutdown(simgrid::s4u::Host* host)
{
- int previous_pstate = host->get_pstate();
+ unsigned long previous_pstate = host->get_pstate();
XBT_INFO("Switch to virtual pstate 4, that encodes the 'shutting down' state in that platform");
host->set_pstate(4);
XBT_INFO("Wait 7 seconds to simulate the shutdown time.");
simgrid::s4u::this_actor::sleep_for(7);
- XBT_INFO("Switch back to previous pstate %d, that will be used on reboot.", previous_pstate);
+ XBT_INFO("Switch back to previous pstate %lu, that will be used on reboot.", previous_pstate);
host->set_pstate(previous_pstate);
XBT_INFO("Actually shutdown the host");
void set_link_characteristics(double bw, double lat, s4u::Link::SharingPolicy sharing_policy) override;
Coords rankId_to_coords(unsigned long rank_id) const;
XBT_ATTRIB_DEPRECATED_v330("Please use rankId_to_coords(int)") void rankId_to_coords(int rank_id,
- unsigned int coords[4]) const;
+ unsigned long coords[4]) const;
private:
void generate_routers(const s4u::ClusterCallbacks& set_callbacks);
return coords;
}
-void DragonflyZone::rankId_to_coords(int rankId, unsigned int coords[4]) const // XBT_ATTRIB_DEPRECATED_v330
+void DragonflyZone::rankId_to_coords(int rankId, unsigned long coords[4]) const // XBT_ATTRIB_DEPRECATED_v330
{
const auto s_coords = rankId_to_coords(rankId);
coords[0] = s_coords.group;
}
// node->router local link
- add_link_latency(route->link_list_, myRouter->my_nodes_[static_cast<size_t>(myCoords.node) * num_links_per_link_],
- latency);
+ add_link_latency(route->link_list_, myRouter->my_nodes_[myCoords.node * num_links_per_link_], latency);
if (targetRouter != myRouter) {
// are we on a different group ?
* both arrays, we can easily assess whether we need to route into this dimension or not.
*/
const unsigned long dsize = dimensions_.size();
- std::vector<unsigned int> myCoords(dsize);
- std::vector<unsigned int> targetCoords(dsize);
+ std::vector<unsigned long> myCoords(dsize);
+ std::vector<unsigned long> targetCoords(dsize);
unsigned int dim_size_product = 1;
for (unsigned long i = 0; i < dsize; i++) {
unsigned long cur_dim_size = dimensions_[i];
bool use_lnk_up = false; // Is this link of the form "cur -> next" or "next -> cur"? false means: next -> cur
unsigned long current_node = src->id();
while (current_node != dst->id()) {
- unsigned int next_node = 0;
- unsigned int dim_product = 1; // First, we will route in x-dimension
- for (unsigned j = 0; j < dsize; j++) {
+ unsigned long next_node = 0;
+ unsigned long dim_product = 1; // First, we will route in x-dimension
+ for (unsigned long j = 0; j < dsize; j++) {
const unsigned long cur_dim = dimensions_[j];
// current_node/dim_product = position in current dimension
if ((current_node / dim_product) % cur_dim != (dst->id() / dim_product) % cur_dim) {
linkOffset = node_pos_with_loopback_limiter(next_node) + j;
use_lnk_up = false;
}
- XBT_DEBUG("torus_get_route_and_latency - current_node: %lu, next_node: %u, linkOffset is %lu", current_node,
+ XBT_DEBUG("torus_get_route_and_latency - current_node: %lu, next_node: %lu, linkOffset is %lu", current_node,
next_node, linkOffset);
break;
}