-#ifdef MPI_CT
- if (mpi_ct.my_rank == 0) {
- rs_global = raysum_open (rs_name);
- raysum_read (rs_global);
- if (opt_verbose)
- print_raysum_info(rs_global);
-
- mpi_ndet = rs_global->ndet;
- mpi_nview = rs_global->nview;
- mpi_detinc = rs_global->det_inc;
- mpi_phmlen = rs_global->phmlen;
- mpi_rotinc = rs_global->rot_inc;
- }
-
- 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);
- }
-
- mpi_ct_calc_work_units(mpi_nview);
-
- rs_local = raysum_create (NULL, mpi_ct.local_work_units[mpi_ct.my_rank], mpi_ndet);
-
- rs_local->ndet = mpi_ndet;
- rs_local->nview = mpi_nview;
- rs_local->det_inc = mpi_detinc;
- rs_local->phmlen = mpi_phmlen;
- rs_local->rot_inc = mpi_rotinc;
-
- if (opt_verbose)
- mpi_t1 = MPI_Wtime();
- mpi_scatter_rs(rs_global, rs_local, opt_debug);
- 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 scatter rs = %f secs, Max time = %f sec\n", mpi_t, mpi_t_g);