Reading from the stdout file generated by the test runner seems to occasionally fail in parallel. Maybe it is okay to not check the output in that case...
// We catch this output and it is written to the stdout logfile
// Since we're interested in this output we read it back in and
// write parts of it to the logstream
- std::ifstream inputfile;
- inputfile.open("stdout");
- Assert(inputfile.good() && inputfile.is_open(), ExcIO());
- std::string line;
- const std::string key = "*****";
- while (std::getline(inputfile, line))
+ // We can only do this reliably if we are not running in parallel (sometimes
+ // stdout is not written yet otherwise)
+ if (Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) == 1)
{
- if (line.find(key) != std::string::npos)
- deallog << line << std::endl;
+ std::ifstream inputfile;
+ inputfile.open("stdout");
+ Assert(inputfile.good() && inputfile.is_open(), ExcIO());
+ std::string line;
+ const std::string key = "*****";
+ while (std::getline(inputfile, line))
+ {
+ if (line.find(key) != std::string::npos)
+ deallog << line << std::endl;
+ }
+ inputfile.close();
}
- inputfile.close();
-
deallog << "OK" << std::endl;
return 0;
DEAL::Convergence step 12 value 8.42698e-13
DEAL::Convergence step 7 value 5.55656e-13
DEAL::Convergence step 7 value 2.07782e-14
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CG solution
-DEAL:: ***** ML (L=1, ~/Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CG solution
-DEAL:: ***** ML (L=1, ~/Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CGS solution
-DEAL:: ***** ML (L=1, ~/Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned GMRES solution
-DEAL:: ***** ML (L=1, ~/Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned BICGSTAB solution
-DEAL:: ***** ML (L=1, ~/Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned TFQMR solution
-DEAL:: ***** ML (L=1, ~/Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CG solution
-DEAL:: ***** ML (L=2, Cheby_pre0/Cheby_post0, ~/Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CG solution
-DEAL:: ***** ML (L=2, Cheby_pre0/Cheby_post0, ~/Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CGS solution
-DEAL:: ***** ML (L=2, Cheby_pre0/Cheby_post0, ~/Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned GMRES solution
-DEAL:: ***** ML (L=2, Cheby_pre0/Cheby_post0, ~/Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned BICGSTAB solution
-DEAL:: ***** ML (L=2, Cheby_pre0/Cheby_post0, ~/Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned TFQMR solution
-DEAL:: ***** ML (L=2, Cheby_pre0/Cheby_post0, ~/Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
DEAL::OK
DEAL::Convergence step 12 value 8.42698e-13
DEAL::Convergence step 7 value 5.55661e-13
DEAL::Convergence step 7 value 2.07636e-14
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CG solution
-DEAL:: ***** ML (L=1, /Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CG solution
-DEAL:: ***** ML (L=1, /Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CGS solution
-DEAL:: ***** ML (L=1, /Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned GMRES solution
-DEAL:: ***** ML (L=1, /Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned BICGSTAB solution
-DEAL:: ***** ML (L=1, /Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned TFQMR solution
-DEAL:: ***** ML (L=1, /Amesos_KLU_0, )
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CG solution
-DEAL:: ***** ML (L=2, /Cheby_post0, /Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CG solution
-DEAL:: ***** ML (L=2, /Cheby_post0, /Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned CGS solution
-DEAL:: ***** ML (L=2, /Cheby_post0, /Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned GMRES solution
-DEAL:: ***** ML (L=2, /Cheby_post0, /Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned BICGSTAB solution
-DEAL:: ***** ML (L=2, /Cheby_post0, /Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
-DEAL:: *******************************************************
-DEAL:: ***** Problem: Epetra::CrsMatrix
-DEAL:: ***** Preconditioned TFQMR solution
-DEAL:: ***** ML (L=2, /Cheby_post0, /Amesos_KLU_1)
-DEAL:: ***** No scaling
-DEAL:: *******************************************************
DEAL::OK