Using Submission Interfaces

The following describes the general procedure for using Submission Interface:

  1. Modify your script/tool to callxgSubmit.exe and (optionally) xgWait.exe so that processes whose execution you wish to distribute are queued in the Grid Engine queue.

  2. Run the script/tool with IBConsole.

To convert your scripts for use with Incredibuild:

  1. Copy your script to a new location.

  2. Place each command that is to be run via Incredibuild within an xgSubmit call.

  3. Create any Groups needed for sequential processing.

  4. Add any necessary xgWait statements to the script, associating each of them with the appropriate Group(s) or all Groups.

  5. Save the new script and run it using IBConsole (supplying either a command line for the Job, or the name of the batch file).

It is not mandatory for all statements to be converted into xgSubmit tasks. They can remain in the script in their original form. Incredibuild will execute them on the local machine in a sequential manner.

Example 1

A batch script such as this one can easily be modified for Incredibuild.

Copy
DummyProcess.exe 3000DummyProcess.exe 2500DummyProcess.exe 2500
DummyProcess.exe 3000DummyProcess.exe 2800DummyProcess.exe 2000

(See the sample supplied in the Samples directory.)

In order to instruct Incredibuild to execute each of the above commands using remote helper machines, change the script file as follows (Batch File 4tasks.bat):

Copy
xgSubmit /ForceRemote /group=Group1 /caption=Task1-Group1 /command
DummyProcess.exe 3000xgSubmit /ForceRemote /group=Group1 /caption=Task2-Group1 /command
DummyProcess.exe 2500xgSubmit /ForceRemote /group=Group1 /caption=Task3-Group1 /command
DummyProcess.exe 2500xgWait /group=Group1xgSubmit /ForceRemote /group=Group2 /caption=Task4-Group2 /command
DummyProcess.exe 3000xgSubmit /ForceRemote /group=Group2 /caption=Task5-Group2 /command
DummyProcess.exe 2800xgSubmit /ForceRemote /group=Group2 /caption=Task6-Group2 /command
DummyProcess.exe 2000xgWait /group=Group2

In order to execute the script file using Incredibuild (assuming the script name is 4tasks.bat), execute the following command:

xgConsole "4tasks.bat” /openmonitor

Example 2

Your rendering program needs to process one thousand frames and your script / command line is designed to work on one frame at a time.

RenderApp 1-1000

This command will take 1000 times the time needed to process one frame. Similarly, a script that divides the job into 100 tasks might help show a progress bar but does not save any processing time:

RenderApp 1-100
RenderApp 101-200
RenderApp 201-300

RenderApp 901-1000

Using Incredibuild, you can create the following script:

xgSubmit / command RenderApp 1-100
xgSubmit / command RenderApp 101-200
xgSubmit / command RenderApp 201-300

xgSubmit / command RenderApp 901-1000)

Incredibuild sends each task off to the queue and, based on information from the Coordinator, the processing is distributed in parallel among the ten remote and local cores registered in the Incredibuild Grid pool. The processing is completed in a tenth of the original time required.

For a comprehensive overview of the IBConsole.exe command line options see this section.

Submission Interface Sample Project

You are welcome to look at our sample projects under the Incredibuild installation folder in Samples\Dev Tools Interfaces Usage Samples\Submission Interface. One such sample is Distribution Sample, which demonstrates a simple application distribution.

Note: Run BatchFileExecution.bat from the command prompt set to this folder. This will activate the "xgSubmit.exe" within the "BatchFile.bat", which will in turn launch many instances of the "DummyProcess.exe" and treat it as distributable.