To try out the generic submit script, you should first make a copy of the script to a network drive accessible by all machines on your network. (Since this script calls itself as a render script, it must be accessible by all machines via the same path)
See the examples below for how to use submit-generic.pl to render Renderman RIB files.
In place of the following example,
use an absolute path that can be accessed by your entire network:
UNIX: cp /usr/local/rush/examples/submit-generic.pl /server/jobs/rush
WINDOWS: copy c:\rush\examples\submit-generic.pl \\server\jobs\rush
The interface should pop up. If it doesn't, verify the first line in the script's path points to the correct location of your perl binary.
Click the help button (buttons with '?') for any field you want to know more about.
When the GUI pops up, note there are various 'Advanced Options' available if you scroll the window down.
In this example, choose 'perl'.
These are the commands you want to have executed for each
frame on all the machines, and will be run in the 'Shell'
you selected above.
Since we've selected 'perl', enter some perl commands
you know will work on both unix and Windows platforms:
print "Working on frame $ENV{RUSH_FRAME}\n";
system("netstat -an");
exit(0);
Note: If your commands assume you to be in a particular
directory, you better include a chdir command to the
full absolute path.
As with all render scripts, you should return a proper
exit code; 0=Done, 1=Fail, 2=Retry.
In our case, lets use any 5 available cpus at the lowest priority:
+any=5@1
Scroll down to 'Log Directory', and set the absolute path
to a network directory which all machines can access.
In place of the following example, use an absolute
path that is relevant to your network.
//net/tmp/logs
The job should submit, and an irush interface should pop up with the jobid already set.
The next time you bring up the submit form, it will have all the values set from the last execution. Note that you can save and load you data entries for easy retrieval.
For more info on the irush interface, see the irush tutorial.
Hit 'Frames' in irush to watch the progress of your job.
If some frames are running, or got done already, click on
some, and hit 'Logs' to see the output of the perl commands
you entered.
When you're finished with the job, hit 'Dump' in irush.
my $cmd = "render /path/to/rib/foo.$ENV{RUSH_PADFRAME}.rib"; print STDERR "Executing: $cmd\n"; if ( system($cmd) ) { exit(1); } exit(0);You can then save this as a form so you can easily recall it later.
Or, make the above into a perl script, adding more robust error checking, and use submit-generic.pl just to execute your script the 'Command'.
Again, using 'Shell: perl', set the 'Command' to be:
exit(system("perl /path/to/your/script.pl") >> 8);