- mpi_t1 = MPI_Wtime();
- MPI_Bcast(&opt_verbose, 1, MPI_INT, 0, mpi_ct.comm);
- MPI_Bcast(&opt_debug, 1, MPI_INT, 0, mpi_ct.comm);
- MPI_Bcast(&opt_trace, 1, MPI_INT, 0, mpi_ct.comm);
- MPI_Bcast(&opt_filter, 1, MPI_INT, 0, mpi_ct.comm);
- MPI_Bcast(&opt_interp, 1, MPI_INT, 0, mpi_ct.comm);
- MPI_Bcast(&opt_filter_param, 1, MPI_DOUBLE, 0, mpi_ct.comm);
- MPI_Bcast(&opt_interp_param, 1, MPI_INT, 0, mpi_ct.comm);
- MPI_Bcast(&opt_backproj, 1, MPI_INT, 0, mpi_ct.comm);
- MPI_Bcast(&mpi_ndet, 1, MPI_INT, 0, mpi_ct.comm);
- MPI_Bcast(&mpi_nview, 1, MPI_INT, 0, mpi_ct.comm);
- MPI_Bcast(&mpi_detinc, 1, MPI_DOUBLE, 0, mpi_ct.comm);
- MPI_Bcast(&mpi_phmlen, 1, MPI_DOUBLE, 0, mpi_ct.comm);
- MPI_Bcast(&mpi_rotinc, 1, MPI_DOUBLE, 0, mpi_ct.comm);
- MPI_Bcast(&nx, 1, MPI_INT, 0, mpi_ct.comm);
- MPI_Bcast(&ny, 1, MPI_INT, 0, mpi_ct.comm);
- if (opt_verbose) {
- mpi_t2 = MPI_Wtime();
- mpi_t = mpi_t2 - mpi_t1;
- MPI_Reduce(&mpi_t, &mpi_t_g, 1, MPI_DOUBLE, MPI_MAX, 0, mpi_ct.comm);
- if (mpi_ct.my_rank == 0)
- printf("Time to Bcast vars = %f secs, Max time = %f\n", mpi_t, mpi_t_g);
+ TimerCollectiveMPI timerBcast (mpiWorld.getComm());
+ mpiWorld.BcastString (optBackprojName);
+ mpiWorld.BcastString (optFilterName);
+ mpiWorld.BcastString (optInterpName);
+ mpiWorld.getComm().Bcast (&optVerbose, 1, MPI::INT, 0);
+ mpiWorld.getComm().Bcast (&optDebug, 1, MPI::INT, 0);
+ mpiWorld.getComm().Bcast (&optTrace, 1, MPI::INT, 0);
+ mpiWorld.getComm().Bcast (&optFilterParam, 1, MPI::DOUBLE, 0);
+ mpiWorld.getComm().Bcast (&optInterpParam, 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 (optVerbose)
+ timerBcast.timerEndAndReport ("Time to broadcast variables");
+
+ mpiWorld.setTotalWorkUnits (mpi_nview);
+
+ Projections projLocal (mpiWorld.getMyLocalWorkUnits(), mpi_ndet);
+ projLocal.setDetInc (mpi_detinc);
+ projLocal.setPhmLen (mpi_phmlen);
+ projLocal.setRotInc (mpi_rotinc);
+
+ TimerCollectiveMPI timerScatter (mpiWorld.getComm());
+ ScatterProjectionsMPI (mpiWorld, projGlobal, projLocal, optDebug);
+ if (optVerbose)
+ timerScatter.timerEndAndReport ("Time to scatter projections");
+
+ if (mpiWorld.getRank() == 0) {
+ imGlobal = new ImageFile (filenameImage, nx, ny);
+ imGlobal->fileCreate();