X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fphm2rs.c;h=0612fb945a14834bb80d13652d3b88ad991e58cd;hb=a7bc93cf526e313d69b068f0cb866b5ef108eaf0;hp=1f28679fec2d03489a954a0f69163ac962ee4303;hpb=9c40ac1eddbc3ed2b68c88e20b332bd727ca2dde;p=ctsim.git diff --git a/src/phm2rs.c b/src/phm2rs.c index 1f28679..0612fb9 100644 --- a/src/phm2rs.c +++ b/src/phm2rs.c @@ -2,8 +2,18 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: phm2rs.c,v 1.3 2000/04/29 23:24:56 kevin Exp $ +** $Id: phm2rs.c,v 1.6 2000/04/30 18:23:53 kevin Exp $ ** $Log: phm2rs.c,v $ +** Revision 1.6 2000/04/30 18:23:53 kevin +** Code cleaning +** +** Revision 1.5 2000/04/30 10:13:27 kevin +** Fixed MPI bugs +** +** Revision 1.4 2000/04/30 04:06:13 kevin +** Update Raysum i/o routines +** Fix MPI bug in ctrec (scatter_raysum) that referenced rs_global +** ** Revision 1.3 2000/04/29 23:24:56 kevin ** *** empty log message *** ** @@ -113,8 +123,8 @@ main (const int argc, char *const argv[]) { DETECTOR *det; PICTURE *pic = NULL; - RAYSUM *rs_global; - char str[256], *opt_outfile, opt_desc[MAXREMARK+1]; + RAYSUM *rs_global = NULL; + char str[256], *opt_outfile = NULL, opt_desc[MAXREMARK+1]; char opt_picfilename[256]; char *endptr, *endstr; int opt_ndet, opt_nview; @@ -123,12 +133,12 @@ main (const int argc, char *const argv[]) int opt_verbose = 0; int opt_debug = 0; double opt_rotangle = 1; - double time_start, time_end; + double time_start = 0, time_end = 0; #ifdef MPI_CT RAYSUM *rs_local; int mpi_argc = argc; char **mpi_argv = (char **) argv; - double mpi_t1, mpi_t2, mpi_t, mpi_t_g; + double mpi_t1 = 0, mpi_t2 = 0, mpi_t, mpi_t_g; MPI_Init(&mpi_argc, &mpi_argv); MPI_Comm_dup (MPI_COMM_WORLD, &mpi_ct.comm); @@ -140,9 +150,6 @@ main (const int argc, char *const argv[]) mpi_ct.nproc, MPI_MAX_PROCESS); exit(1); } -#endif - -#ifdef MPI_CT time_start = MPI_Wtime(); #else time_start = td_current_sec(); @@ -289,6 +296,7 @@ main (const int argc, char *const argv[]) mpi_ct_calc_work_units(opt_nview); if (mpi_ct.my_rank == 0) { rs_global = raysum_create_from_det (opt_outfile, det); + raysum_alloc_views(rs_global); } rs_local = raysum_create_from_det (NULL, det);