void test()
{
-
-
unsigned int myid = Utilities::System::get_this_mpi_process (MPI_COMM_WORLD);
- const unsigned int numprocs = Utilities::System::get_n_mpi_processes (MPI_COMM_WORLD);
+ unsigned int numprocs = Utilities::System::get_n_mpi_processes (MPI_COMM_WORLD);
if (myid==0)
deallog << "Running on " << numprocs << " CPU(s)." << std::endl;
-
CompressedSimpleSparsityPattern csp(2*numprocs);
for (unsigned int i=0;i<numprocs*2;++i)
csp.add(i,i);
if (Utilities::System::get_this_mpi_process (MPI_COMM_WORLD) == 0)
{
std::ofstream logfile(output_file_for_mpi("petsc_01").c_str());
-// deallog.attach(logfile);
-// deallog.depth_console(0);
+ deallog.attach(logfile);
+ deallog.depth_console(0);
deallog.threshold_double(1.e-10);
test();
-DEAL:mpi::Running on 3 CPU(s).
-DEAL:mpi::got message '1' from CPU 2!
-DEAL:mpi::got message '2' from CPU 3!
-DEAL:mpi::done
+DEAL::Running on 1 CPU(s).
+DEAL::2nd try
+DEAL::done
-DEAL:mpi::Running on 10 CPU(s).
-DEAL:mpi::got message '1' from CPU 2!
-DEAL:mpi::got message '2' from CPU 3!
-DEAL:mpi::got message '3' from CPU 4!
-DEAL:mpi::got message '4' from CPU 5!
-DEAL:mpi::got message '5' from CPU 6!
-DEAL:mpi::got message '6' from CPU 7!
-DEAL:mpi::got message '7' from CPU 8!
-DEAL:mpi::got message '8' from CPU 9!
-DEAL:mpi::got message '9' from CPU 10!
-DEAL:mpi::done
+DEAL::Running on 10 CPU(s).
+DEAL::2nd try
+DEAL::done
-DEAL:mpi::Running on 4 CPU(s).
-DEAL:mpi::got message '1' from CPU 2!
-DEAL:mpi::got message '2' from CPU 3!
-DEAL:mpi::got message '3' from CPU 4!
-DEAL:mpi::done
+DEAL::Running on 4 CPU(s).
+DEAL::2nd try
+DEAL::done