Twice the cores?

68 views
Skip to first unread message

Michael

unread,
Oct 21, 2013, 10:35:47 PM10/21/13
to nipy...@googlegroups.com
I noticed that my pipelines tend to use twice the number NCORES of cores i set with the MultiProc plugin. 

I mainly used a series of registration with FSL tools and noticed that the number of tasks being processed (as indicated by the number of *_unfinished.json files) corresponds to NCORES although actually 2*NCORES cores are being used. Would someone have an explanation? When i run a task on the command line (with exactly the same command as generated by NiPype) it only uses 1 core.

Satrajit Ghosh

unread,
Oct 21, 2013, 10:40:24 PM10/21/13
to nipy-user
hi michael,

since this tends to depend on the underlying interface, could you please provide some details on which processes? afni, for example, uses openmp and by default will use all cores available. we should add a flag in afni to control the number of threads, much like we do for ants.

try setting OMP_NUM_THREADS to 1 in the environment and see if it still does the 2 core thing.

cheers,

satra


On Mon, Oct 21, 2013 at 10:35 PM, Michael <mdayan....@gmail.com> wrote:
I noticed that my pipelines tend to use twice the number NCORES of cores i set with the MultiProc plugin. 

I mainly used a series of registration with FSL tools and noticed that the number of tasks being processed (as indicated by the number of *_unfinished.json files) corresponds to NCORES although actually 2*NCORES cores are being used. Would someone have an explanation? When i run a task on the command line (with exactly the same command as generated by NiPype) it only uses 1 core.

--
 
---
You received this message because you are subscribed to the Google Groups "NiPy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nipy-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Michael

unread,
Oct 21, 2013, 10:47:40 PM10/21/13
to nipy...@googlegroups.com
Hi Satra, right now this is with FSL flirt. I'll test the OMP_NUM_THREADS variable and report here, thanks for this tip.

Satrajit Ghosh

unread,
Oct 21, 2013, 10:48:42 PM10/21/13
to nipy-user
flirt doesn't use more than one core, so i don't know what's happening there.

cheers,

satra

Michael

unread,
Oct 21, 2013, 11:11:24 PM10/21/13
to nipy...@googlegroups.com
htop indicates two different PIDs (each using 100% core) for the exact same flirt command. Not sure what's going either (when running the command on a terminal only one core is used)


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "NiPy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nipy-user/CPjld7rIsMk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nipy-user+...@googlegroups.com.

Chris Filo Gorgolewski

unread,
Oct 22, 2013, 2:21:09 AM10/22/13
to nipy...@googlegroups.com
Is the Flirt in mapnode? Does you CPU support hyperthreading?

Michael

unread,
Oct 22, 2013, 9:51:01 AM10/22/13
to nipy...@googlegroups.com
It is doing this even in non-map node but i believe this has to do with the number of threads as you suggested. Not only the CPU supports hyperthreading but the output of cat /proc/cpuinfo give a number of cores which is twice the number of threads! (itself twice the number of physical cores...). So it seems that for some reason each single active thread is duplicated in the output of top/htop. 

Michael Waskom

unread,
Oct 29, 2013, 10:09:56 PM10/29/13
to nipy...@googlegroups.com
I can replicate this issue, currently with the fsl.FILMGLS. I end up seeing twice as many processes as I asked for, with duplicate jobs. I do not see similar behavior for the IPython or Linear plugins.

I'm currently using this commit of master, it appears.

The problem seems to happen when using both Canopy and Anaconda.

Will look into it more.

Michael Waskom

unread,
Oct 29, 2013, 10:27:10 PM10/29/13
to nipy...@googlegroups.com
And just for the record, doing a git pull does not fix the issue.
Reply all
Reply to author
Forward
0 new messages