- Make sure the tool managing the process to be distributed supports parallel execution of non-dependent processes.
- Create a Profile XML file describing the tools which are to be executed remotely and also describes the tools that are invokers.
- Create a Profile XML file that specifies the settings for each task that you want Incredibuild to handle, whether they are tasks that are invokers or tasks that you want to run remotely. Tasks that you do not want Incredibuild to handle, you do not have to declare in the XML profile file. For each invoker task, set AllowIntercept=true. The main executable in your software should be defined in the profile XML with the AllowIntercept attribute set to “True”. If the process to be executed remotely is spawned by a child process of the main executable, the entire hierarchy of processes starting from the main executable should have the AllowIntercept attribute set to “True”. For example, if the main project is “a”, which executes “b”, and “b” executes “c” (the process whose execution we wish to distribute), then both “a” and “b” must be specified with the AllowIntercept attribute set to “True”. For each task that is to be distributed to a remote machine, set AllowRemote=true
- Run the application or tool to be accelerated with Incredibuild, through the IBConsole command, supplying the name of the profile XML file and either a command line for the Job, or the name of the batch file containing the command that executes your application (see below for more details). For testing purposes, run the application in such a way that it will activate more processes than the number of cores that you have on the local machine so that Incredibuild will have to do distribution for some of the processes on a remote machine.If you are running IBConsole.exe with the “/COMMAND=” syntax, the application specified in the /COMMAND argument (or cmd.exe for a .bat file) will be implicitly given the AllowIntercept behavior.
Note:
- When an executable is specified with AllowRemote=True, all the processes under its branch are automatically executed within the designated core (e.g. remote core). Therefore, it is not necessary to specify AllowRemote for each subtask.
- Wildcards (e.g. *.exe , cl*.exe) are supported when using AllowRemote. When using AllowIntercept wildcards are not supported so the exact process names must be used (e.g. ProcessMain.exe)
Using IBConsole.exe with the Automatic Interception Interface
Once the above steps have been performed, a command line string can be used to run any tool with parallel process execution mode.This command line should be specified as an input argument to IBConsole.exe (see examples below). The profile XML file is also specified in the command line arguments. The process should execute in local parallel mode, with tools specified with “AllowRemote=True” in the Profile XML file executed on remote machines. The basic command line syntax for running a distributed XML job through the XML Interface is:-
<TOOL COMMAND>– the command line string used to run the tool with the parallel process execution mode enabled -
<PROFILE XML>– the Profile XML file -
Other Options– Refer to the IBConsole Command Reference section for more IBConsole.exe command line options.As an alternative to using a Profile XML file, it is possible to specify the AllowIntercept and AllowRemote directives explicitly in the IBConsole command line:IBConsole.exe /command="<TOOL COMMAND>" /allowremote="<FILENAME1[,FILENAME2,...]>" /allowintercept="<FILENAME1[,FILENAME2,...]>" [Other Options]
-
<TOOL COMMAND>– the command line string used to run the tool with the parallel process execution mode enabled -
<FILENAME1[,FILENAME2,...]>-a comma-separated list of tool filenames -
Other Options- Refer to the IBConsole Command Reference section for more IBConsole.exe command line options.
Example
Let us say you have an application called RenderApp.exe, which knows to run in parallel many tasks of RenderTask.exe, where each RenderTask.exe gets a frame and renders it. If you run this application in a regular way, i.e. without multiple cores, you can call it as follows:- Incredibuild executes the main process RenderApp.exe.
- Incredibuild intercepts all calls, which relate to process invocation that RenderApp.exe is to perform, and compares them to the list of processes that are marked in the profile.xml file as “AllowRemote=true”.
- When Incredibuild encounters a process invocation that is marked in the process as AllowRemote=true, the Incredibuild engine distributes this process to a remote machine instead of executing it locally.
- Any output generated by the remotely executed process is forwarded to the local machine (Initiator) as though it was executed on one of the local cores.
- The exe to run (DummyProcess.exe)
- The number of times to execute the process
- The sleep time before killing the processes
- [optional] The time until the sub-process kills itself