|
From: <mat...@us...> - 2003-01-01 10:58:13
|
Update of /cvsroot/pvmpov/pvmpov_3_5/src
In directory sc8-pr-cvs1:/tmp/cvs-serv13485
Modified Files:
optin.cpp optout.cpp optout.h png_pov.cpp png_pov.h
povmsend.cpp povmsrec.cpp povray.cpp povray.h pvm.cpp
render.cpp renderio.cpp userio.cpp
Log Message:
MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
MG * Add pvm_hosts option.
MG * Modify PNG file class to handle multiple streams and continue
MG trace options.
MG * Add hack to nullify Do_Cooperate() calls if possible.
MG * Ensure PVM is disabled by default.
Index: optin.cpp
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/optin.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** optin.cpp 30 Dec 2002 19:33:42 -0000 1.5
--- optin.cpp 1 Jan 2003 10:58:07 -0000 1.6
***************
*** 26,29 ****
--- 26,37 ----
* $Author$
* $Log$
+ * Revision 1.6 2003/01/01 10:58:07 matthewgrove
+ * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
+ * MG * Add pvm_hosts option.
+ * MG * Modify PNG file class to handle multiple streams and continue
+ * MG trace options.
+ * MG * Add hack to nullify Do_Cooperate() calls if possible.
+ * MG * Ensure PVM is disabled by default.
+ *
* Revision 1.5 2002/12/30 19:33:42 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
***************
*** 556,560 ****
case kPOVAttrib_PVMWD:
{
- /* TODO - first version, yet to be tested */
long len = 1024;
char str[1025];
--- 564,567 ----
***************
*** 565,569 ****
}
case kPOVAttrib_PVMHosts:
! /* TODO */
break;
case kPOVAttrib_PVMBeSlave:
--- 572,611 ----
}
case kPOVAttrib_PVMHosts:
! /* TODO test */
! err = POVMSObject_Get(obj, &list, option->key);
! if(err != 0)
! break;
!
! l = 0;
! err = POVMSAttrList_Count(&list, &l);
! if(err != 0)
! break;
! if(l == 0)
! break;
!
! imax = l;
! for(i = 1; i <= imax; i++)
! {
! file->printf("%s=", option->keyword);
! err = POVMSAttrList_GetNth(&list, i, &item);
! if(err == 0)
! {
! l = 0;
! err = POVMSAttr_Size(&item, &l);
! if(l > 0)
! {
! bufptr = (char *)POV_MALLOC(l, "PVM hostname buffer");
! bufptr[0] = 0;
! if(POVMSAttr_Get(&item, kPOVMSType_CString, bufptr, &l) == 0)
! {
! if ( i > 1 ) file->printf(",");
! file->printf("%s", bufptr);
! }
! POV_FREE(bufptr);
! }
! (void)POVMSAttr_Delete(&item);
! }
! }
! file->printf("\n");
break;
case kPOVAttrib_PVMBeSlave:
***************
*** 1221,1230 ****
case kPOVAttrib_PVMArch:
case kPOVAttrib_PVMWD:
- /* TODO test */
err = POVMSUtil_SetString(obj, option->key, param);
break;
case kPOVAttrib_PVMHosts:
! /* TODO */
break;
case kPOVAttrib_PVMBeSlave:
/* NOTHING TO DO, cannot be specified in ini file??? */
--- 1263,1294 ----
case kPOVAttrib_PVMArch:
case kPOVAttrib_PVMWD:
err = POVMSUtil_SetString(obj, option->key, param);
break;
case kPOVAttrib_PVMHosts:
! /* TODO test */
! {
! int start=0, end=0;
! POVMSAttribute attr;
! err = POVMSAttrList_New(&list);
!
! while ( param[end] )
! {
! end++;
! if ( (param[end] == ',') || (param[end] == '\0') )
! {
! char s[1025];
! strncpy(s, &(param[start]), min(1024, end-start));
! s[min(1024, end-start)] = '\0';
! err = POVMSAttr_New(&attr);
! err = POVMSAttr_Set(&attr, kPOVMSType_CString, s, strlen(s) + 1);
! if(err == kNoErr)
! err = POVMSAttrList_Append(&list, &attr);
! end++;
! start = end;
! }
! }
! err = POVMSObject_Set(obj, &list, option->key);
break;
+ }
case kPOVAttrib_PVMBeSlave:
/* NOTHING TO DO, cannot be specified in ini file??? */
Index: optout.cpp
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/optout.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** optout.cpp 30 Dec 2002 19:33:42 -0000 1.4
--- optout.cpp 1 Jan 2003 10:58:07 -0000 1.5
***************
*** 26,29 ****
--- 26,37 ----
* $Author$
* $Log$
+ * Revision 1.5 2003/01/01 10:58:07 matthewgrove
+ * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
+ * MG * Add pvm_hosts option.
+ * MG * Modify PNG file class to handle multiple streams and continue
+ * MG trace options.
+ * MG * Add hack to nullify Do_Cooperate() calls if possible.
+ * MG * Ensure PVM is disabled by default.
+ *
* Revision 1.4 2002/12/30 19:33:42 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
***************
*** 89,94 ****
#include "isosurf.h"
- /* Matthew Grove
- */
#ifdef HAVE_LIBPVM3
#include "pvm.h"
--- 97,100 ----
Index: optout.h
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/optout.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** optout.h 30 Dec 2002 19:33:42 -0000 1.5
--- optout.h 1 Jan 2003 10:58:07 -0000 1.6
***************
*** 26,29 ****
--- 26,37 ----
* $Author$
* $Log$
+ * Revision 1.6 2003/01/01 10:58:07 matthewgrove
+ * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
+ * MG * Add pvm_hosts option.
+ * MG * Modify PNG file class to handle multiple streams and continue
+ * MG trace options.
+ * MG * Add hack to nullify Do_Cooperate() calls if possible.
+ * MG * Ensure PVM is disabled by default.
+ *
* Revision 1.5 2002/12/30 19:33:42 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
***************
*** 51,63 ****
/* These are used by OPTOUT.C and the machine specific modules */
-
- /* Matthew Grove
- Change distr message
- Increase max help page count
- Revision 2
- Update distr message
-
- */
-
#define POV_RAY_IS_OFFICIAL 0
--- 59,62 ----
Index: png_pov.cpp
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/png_pov.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** png_pov.cpp 30 Dec 2002 19:33:43 -0000 1.2
--- png_pov.cpp 1 Jan 2003 10:58:07 -0000 1.3
***************
*** 28,32 ****
* Updated to use the libpng 0.89 structure interface, Jun 1996
*
! * $File: //depot/povray/3.5/source/png_pov.cpp $
* $Revision$
* $Change: 1817 $
--- 28,32 ----
* Updated to use the libpng 0.89 structure interface, Jun 1996
*
! * $File: //depot/povray/3.5/source/userio.cpp $
* $Revision$
* $Change: 1817 $
***************
*** 34,38 ****
* $Author$
* $Log$
! * Revision 1.2 2002/12/30 19:33:43 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
* patch (revision 2).
--- 34,46 ----
* $Author$
* $Log$
! * Revision 1.3 2003/01/01 10:58:07 matthewgrove
! * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
! * MG * Add pvm_hosts option.
! * MG * Modify PNG file class to handle multiple streams and continue
! * MG trace options.
! * MG * Add hack to nullify Do_Cooperate() calls if possible.
! * MG * Ensure PVM is disabled by default.
! *
! * Revision 1.4 2002/12/30 19:33:45 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
* patch (revision 2).
***************
*** 105,110 ****
******************************************************************************/
! /* MG comment out these and add to class
!
static png_struct *png_ptr = NULL;
static png_info *info_ptr = NULL;
--- 113,118 ----
******************************************************************************/
! // png hack to help with continue trace and multiple streams
! #ifndef HAVE_LIBPVM3
static png_struct *png_ptr = NULL;
static png_info *info_ptr = NULL;
***************
*** 120,124 ****
POV_ISTREAM *PNG_Image::in_file = NULL;
POV_OSTREAM *PNG_Image::out_file = NULL;
! */
/*****************************************************************************
--- 128,132 ----
POV_ISTREAM *PNG_Image::in_file = NULL;
POV_OSTREAM *PNG_Image::out_file = NULL;
! #endif
/*****************************************************************************
***************
*** 325,343 ****
height = h ;
! // MG
! info_ptr = NULL;
o_png_ptr = NULL;
row_ptr = NULL;
tmp_fp = NULL;
png_ptr = NULL;
buffer_size = 0;
buffer = NULL;
in_file= NULL;
out_file = NULL;
switch (mode)
{
case READ_MODE:
!
in_file = NULL;
out_file = NULL;
--- 333,352 ----
height = h ;
! #ifdef HAVE_LIBPVM3
o_png_ptr = NULL;
row_ptr = NULL;
tmp_fp = NULL;
png_ptr = NULL;
+ info_ptr = NULL;
buffer_size = 0;
buffer = NULL;
in_file= NULL;
out_file = NULL;
+ #endif
switch (mode)
{
case READ_MODE:
!
in_file = NULL;
out_file = NULL;
***************
*** 710,717 ****
case APPEND_MODE:
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
if (setjmp(png_ptr->jmpbuf))
{
! /* If we get here, we had a problem writing the file */
if (buffer != NULL)
--- 719,727 ----
case APPEND_MODE:
+ #ifndef HAVE_LIBPVM3
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
if (setjmp(png_ptr->jmpbuf))
{
! // If we get here, we had a problem writing the file
if (buffer != NULL)
***************
*** 729,740 ****
}
! /* Write out the data in the PNG/zlib buffers, and set automatic
! * flushing for every few scanlines, in case of a rude crash.
! */
png_write_flush(png_ptr);
png_set_flush(png_ptr, FLUSH_DIST);
! #else /* !PNG_WRITE_FLUSH_SUPPORTED */
fflush(file);
! #endif /* PNG_WRITE_FLUSH_SUPPORTED */
if (!(opts.Options & TO_STDOUT))
--- 739,751 ----
}
! // Write out the data in the PNG/zlib buffers, and set automatic
! // flushing for every few scanlines, in case of a rude crash.
!
png_write_flush(png_ptr);
png_set_flush(png_ptr, FLUSH_DIST);
! #else // !PNG_WRITE_FLUSH_SUPPORTED
fflush(file);
! #endif // PNG_WRITE_FLUSH_SUPPORTED
! #endif // !HAVE_LIBPVM3
if (!(opts.Options & TO_STDOUT))
***************
*** 754,760 ****
--- 765,911 ----
return;
}
+
+ /********************************************/
+ // MG This is my hack to allow continue trace to work
+ // with my multiple output stream hack
+ #ifdef HAVE_LIBPVM3
+
+ buffer_size = opts.File_Buffer_Size;
+
+ if ((png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
+ (png_voidp)true, png_pov_err, png_pov_warn)) == NULL ||
+ (info_ptr = png_create_info_struct(png_ptr)) == NULL)
+ {
+ Error("Cannot allocate PNG data structures");
+ }
+
+ if (setjmp(png_ptr->jmpbuf))
+ {
+ // If we get here, we had a problem writing the file
+ if (buffer != NULL)
+ {
+ POV_FREE(buffer);
+ buffer = NULL;
+ }
+
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+
+ POV_DELETE(out_file, POV_OSTREAM);
+ out_file = NULL;
+
+ return;
+ }
+
+ /* Set up the compression structure */
+
+ // png_set_read_fn(png_ptr, out_file, png_pov_read_data);
+ png_set_write_fn(png_ptr, out_file, png_pov_write_data, png_pov_flush_data);
+
+ /* Fill in the relevant image information */
+
+ info_ptr->width = width = w;
+ info_ptr->height = height = h;
+
+ info_ptr->bit_depth = 8 * ((opts.OutputQuality + 7) / 8);
+
+ if (opts.Options & HF_GRAY_16)
+ {
+ if ( info_ptr->bit_depth < 16 ) {
+ info_ptr->bit_depth = 16;
+ opts.OutputQuality = 16;
+ }
+ info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
+ }
+ else
+ {
+ info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+ }
+
+ if (opts.Options & OUTPUT_ALPHA)
+ {
+ info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
+ }
+
+ #if defined(PNG_WRITE_sBIT_SUPPORTED)
+ if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
+ {
+ info_ptr->sig_bit.red =
+ info_ptr->sig_bit.green =
+ info_ptr->sig_bit.blue = opts.OutputQuality;
+ }
+ else
+ {
+ info_ptr->sig_bit.gray = opts.OutputQuality;
+ }
+
+ if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
+ {
+ info_ptr->sig_bit.alpha = opts.OutputQuality;
+ }
+
+ info_ptr->valid |= PNG_INFO_sBIT;
+ #endif /* PNG_WRITE_sBIT_SUPPORTED */
+
+ #if defined(PNG_WRITE_gAMA_SUPPORTED)
+ if (!opts.histogram_on)
+ {
+ info_ptr->gamma = 1.0/opts.DisplayGamma;
+ info_ptr->valid |= PNG_INFO_gAMA;
+ }
+ else
+ {
+ info_ptr->gamma = 1.0;
+ info_ptr->valid |= PNG_INFO_gAMA;
+ }
+ #endif /* PNG_WRITE_gAMA_SUPPORTED */
+
+ #if defined(PNG_WRITE_oFFs_SUPPORTED)
+ if (opts.First_Column != 0 || opts.First_Line != 0)
+ {
+ info_ptr->x_offset = opts.First_Column;
+ info_ptr->y_offset = opts.First_Line;
+
+ info_ptr->offset_unit_type = PNG_OFFSET_PIXEL;
+
+ info_ptr->valid |= PNG_INFO_oFFs;
+ }
+ #endif /* PNG_WRITE_oFFs_SUPPORTED */
+
+ if (opts.histogram_on)
+ {
+ /* If we are writing a histogram file, we could potentially output
+ * a pCAL chunk with the max histogram value, to allow recovery of
+ * the original timing data. However, pCAL is not yet official at
+ * the time of this writing.
+ */
+ }
+
+ // MG apparently this is necessary, but it does not actually write anything to the file ???
+ png_write_info(png_ptr, info_ptr);
+
+ png_stride = info_ptr->color_type & PNG_COLOR_MASK_COLOR ? 3 : 1;
+
+ if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
+ png_stride++;
+
+ png_stride *= (opts.OutputQuality + 7) / 8;
+
+ row_ptr = (png_byte *)POV_MALLOC(w*png_stride, "PNG write row buffer");
+
+ #if defined(PNG_WRITE_FLUSH_SUPPORTED)
+ /* Set libpng to flush the output buffers every few lines, so that
+ * in case of a rude crash we don't lose very much data.
+ */
+ png_set_flush(png_ptr, FLUSH_DIST);
+ #endif /* PNG_WRITE_FLUSH_SUPPORTED */
+ #endif // HAVE_LIBPVM3
+ /********************************************/
+
+ #ifndef HAVE_LIBPVM3
png_set_write_fn(png_ptr, out_file, png_pov_write_data, png_pov_flush_data);
+ #endif
}
+ #ifndef HAVE_LIBPVM3
/* Delete the temporary data file. Note that the new output file
* is all ready to go - nothing needs to be done here.
***************
*** 770,773 ****
--- 921,925 ----
}
}
+ #endif
}
Index: png_pov.h
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/png_pov.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** png_pov.h 30 Dec 2002 19:33:43 -0000 1.2
--- png_pov.h 1 Jan 2003 10:58:07 -0000 1.3
***************
*** 26,29 ****
--- 26,37 ----
* $Author$
* $Log$
+ * Revision 1.3 2003/01/01 10:58:07 matthewgrove
+ * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
+ * MG * Add pvm_hosts option.
+ * MG * Modify PNG file class to handle multiple streams and continue
+ * MG trace options.
+ * MG * Add hack to nullify Do_Cooperate() calls if possible.
+ * MG * Ensure PVM is disabled by default.
+ *
* Revision 1.2 2002/12/30 19:33:43 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
***************
*** 75,79 ****
int initial_line_number;
! // MG no longer static
int line_number;
int buffer_size;
--- 83,87 ----
int initial_line_number;
! #ifdef HAVE_LIBPVM3
int line_number;
int buffer_size;
***************
*** 90,93 ****
--- 98,108 ----
char tmp_fname[FILE_NAME_LENGTH];
POV_ISTREAM *tmp_fp;
+ #else
+ static int line_number;
+ static int buffer_size;
+ static char *buffer;
+ static POV_ISTREAM *in_file;
+ static POV_OSTREAM *out_file;
+ #endif
};
Index: povmsend.cpp
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/povmsend.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** povmsend.cpp 30 Dec 2002 19:33:44 -0000 1.2
--- povmsend.cpp 1 Jan 2003 10:58:07 -0000 1.3
***************
*** 26,29 ****
--- 26,37 ----
* $Author$
* $Log$
+ * Revision 1.3 2003/01/01 10:58:07 matthewgrove
+ * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
+ * MG * Add pvm_hosts option.
+ * MG * Modify PNG file class to handle multiple streams and continue
+ * MG trace options.
+ * MG * Add hack to nullify Do_Cooperate() calls if possible.
+ * MG * Ensure PVM is disabled by default.
+ *
* Revision 1.2 2002/12/30 19:33:44 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
***************
*** 60,64 ****
#include "pov_util.h"
- // Matthew Grove
#ifdef HAVE_LIBPVM3
#include "pvm.h"
--- 68,71 ----
***************
*** 471,475 ****
if(err == kNoErr)
err = POVMSUtil_SetString(msg, kPOVAttrib_PVMWD, PvmWorkingDir);
! // TODO "PVM_Hosts", a list of cstrings
#endif
--- 478,506 ----
if(err == kNoErr)
err = POVMSUtil_SetString(msg, kPOVAttrib_PVMWD, PvmWorkingDir);
! if(err == kNoErr)
! {
! POVMSAttributeList list;
!
! err = POVMSAttrList_New(&list);
! if(err == kNoErr)
! {
! int ii;
!
! for ( ii = 0; ii < PvmHostsN; ii++ )
! {
! err = POVMSAttr_New(&attr);
! if(err == kNoErr)
! {
! err = POVMSAttr_Set(&attr, kPOVMSType_CString, PvmHosts[ii], strlen(PvmHosts[ii]) + 1);
! if(err == kNoErr)
! err = POVMSAttrList_Append(&list, &attr);
! else
! err = POVMSAttr_Delete(&attr);
! }
! }
! if(err == kNoErr)
! err = POVMSObject_Set(msg, &list, kPOVAttrib_PVMHosts);
! }
! }
#endif
Index: povmsrec.cpp
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/povmsrec.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** povmsrec.cpp 30 Dec 2002 19:33:44 -0000 1.6
--- povmsrec.cpp 1 Jan 2003 10:58:07 -0000 1.7
***************
*** 26,29 ****
--- 26,37 ----
* $Author$
* $Log$
+ * Revision 1.7 2003/01/01 10:58:07 matthewgrove
+ * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
+ * MG * Add pvm_hosts option.
+ * MG * Modify PNG file class to handle multiple streams and continue
+ * MG trace options.
+ * MG * Add hack to nullify Do_Cooperate() calls if possible.
+ * MG * Ensure PVM is disabled by default.
+ *
* Revision 1.6 2002/12/30 19:33:44 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
***************
*** 850,855 ****
}
if( POVMSObject_Exist(msg, kPOVAttrib_PVMWD) == 0 )
! { /* we have found a working directory
! TODO test this code */
char str[1025];
long len=1024;
--- 858,862 ----
}
if( POVMSObject_Exist(msg, kPOVAttrib_PVMWD) == 0 )
! { /* we have found a working directory */
char str[1025];
long len=1024;
***************
*** 866,869 ****
--- 873,901 ----
}
// TODO "PVM_Hosts"
+
+ if ( POVMSObject_Get(msg, &attr, kPOVAttrib_PVMHosts) == 0 )
+ {
+ long cnt = 0;
+
+ if ( POVMSAttrList_Count(&attr, &cnt) == 0 )
+ {
+ POVMSAttribute item;
+ long ii,iii;
+ PvmHostsN = cnt;
+ PvmHosts = (char **)POV_MALLOC(sizeof(char *) * cnt, "PVMHosts");
+
+ for ( ii = 1; ii <= cnt; ii++ )
+ {
+ (void)POVMSAttr_New(&item);
+ if ( POVMSAttrList_GetNth(&attr, ii, &item) == 0 )
+ {
+ PvmHosts[ii-1] = (char *)POV_MALLOC(sizeof(char) * 1024, "PVM hostname");
+ POVMSAttr_Get(&item, kPOVMSType_CString, PvmHosts[ii-1], &iii);
+ }
+ }
+ }
+
+ }
+
#endif
if(POVMSObject_Exist(msg, kPOVAttrib_IncludeHeader) == 0)
Index: povray.cpp
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/povray.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** povray.cpp 30 Dec 2002 19:33:44 -0000 1.4
--- povray.cpp 1 Jan 2003 10:58:08 -0000 1.5
***************
*** 21,25 ****
* DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
*
! * $File: //depot/povray/3.5/source/povray.cpp $
* $Revision$
* $Change: 1817 $
--- 21,25 ----
* DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
*
! * $File: //depot/povray/3.5/source/povmsrec.cpp $
* $Revision$
* $Change: 1817 $
***************
*** 27,31 ****
* $Author$
* $Log$
! * Revision 1.4 2002/12/30 19:33:44 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
* patch (revision 2).
--- 27,39 ----
* $Author$
* $Log$
! * Revision 1.5 2003/01/01 10:58:08 matthewgrove
! * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
! * MG * Add pvm_hosts option.
! * MG * Modify PNG file class to handle multiple streams and continue
! * MG trace options.
! * MG * Add hack to nullify Do_Cooperate() calls if possible.
! * MG * Ensure PVM is disabled by default.
! *
! * Revision 1.6 2002/12/30 19:33:44 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
* patch (revision 2).
***************
*** 536,540 ****
FrameLoop();
! Do_Cooperate_0; // MG Do_Cooperate(0);
/* Clean up */
--- 544,548 ----
FrameLoop();
! Do_Cooperate(0);
/* Clean up */
***************
*** 621,625 ****
else
{
! PvmMasterEnd();
}
--- 629,633 ----
else
{
! if ( PvmTasks) PvmMasterEnd();
}
***************
*** 643,647 ****
}
! Do_Cooperate_0; // MG Do_Cooperate(0);
pre_init_flag=1;
--- 651,655 ----
}
! Do_Cooperate(0);
pre_init_flag=1;
***************
*** 757,761 ****
POVRAY_END_COOPERATE
! Do_Cooperate_2; // MG Do_Cooperate(2);
}
#endif
--- 765,769 ----
POVRAY_END_COOPERATE
! Do_Cooperate(2);
}
#endif
***************
*** 897,901 ****
}
! Do_Cooperate_1; // MG Do_Cooperate(1);
}
#ifdef HAVE_LIBPVM3
--- 905,909 ----
}
! Do_Cooperate(1);
}
#ifdef HAVE_LIBPVM3
***************
*** 1141,1145 ****
Send_RenderTime(0, 0, 0);
! #ifdef HAVE_LIBPVM3
} /* PvmSlave || !PvmTasks */
#endif
--- 1149,1153 ----
Send_RenderTime(0, 0, 0);
! #ifdef HAVE_LIBPVM3
} /* PvmSlave || !PvmTasks */
#endif
***************
*** 1333,1336 ****
--- 1341,1345 ----
******************************************************************************/
+ #ifdef USE_POVRAY_COOPERATE
void Do_Cooperate(int level)
{
***************
*** 1344,1348 ****
case 0:
#ifndef DONT_USE_POVMS
- abc
do
{
--- 1353,1356 ----
***************
*** 1359,1362 ****
--- 1367,1371 ----
};
}
+ #endif
/*****************************************************************************
***************
*** 1369,1373 ****
*
* OUTPUT
! *
* RETURNS
*
--- 1378,1382 ----
*
* OUTPUT
! *
* RETURNS
*
Index: povray.h
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/povray.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** povray.h 30 Dec 2002 19:33:44 -0000 1.2
--- povray.h 1 Jan 2003 10:58:08 -0000 1.3
***************
*** 26,29 ****
--- 26,37 ----
* $Author$
* $Log$
+ * Revision 1.3 2003/01/01 10:58:08 matthewgrove
+ * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
+ * MG * Add pvm_hosts option.
+ * MG * Modify PNG file class to handle multiple streams and continue
+ * MG trace options.
+ * MG * Add hack to nullify Do_Cooperate() calls if possible.
+ * MG * Ensure PVM is disabled by default.
+ *
* Revision 1.2 2002/12/30 19:33:44 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
***************
*** 508,511 ****
--- 516,521 ----
#else
void povray_init();
+ // MG We can skip the Do_Cooperate calls
+ #define Do_Cooperate(x)
#endif
int povray_render(
***************
*** 519,525 ****
#ifdef USE_POVRAY_COOPERATE
void povray_cooperate();
- #endif
-
void Do_Cooperate(int level);
SHELLRET pov_shellout (SHELLTYPE Type);
--- 529,534 ----
#ifdef USE_POVRAY_COOPERATE
void povray_cooperate();
void Do_Cooperate(int level);
+ #endif
SHELLRET pov_shellout (SHELLTYPE Type);
Index: pvm.cpp
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/pvm.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pvm.cpp 30 Dec 2002 19:33:44 -0000 1.4
--- pvm.cpp 1 Jan 2003 10:58:08 -0000 1.5
***************
*** 13,17 ****
*
* You need the PVM 3.x libraries, include files, and PVMD daemons.
! *
* PVM is available from the University of Tennessee, Knoxville, TN.
*
--- 13,17 ----
*
* You need the PVM 3.x libraries, include files, and PVMD daemons.
! *
* PVM is available from the University of Tennessee, Knoxville, TN.
*
***************
*** 41,48 ****
#include <sys/resource.h>
#include <signal.h>
#include "frame.h"
#include "vector.h"
#include "povproto.h"
- #include "frame.h"
#include "povray.h"
#include "render.h"
--- 41,51 ----
#include <sys/resource.h>
#include <signal.h>
+
#include "frame.h"
+
+ #ifdef HAVE_LIBPVM3
+
#include "vector.h"
#include "povproto.h"
#include "povray.h"
#include "render.h"
***************
*** 75,82 ****
char PvmArch[20] = { 0 };
int PvmChunkHeight = PVM_DEFAULT_GRID_HEIGHT; /* height of a block */
! int PvmChunkWidth = PVM_DEFAULT_GRID_WIDTH; /* widht of a block */
int PvmRowsToSend = 1;
int PvmSlave = 0;
! int PvmTasks = 9999;
int PvmNice = PVM_DEFAULT_NICE;
int PvmMTid;
--- 78,85 ----
char PvmArch[20] = { 0 };
int PvmChunkHeight = PVM_DEFAULT_GRID_HEIGHT; /* height of a block */
! int PvmChunkWidth = PVM_DEFAULT_GRID_WIDTH; /* width of a block */
int PvmRowsToSend = 1;
int PvmSlave = 0;
! int PvmTasks = 0; /* not active by default */
int PvmNice = PVM_DEFAULT_NICE;
int PvmMTid;
***************
*** 1441,1445 ****
pvm_pkSTAT( (long*)stats, MaxStat*sizeof(COUNTER)/sizeof(long), 1);
pvm_send(PvmMTid, PVM_SLAVE_STATS);
- // init_statistics(stats); // MG
}
}
--- 1444,1447 ----
***************
*** 1623,1624 ****
--- 1625,1629 ----
}
}
+
+ #endif
+
Index: render.cpp
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/render.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** render.cpp 30 Dec 2002 19:33:45 -0000 1.4
--- render.cpp 1 Jan 2003 10:58:08 -0000 1.5
***************
*** 30,33 ****
--- 30,41 ----
* $Author$
* $Log$
+ * Revision 1.5 2003/01/01 10:58:08 matthewgrove
+ * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
+ * MG * Add pvm_hosts option.
+ * MG * Modify PNG file class to handle multiple streams and continue
+ * MG trace options.
+ * MG * Add hack to nullify Do_Cooperate() calls if possible.
+ * MG * Ensure PVM is disabled by default.
+ *
* Revision 1.4 2002/12/30 19:33:45 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
***************
*** 870,874 ****
check_stats(Current_Line_Number, 1, PixelSize);
! Do_Cooperate_0; // MG Do_Cooperate(0);
/* do each column/pixel on a row */
--- 878,882 ----
check_stats(Current_Line_Number, 1, PixelSize);
! Do_Cooperate(0);
/* do each column/pixel on a row */
***************
*** 1062,1066 ****
check_stats(Current_Line_Number, 1, skip);
! Do_Cooperate_0; // MG Do_Cooperate(0);
for (x = opts.First_Column; x < opts.Last_Column; x += skip)
--- 1070,1074 ----
check_stats(Current_Line_Number, 1, skip);
! Do_Cooperate(0);
for (x = opts.First_Column; x < opts.Last_Column; x += skip)
***************
*** 1351,1355 ****
check_stats(Current_Line_Number, 0, 1);
! Do_Cooperate_0; // MG Do_Cooperate(0);
/* Prune vista tree. */
--- 1359,1363 ----
check_stats(Current_Line_Number, 0, 1);
! Do_Cooperate(0);
/* Prune vista tree. */
***************
*** 1536,1540 ****
check_stats(Current_Line_Number, 0, 1);
! Do_Cooperate_0; // MG Do_Cooperate(0);
if (opts.Options & USE_VISTA_BUFFER)
--- 1544,1548 ----
check_stats(Current_Line_Number, 0, 1);
! Do_Cooperate(0);
if (opts.Options & USE_VISTA_BUFFER)
***************
*** 1734,1738 ****
int oldptflag;
! Do_Cooperate_1; // MG Do_Cooperate(1);
Increase_Counter(stats[Number_Of_Rays]);
--- 1742,1746 ----
int oldptflag;
! Do_Cooperate(1);
Increase_Counter(stats[Number_Of_Rays]);
Index: renderio.cpp
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/renderio.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** renderio.cpp 30 Dec 2002 19:33:45 -0000 1.2
--- renderio.cpp 1 Jan 2003 10:58:08 -0000 1.3
***************
*** 26,29 ****
--- 26,37 ----
* $Author$
* $Log$
+ * Revision 1.3 2003/01/01 10:58:08 matthewgrove
+ * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
+ * MG * Add pvm_hosts option.
+ * MG * Modify PNG file class to handle multiple streams and continue
+ * MG trace options.
+ * MG * Add hack to nullify Do_Cooperate() calls if possible.
+ * MG * Ensure PVM is disabled by default.
+ *
* Revision 1.2 2002/12/30 19:33:45 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
***************
*** 142,149 ****
opts.First_Line = Output_File->Line();
! if(opts.First_Line < 0) // MG was 1
{
! opts.First_Line = 0; // MG was 1
}
if(Output_File != NULL)
--- 150,167 ----
opts.First_Line = Output_File->Line();
! // MG What is this code for???
! // The original breaks the PVM code by setting First_Line to 1 when no file exists?
! // Why does this not break POV-Ray?
! #ifdef HAVE_LIBPVM3
! if(opts.First_Line < 0)
{
! opts.First_Line = 0;
}
+ #else
+ if(opts.First_Line < 1)
+ {
+ opts.First_Line = 1;
+ }
+ #endif
if(Output_File != NULL)
Index: userio.cpp
===================================================================
RCS file: /cvsroot/pvmpov/pvmpov_3_5/src/userio.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** userio.cpp 30 Dec 2002 19:33:45 -0000 1.4
--- userio.cpp 1 Jan 2003 10:58:08 -0000 1.5
***************
*** 26,29 ****
--- 26,37 ----
* $Author$
* $Log$
+ * Revision 1.5 2003/01/01 10:58:08 matthewgrove
+ * MG ** First pvmpov revision, based on pvmpovray35 rev 2 **
+ * MG * Add pvm_hosts option.
+ * MG * Modify PNG file class to handle multiple streams and continue
+ * MG trace options.
+ * MG * Add hack to nullify Do_Cooperate() calls if possible.
+ * MG * Ensure PVM is disabled by default.
+ *
* Revision 1.4 2002/12/30 19:33:45 flierl
* Import of the latest sources of POV-Ray version 3.5c and MG's PVM
***************
*** 176,180 ****
#endif
! Do_Cooperate_0; // MG Do_Cooperate(0);
return 0;
--- 184,188 ----
#endif
! Do_Cooperate(0);
return 0;
***************
*** 235,239 ****
}
! Do_Cooperate_0; // MG Do_Cooperate(0);
return 0;
--- 243,247 ----
}
! Do_Cooperate(0);
return 0;
***************
*** 276,280 ****
#endif
! Do_Cooperate_0; // MG Do_Cooperate(0);
return 0;
--- 284,288 ----
#endif
! Do_Cooperate(0);
return 0;
***************
*** 330,334 ****
}
! Do_Cooperate_0; // MG Do_Cooperate(0);
return 0;
--- 338,342 ----
}
! Do_Cooperate(0);
return 0;
|