nipreps / niworkflows

Common workflows for MRI (anatomical, functional, diffusion, etc)
https://www.nipreps.org/niworkflows
Apache License 2.0
87 stars 52 forks source link

Atropos single-threaded? #537

Open effigies opened 4 years ago

effigies commented 4 years ago

Watching htop, I don't think Atropos is ever spawning extra processes the way antsRegistration does, and its CPU usage never tops 100%.

Does someone else have any evidence to justify claiming these cores?

https://github.com/nipreps/niworkflows/blob/9b0f64659017f869530d9a33cf2a7b5c87b1e8c4/niworkflows/anat/ants.py#L530-L545

oesteban commented 4 years ago

I haven't found any issues in their repo mentioning multithreaded execution. In principle, ITK should make the multithreading almost automatically if the appropriate ITK environment variable is set. Nipype seems to at least have a notion of all the pertinent flags (https://github.com/nipy/nipype/blob/master/nipype/interfaces/ants/base.py#L13-L26), but I'm not sure whether the particular one that works with atropos is correctly set.

effigies commented 4 years ago

Sure, multithreading should be automatic, but I think it's a single-threaded job.