- mpi_t1 = MPI::Wtime();
- mpi_ct.comm.Bcast (&opt_verbose, 1, MPI::INT, 0);
- mpi_ct.comm.Bcast (&opt_debug, 1, MPI::INT, 0);
- mpi_ct.comm.Bcast (&opt_trace, 1, MPI::INT, 0);
- mpi_ct.comm.Bcast (&opt_filter, 1, MPI::INT, 0);
- mpi_ct.comm.Bcast (&opt_interp, 1, MPI::INT, 0);
- mpi_ct.comm.Bcast (&opt_filter_param, 1, MPI::DOUBLE, 0);
- mpi_ct.comm.Bcast (&opt_interp_param, 1, MPI::INT, 0);
- mpi_ct.comm.Bcast (&opt_backproj, 1, MPI::INT, 0);
- mpi_ct.comm.Bcast (&mpi_ndet, 1, MPI::INT, 0);
- mpi_ct.comm.Bcast (&mpi_nview, 1, MPI::INT, 0);
- mpi_ct.comm.Bcast (&mpi_detinc, 1, MPI::DOUBLE, 0);
- mpi_ct.comm.Bcast (&mpi_phmlen, 1, MPI::DOUBLE, 0);
- mpi_ct.comm.Bcast (&mpi_rotinc, 1, MPI::DOUBLE, 0);
- mpi_ct.comm.Bcast (&nx, 1, MPI::INT, 0);
- mpi_ct.comm.Bcast (&ny, 1, MPI::INT, 0);
- if (opt_verbose) {
- mpi_t2 = MPI::Wtime();
- mpi_t = mpi_t2 - mpi_t1;
- mpi_ct.comm.Reduce(&mpi_t, &mpi_t_g, 1, MPI::DOUBLE, MPI::MAX, 0);
- if (mpi_ct.my_rank == 0)
- printf("Time to Bcast vars = %f secs, Max time = %f\n", mpi_t, mpi_t_g);
- }
-
- mpi_ct_calc_work_units(mpi_nview);
+ TimerCollectiveMPI timerBcast (mpiWorld.getComm());
+ mpiWorld.BcastString (optBackprojName);
+ mpiWorld.BcastString (optFilterName);
+ mpiWorld.BcastString (optInterpName);
+ mpiWorld.getComm().Bcast (&opt_verbose, 1, MPI::INT, 0);
+ mpiWorld.getComm().Bcast (&opt_debug, 1, MPI::INT, 0);
+ mpiWorld.getComm().Bcast (&opt_trace, 1, MPI::INT, 0);
+ mpiWorld.getComm().Bcast (&opt_filter_param, 1, MPI::DOUBLE, 0);
+ mpiWorld.getComm().Bcast (&opt_interp_param, 1, MPI::INT, 0);
+ mpiWorld.getComm().Bcast (&mpi_ndet, 1, MPI::INT, 0);
+ mpiWorld.getComm().Bcast (&mpi_nview, 1, MPI::INT, 0);
+ mpiWorld.getComm().Bcast (&mpi_detinc, 1, MPI::DOUBLE, 0);
+ mpiWorld.getComm().Bcast (&mpi_phmlen, 1, MPI::DOUBLE, 0);
+ mpiWorld.getComm().Bcast (&mpi_rotinc, 1, MPI::DOUBLE, 0);
+ mpiWorld.getComm().Bcast (&nx, 1, MPI::INT, 0);
+ mpiWorld.getComm().Bcast (&ny, 1, MPI::INT, 0);
+ if (opt_verbose)
+ timerBcast.timerEndAndReport ("Time to broadcast variables");