Bladeren bron

Fix displaying allocated memory in MPI LU

Samuel Thibault 12 jaren geleden
bovenliggende
commit
dcf82692bf
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3 3
      mpi/examples/mpi_lu/plu_example.c

+ 3 - 3
mpi/examples/mpi_lu/plu_example.c

@@ -444,9 +444,9 @@ int main(int argc, char **argv)
 	init_matrix(rank);
 
 	fprintf(stderr, "Rank %d: allocated (%d + %d) MB = %d MB\n", rank,
-                        (int)allocated_memory/(1024*1024),
-			(int)allocated_memory_extra/(1024*1024),
-                        (int)(allocated_memory+allocated_memory_extra)/(1024*1024));
+                        (int)(allocated_memory/(1024*1024)),
+			(int)(allocated_memory_extra/(1024*1024)),
+                        (int)((allocated_memory+allocated_memory_extra)/(1024*1024)));
 
 	display_grid(rank, nblocks);