X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fphm2rs.c;h=3ed5e97644a0a153ddc6ddb3b1e92d8d7bd5bad5;hb=ff95dd83503e99e50b32140a073c0a742c414cb1;hp=13a4e85eb44c776e68140923f2c078fb6ede7aff;hpb=13838bda88b63a2535b5baaf7197006767de4b8e;p=ctsim.git diff --git a/src/phm2rs.c b/src/phm2rs.c index 13a4e85..3ed5e97 100644 --- a/src/phm2rs.c +++ b/src/phm2rs.c @@ -2,10 +2,24 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: phm2rs.c,v 1.1 2000/04/28 13:02:44 kevin Exp $ +** $Id: phm2rs.c,v 1.5 2000/04/30 10:13:27 kevin Exp $ ** $Log: phm2rs.c,v $ -** Revision 1.1 2000/04/28 13:02:44 kevin -** Initial revision +** 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 *** +** +** Revision 1.2 2000/04/28 13:50:45 kevin +** Removed Makefile Makefile.in that are automatically generated by autoconf +** +** Revision 1.1.1.1 2000/04/28 13:02:44 kevin +** Initial CVS import for first public release +** ** ** ** This program is free software; you can redistribute it and/or modify @@ -39,7 +53,6 @@ #define O_VERBOSE 6 #define O_HELP 7 #define O_PICFILE 8 -#define O_INMEMORY 9 #define O_DEBUG 10 #define O_VERSION 11 @@ -54,7 +67,6 @@ static struct option my_options[] = {"verbose", 0, 0, O_VERBOSE}, {"help", 0, 0, O_HELP}, {"debug", 0, 0, O_DEBUG}, - {"inmemory", 0, 0, O_INMEMORY}, {"version", 0, 0, O_VERSION}, {0, 0, 0, 0} }; @@ -89,7 +101,6 @@ if (mpi_ct.my_rank == 0) fprintf(stdout," rays Trace rays\n"); fprintf(stdout," plot Trace plot\n"); fprintf(stdout," clipping Trace clipping\n"); - fprintf(stdout," --inmemory Use memory storage\n"); fprintf(stdout," --verbose Verbose mode\n"); fprintf(stdout," --debug Debug mode\n"); fprintf(stdout," --version Print version\n"); @@ -118,7 +129,6 @@ main (const int argc, char *const argv[]) int opt_trace = 0, opt_picnum = -1; int opt_verbose = 0; int opt_debug = 0; - int opt_in_memory = FALSE; double opt_rotangle = 1; double time_start, time_end; #ifdef MPI_CT @@ -137,9 +147,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(); @@ -178,8 +185,6 @@ main (const int argc, char *const argv[]) case O_DEBUG: opt_debug = 1; break; - case O_INMEMORY: - opt_in_memory = 1; break; case O_TRACE: opt_trace = opt_set_trace(optarg, argv[0]); @@ -287,10 +292,11 @@ main (const int argc, char *const argv[]) #ifdef MPI_CT mpi_ct_calc_work_units(opt_nview); if (mpi_ct.my_rank == 0) { - rs_global = raysum_create_from_det (opt_outfile, det, TRUE); + rs_global = raysum_create_from_det (opt_outfile, det); + raysum_alloc_views(rs_global); } - rs_local = raysum_create_from_det (NULL, det, TRUE); + rs_local = raysum_create_from_det (NULL, det); rs_local->nview = mpi_ct.local_work_units[mpi_ct.my_rank]; if (opt_debug) printf("rs_local->nview = %d (process %d)\n", rs_local->nview, mpi_ct.my_rank); @@ -317,7 +323,7 @@ main (const int argc, char *const argv[]) printf("Time to gather rs = %f secs, Max = %f secs\n", mpi_t, mpi_t_g); } #else - rs_global = raysum_create_from_det (opt_outfile, det, opt_in_memory); + rs_global = raysum_create_from_det (opt_outfile, det); raysum_collect (rs_global, det, pic, 0, opt_trace, FALSE); #endif @@ -347,8 +353,7 @@ main (const int argc, char *const argv[]) raysum_close (rs_global); } #else - if (opt_in_memory) - raysum_write (rs_global); + raysum_write (rs_global); raysum_close (rs_global); #endif @@ -356,7 +361,6 @@ main (const int argc, char *const argv[]) if (opt_trace >= TRACE_PIC) { - crt_set_mode (GM_TEXT, TRUE); crt_set_cpos (1, 1); printf("Finished\n"); }