From: <mat...@us...> - 2003-01-02 06:53:24
|
Update of /cvsroot/pvmpov/pvmpov_3_5/src In directory sc8-pr-cvs1:/tmp/cvs-serv31503 Modified Files: pvm.cpp Log Message: MG * Fix a previous fix in pvm.cpp that turned out to be a bug Index: pvm.cpp =================================================================== RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/pvm.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pvm.cpp 1 Jan 2003 10:58:08 -0000 1.5 --- pvm.cpp 2 Jan 2003 06:53:21 -0000 1.6 *************** *** 237,241 **** minions = 0; for(i=0; i < PvmTasks; i++) { /* start one by one */ ! m = pvm_spawn(PvmSlavename, sargs, PvmTaskHost, PvmHosts[i % PvmHostsN], 1, tids+minions); if( m < 0) { /* spawn failed */ --- 237,241 ---- minions = 0; for(i=0; i < PvmTasks; i++) { /* start one by one */ ! m = pvm_spawn(PvmSlavename, sargs, PvmTaskHost, PvmHosts[i % PvmHostsN], 1, tids+minions); if( m < 0) { /* spawn failed */ *************** *** 670,674 **** * read already rendered parts */ ! if ((opts.Options & DISKWRITE) && (opts.Options & CONTINUE_TRACE)) { int i; int fl = opts.First_Line; /* remember start of image */ --- 670,675 ---- * read already rendered parts */ ! if ( (opts.Options & DISKWRITE) && (opts.Options & CONTINUE_TRACE) ) ! { int i; int fl = opts.First_Line; /* remember start of image */ *************** *** 676,687 **** Read_Rendered_Part(Actual_Output_Name); /* read -> changes opts.First_line */ ! frame_stat[frame].row_to_write = frame_stat[frame].row_to_malloc = opts.First_Line; // Status_Info("PvmStartFrame() opts.First_Line = %ld, OLD FORM (opts.First_Line/PvmChunkHeight)*grid_ppline = %ld\n", opts.First_Line, (opts.First_Line/PvmChunkHeight)*grid_ppline); frame_stat[frame].block_to_write = ! // next line has bug? here is my fix MG rev 2 ! // frame_stat[frame].block_to_assign = (opts.First_Line/PvmChunkHeight)*grid_ppline; ! frame_stat[frame].block_to_assign = ((opts.First_Line+PvmChunkHeight-1)/PvmChunkHeight)*grid_ppline; /* blocks above the new start are already finished */ for(i=0; i < frame_stat[frame].block_to_assign; i++) { --- 677,688 ---- Read_Rendered_Part(Actual_Output_Name); /* read -> changes opts.First_line */ ! frame_stat[frame].row_to_write = frame_stat[frame].row_to_malloc = opts.First_Line; // Status_Info("PvmStartFrame() opts.First_Line = %ld, OLD FORM (opts.First_Line/PvmChunkHeight)*grid_ppline = %ld\n", opts.First_Line, (opts.First_Line/PvmChunkHeight)*grid_ppline); frame_stat[frame].block_to_write = ! // MG next line has bug? no, this is no bug, it ensures that any partially rendered blocks are re-rendered ! frame_stat[frame].block_to_assign = (opts.First_Line/PvmChunkHeight)*grid_ppline; ! // frame_stat[frame].block_to_assign = ((opts.First_Line+PvmChunkHeight-1)/PvmChunkHeight)*grid_ppline; /* blocks above the new start are already finished */ for(i=0; i < frame_stat[frame].block_to_assign; i++) { |