[Insight-developers] suggestion: use environment variable to
limit number of parallel threads
Bill Lorensen
bill.lorensen at gmail.com
Wed Sep 19 20:32:40 EDT 2007
Torsten,
At GE (when I was there), we passed the number of threads as a command line
argument. We had the same issues that you have. In general, I don't think we
use environment variables in ITK although I can't recall the justification.
Bill
On 9/19/07, Torsten Rohlfing <torsten at synapse.sri.com> wrote:
>
> Hi:
>
> I have a suggestion for ITK's multi-threaded processing framework. I
> think it would be useful to be able to set the maximum number of
> parallel threads using an environment variable, for example using
>
> export ITK_MAXIMUM_NUMBER_OF_THREADS=4
>
> (other shells and Windows accordingly).
>
> This would solve a problem I am having when running jobs with ITK-based
> applications in batch mode on my cluster. It is not always beneficial to
> run on all available CPUs, because other steps in a processing pipeline
> may not be parallel, and it may therefore be desirable to run multiple
> copies of the same pipeline on different data instead.
>
> By implementing this through an environment variable, we'd have this
> functionality in every application that uses ITK, without for example
> having to put a separate command line switch into each and every one of
> them.
>
> Also, the solution would be backward compatible, because if the chosen
> variable is not set, ITK can simply behave as it does now and allocate
> one thread per CPU.
>
> Best,
> Torsten
>
> --
> Torsten Rohlfing, PhD SRI International, Neuroscience Program
> Research Scientist 333 Ravenswood Ave, Menlo Park, CA 94025
> Phone: ++1 (650) 859-3379 Fax: ++1 (650) 859-2743
> torsten at synapse.sri.com http://www.stanford.edu/~rohlfing/
>
> "Though this be madness, yet there is a method in't"
>
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20070919/daaa4904/attachment.htm
More information about the Insight-developers
mailing list