Parallelizing a binary executable

Command Line Interface

Parallelizing a binary executable

Postby e88 » 2014-02-20 07:49:43

I have an binary executable, which I am using to process TIFF images. Processing one image takes 20-30 minutes on my own computer.

I have hundreds of images, and I was thinking what is the simplest way to parallelize the processing with Techila. Would it be easiest to do this from the Command Line?
Posts: 59
Joined: 2013-05-23 06:41:34

Re: Parallelizing a binary executable

Postby eerola » 2014-02-20 08:07:54

I agree, CLI makes sense. Personally, if I would do this frequently, I would probably write a script. But the "plain CLI" works fine, too.

In a Windows environment, I would use:

Code: Select all
dir /b *.tiff|%techila% peach command=yourbinary.exe parameters="jobinputfile1" outputfiles=processed.tiff jobinputfiles="<stdin>"

In this example we assume that you are in the same directory with your executable ("yourbinary.exe"). We also assume that your TIFF files are in the same directory. This command will parallelize the execution of the "yourbinary.exe" to your Techila environment, and gives each individual process one of the input images files.

This example assumes that "yourbinary.exe" produces a file called "processed.tiff". When "yourbinary.exe" has done the processing it will return the "processed.tiff" files to a folder called "output" in the directory where you launched the command. If you want more advanced post-processing of the output files, there are more features for that, but this time I want to keep this simple.

Information about more advanced features can be found in "Techila Command Line Interface" document, which is included in the Techila SDK.

In my example I am using %techila%. That is is an environment variable which points to techila.jar in my Techila SDK directory. I have set this using

Code: Select all
set techila=java –jar <path_to>\techila.jar
Techila Staff
Techila Staff
Posts: 58
Joined: 2012-07-30 07:39:30

Return to CLI