POV-Ray : Newsgroups : povray.general : Scripts for Parallel Rendering of Animations : Re: Scripts for Parallel Rendering of Animations Server Time
29 Jul 2024 10:24:21 EDT (-0400)
  Re: Scripts for Parallel Rendering of Animations  
From: Dave
Date: 27 Oct 2011 11:10:55
Message: <4ea9747f$1@news.povray.org>
On 10/27/2011 7:22 AM, Verklagekasper wrote:
>    if not exist !filename!.%suffix% (

Note that there is a race condition here both on a single 
multi-processor PC or when using multiple PC's referencing a network
shared folder. In practice you >will< wind up with two or more
PC/core's rendering the same image.

In the unix world, "mkdir" is typically used as a lock mechanism
to serialize this test since "mkdir" is serialized by the underlying
file system both on a single PC or on the PC upon which the folder is
shared:

lock() {
   while ! mkdir lock
   do
     sleep 1
   done
}
unlock() {
   rm -fr lock
}

This would be used:

lock
if [ ! -f $FILENAME ]
then
   touch $FILENAME
   unlock
   :
   :
else
   unlock
fi


I don't know enough windows bat syntax to translate the above to windows.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.