Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use type 'unsigned long' [lgtm/pvs-studio].
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 2 Oct 2021 12:08:23 +0000 (14:08 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 2 Oct 2021 19:12:37 +0000 (21:12 +0200)
src/kernel/routing/DragonflyZone.cpp
src/kernel/routing/TorusZone.cpp

index 5b7054c..1a3f8c7 100644 (file)
@@ -150,7 +150,7 @@ void DragonflyZone::build_upper_levels(const s4u::ClusterCallbacks& set_callback
 
 void DragonflyZone::generate_routers(const s4u::ClusterCallbacks& set_callbacks)
 {
-  unsigned long id = 2 * num_groups_ * num_chassis_per_group_ * num_blades_per_chassis_ * num_nodes_per_blade_;
+  unsigned long id = 2UL * num_groups_ * num_chassis_per_group_ * num_blades_per_chassis_ * num_nodes_per_blade_;
   /* get limiter for this router */
   auto get_limiter = [this, &id, &set_callbacks](unsigned int i, unsigned int j,
                                                  unsigned int k) -> resource::LinkImpl* {
index fe93efd..ce897b4 100644 (file)
@@ -23,7 +23,7 @@ namespace routing {
 void TorusZone::create_torus_links(unsigned long id, int rank, unsigned long position)
 {
   /* Create all links that exist in the torus. Each rank creates @a dimensions-1 links */
-  int dim_product = 1; // Needed to calculate the next neighbor_id
+  unsigned long dim_product = 1; // Needed to calculate the next neighbor_id
 
   for (unsigned long j = 0; j < dimensions_.size(); j++) {
     unsigned long current_dimension =