Skip to content

MultiProc Plugin is double-submitting jobs #705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mwaskom opened this issue Oct 30, 2013 · 12 comments
Closed

MultiProc Plugin is double-submitting jobs #705

mwaskom opened this issue Oct 30, 2013 · 12 comments
Labels

Comments

@mwaskom
Copy link
Member

mwaskom commented Oct 30, 2013

This problem is summarized in this thread: https://groups.google.com/forum/#!topic/nipy-user/CPjld7rIsMk

Basically, running a workflow with MultiProc and asking for a specific n_proc runs (2 * n_proc) processes, with each job duplicated. I do not see similar behavior with the Linear or IPython plugins, and the behavior is occurring (for me) on an older CPU that does not do any hyperthreading fanciness. The double computation is definitely happening, as asking for a MultiProc execution with as many procs as I have cores ground my computer to a complete halt.

I'll try to put together a test workflow to produce this behavior.

@chrisgorgo
Copy link
Member

Can you replicate this bug on one of our example workflows?

@mwaskom
Copy link
Member Author

mwaskom commented Nov 1, 2013

Well, this makes no sense.

I am fairly certain that I have narrowed down the offending commit to this one. Every commit including and after it shows the bug, and every commit I've tried before it is fine.

If you haven't clicked on the link to the commit, do so now.

So, that's why I'm confused.

@satra, do you have any memory of this commit? Can you think of what might be going on?

Sorry I have been unable to concoct a dummy workflow to show the problem, although @toddt has replicated the issue with his setup on Mindhive.

@mwaskom
Copy link
Member Author

mwaskom commented Nov 2, 2013

Also has anyone successfully used the IPython plugin recently? It is totally crashing for me.

@satra
Copy link
Member

satra commented Nov 2, 2013

see if this happens when you remove these lines from multiproc.py:

 +        try:
 +            if node.inputs.terminal_output == 'stream':
 +                node.inputs.terminal_output = 'file'
 +        except:
 +            pass

@mwaskom
Copy link
Member Author

mwaskom commented Nov 2, 2013

Huh. That does seem to fix it.

@chrisgorgo
Copy link
Member

I can confirm it as well.

@mwaskom
Copy link
Member Author

mwaskom commented Nov 2, 2013

Current status: befuddled.

@chrisgorgo
Copy link
Member

Surely you meant perplexed.

@satra
Copy link
Member

satra commented Nov 2, 2013

the only piece that code does is to pass file handles to the subprocess call.

https://github.com/nipy/nipype/blob/master/nipype/interfaces/base.py#L1154

hence my real question whether these are just shared processes (check with pstree) or actually distinct processes.

@mwaskom
Copy link
Member Author

mwaskom commented Nov 2, 2013

I don't have pstree on my mac but they are both R+ processes in ps with
unique pids. The other evidence that they are distinct is that I can grind
my computer to a halt when asking for 75% of the available resources.

On Sat, Nov 2, 2013 at 1:54 PM, Satrajit Ghosh [email protected]:

the only piece that code does is to pass file handles to the subprocess
call.

https://github.com/nipy/nipype/blob/master/nipype/interfaces/base.py#L1154

hence my real question whether these are just shared processes (check with
pstree) or actually distinct processes.


Reply to this email directly or view it on GitHubhttps://github.com//issues/705#issuecomment-27632314
.

@satra
Copy link
Member

satra commented Nov 2, 2013

so very likely the process is being forked, which results in memory duplication, which in turn is bringing your computer to a halt. replacing with alternate output mode.

@satra satra closed this as completed in b4bc351 Nov 2, 2013
@mwaskom
Copy link
Member Author

mwaskom commented Nov 2, 2013

yep, it's almost certainly swapping; my hard drive was making constant
noises at the time i put the box out of its misery (it was completely non
responsive so I couldn't really otherwise debug it)

On Sat, Nov 2, 2013 at 2:13 PM, Satrajit Ghosh [email protected]:

so very likely the process is being forked, which results in memory
duplication, which in turn is bringing your computer to a halt. replacing
with alternate output mode.


Reply to this email directly or view it on GitHubhttps://github.com//issues/705#issuecomment-27632649
.

@mwaskom mwaskom reopened this Nov 4, 2013
@mwaskom mwaskom closed this as completed Nov 4, 2013
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 5, 2013
* master: (95 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 5, 2013
* master: (293 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 5, 2013
* master: (291 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 5, 2013
* master: (322 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 5, 2013
* master: (293 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 5, 2013
* master: (293 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 5, 2013
* master: (293 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 5, 2013
* master: (293 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 5, 2013
* master: (293 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 5, 2013
* master: (322 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 12, 2013
* master: (293 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
bpinsard pushed a commit to bpinsard/nipype that referenced this issue Nov 12, 2013
* master: (293 commits)
  fix: cleaned up file removal to pay attention to related files such as img/hdr/mat, BRIK/HEAD
  fix: switch to allatonce mode to prevent forking (closes nipy#705)
  fixed version checking
  sty: white spaces
  enh: added checkspecs to makefiel
  ref: removing unneeded tests
  ref: FILMGLS needs its own test because of api changes in FSL 5.0.5
  fix: update test generator to take manual edits into account
  tst: added autogenerated input and output spec tests
  enh: modified checkspecs to write output spec tests
  enh: modified checkspecs to write input spec tests
  sty: remove commented interface
  fix: remove deprecation warning.
  doc: include travis and coveralls badges
  sty: pep8 and metadata fixes
  enh: added coveralls support
  Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
  fix: updated doctest, pep8 and unit test
  doc: updated doctest to use literal string
  fix: display cmdline string explicitly
  ...
carlohamalainen added a commit to carlohamalainen/nipype that referenced this issue Feb 7, 2014
carlohamalainen added a commit to carlohamalainen/nipype that referenced this issue Feb 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants