dystrophy has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I work for a studio which does medical animation and 3d modelling (really neat-o stuff). I've been put in charge of managing the rendering of a rather large project. Unfortunately, multihost rendering is broken in the program (the NT/Win2K version) we use to create all our work.

I have been trying to come up with some ideas about how I can possibly distribute and render files across our (unfortunately NT) network using Perl (I dream of someday having all *nix machines here). Our systems have dual CPUs - the renderer does not take advantage of this, so we run two concurrent renderings on each box.
From my initial experimentations, I discovered that the renderer will not launch correctly using Win32::Process.

I truly appreciate the wisdom of the monks - I have visited often to search for answers.

TIA,
-dys

if anyone is really interested, I can post our URL (our store is all done in Perl!).

Replies are listed 'Best First'.
Re (tilly) 1: distribute render jobs
by tilly (Archbishop) on Nov 16, 2000 at 05:16 UTC
    Do you know why you are having trouble launching the rendering process? Without some information on that it will be hard to help. Best would be if you could find a way to launch it from a DOS prompt. If you can do it from the command prompt then it is much easier to figure out what you need to do in Perl. If you cannot launch it from the command prompt then you should look for any other programs that can launch it. One guess would be that you would have some way to do it with OLE.

    But really without further information we are at, "Well what should work doesn't. How do I do this?"

      I believe Win32::Process doesn't work because the renderer (vmantra) was ported from *nix using the cygwin libraries. Perhaps something to do with passing arguments?

      Vmantra works from the command prompt with the following syntax:
      vmantra < fileToRender
      I discovered that I can launch it using backticks, system, or exec.
      From what I can see here, I guess I'm stuck with writing a client/server app that executes a BAT file to run the renderer.

      -dys

        No, just piggyback off of a database. :-)

        Seriously, have a relational database with transactions. When new jobs need to be done, add database entries for the needed work. Have a simple client process in a loop. It is connected to the database. At the start of the loop it tries to open a transaction and get work assigned to it. If it can it then does the work (ie one render) and marks it as done. If it cannot it sleeps for a while and tries again.

        You can have other processes that add needed renders, check to see whether anything is taking a suspiciously long time, etc.