]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Alternative solution to mpi/collective_02_dealii_vector 6699/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 30 May 2018 20:52:29 +0000 (22:52 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 31 May 2018 06:48:11 +0000 (08:48 +0200)
tests/mpi/collective_02_dealii_vector.cc

index 5f40a01031cfd202ce3fda80903b401c26176672..5db7d3da395bfebc9051420d1ed518cd0a6bb676 100644 (file)
@@ -26,8 +26,8 @@
 void
 test()
 {
-  unsigned int myid     = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
-  const int    numprocs = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
+  unsigned int       myid = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
+  const unsigned int numprocs = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
 
   {
     Vector<int> values(2);
@@ -35,8 +35,8 @@ test()
     values[1] = 2;
     Vector<int> sums(2);
     Utilities::MPI::sum(values, MPI_COMM_WORLD, sums);
-    Assert(sums[0] == numprocs, ExcInternalError());
-    Assert(sums[1] == 2 * numprocs, ExcInternalError());
+    Assert((unsigned int)sums[0] == numprocs, ExcInternalError());
+    Assert((unsigned int)sums[1] == 2 * numprocs, ExcInternalError());
 
     if (myid == 0)
       deallog << sums[0] << ' ' << sums[1] << std::endl;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.