]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Catch an exception that apparently happens in 64-bit mode.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Nov 2013 17:51:39 +0000 (17:51 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Nov 2013 17:51:39 +0000 (17:51 +0000)
git-svn-id: https://svn.dealii.org/trunk@31535 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/trilinos_sparse_matrix_mmult_01.cc

index 9293e23f8537d4d2c6d777347c3edefa9ba6eea5..95de7822ea88e0a15414578d85bbf2d1c90eaff2 100644 (file)
@@ -154,17 +154,24 @@ int main (int argc, char **argv)
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   deallog.push(Utilities::int_to_string(myid));
 
-  if (myid == 0)
+  try
     {
-      std::ofstream logfile("output");
-      deallog.attach(logfile);
-      deallog << std::setprecision(4);
-      deallog.depth_console(0);
-      deallog.threshold_double(1.e-10);
-
-      test();
+      if (myid == 0)
+       {
+         std::ofstream logfile("output");
+         deallog.attach(logfile);
+         deallog << std::setprecision(4);
+         deallog.depth_console(0);
+         deallog.threshold_double(1.e-10);
+
+         test();
+       }
+      else
+       test();
+    }
+  catch (const char *p)
+    {
+      std::cerr << "Uncaught exception: " << p << std::endl;
+      std::exit (1);
     }
-  else
-    test();
-
 }

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.