Skip to content
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

RF: Delegate isotropic smoothing to nistats #118

Merged
merged 19 commits into from Mar 2, 2019

Conversation

kfinc
Copy link
Contributor

@kfinc kfinc commented Feb 27, 2019

This PR delegates smoothing to Nistats. After making the changes we came into multiprocessing error. Any idea why this may be happening? Thanks in advance for any help!

Expand to see stack trace

	 [Node] Running "_l1_model7" ("fitlins.interfaces.nistats.FirstLevelModel")
190227-19:32:39,265 nipype.workflow INFO:
	 [MultiProc] Running 4 tasks, and 4 jobs ready. Free memory (GB): 13.19/13.99, Free processors: 0/4.
                     Currently running:
                       * _l1_model7
                       * _l1_model6
                       * _l1_model5
                       * _l1_model4
exception calling callback for <Future at 0x7f1dcf8fec18 state=finished raised BrokenProcessPool>
Traceback (most recent call last):
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py", line 151, in _async_callback
    result = args.result()
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
exception calling callback for <Future at 0x7f1dcf052a58 state=finished raised BrokenProcessPool>
Traceback (most recent call last):
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py", line 151, in _async_callback
    result = args.result()
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
exception calling callback for <Future at 0x7f1dcf0b0c18 state=finished raised BrokenProcessPool>
Traceback (most recent call last):
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py", line 151, in _async_callback
    result = args.result()
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
exception calling callback for <Future at 0x7f1dcf060550 state=finished raised BrokenProcessPool>
Traceback (most recent call last):
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py", line 151, in _async_callback
    result = args.result()
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/opt/miniconda-latest/envs/neuro/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

@oesteban
Copy link

You are running out of memory. Try not to parallelize 4 models at a time or increase the RAM available to the docker engine.

Copy link
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. A few comments. Also, I would recommend modifying the Dockerfile by removing this section of .neurodocker.json, and then re-running neurodocker:

[
"fsl",
{
"version": "5.0.11"
}
],

cat .neurodocker.json | \
    docker run --rm -i -a stdin -a stdout -a stderr kaczmarj/neurodocker:master generate docker - > \
    Dockerfile

I can do this and push to your branch, if that's easier.

fitlins/interfaces/nistats.py Outdated Show resolved Hide resolved
fitlins/interfaces/nistats.py Show resolved Hide resolved
fitlins/interfaces/nistats.py Outdated Show resolved Hide resolved
@@ -94,6 +94,7 @@ def _visualize(self, data, out_name):
contrast_matrix = pd.DataFrame({c['name']: c['weights'][0]
for c in self.inputs.contrast_info},
index=data.columns)
contrast_matrix.fillna(value=0, inplace=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I'll need to look into this. nan should be fine for plotting matrices, and will simply show up as white, rather than the intermediate gray. But this seems fine, if nan is no longer possible.

fitlins/workflows/base.py Show resolved Hide resolved
@effigies
Copy link
Collaborator

effigies commented Mar 1, 2019

LGTM. Is this still a WIP?

@kfinc
Copy link
Contributor Author

kfinc commented Mar 2, 2019

Everything works fine, so I think it's no longer WIP. Thanks everyone for help!

@effigies effigies changed the title [WIP] Nistats smoothing Delegate isotropic smoothing to nistats Mar 2, 2019
@effigies effigies changed the title Delegate isotropic smoothing to nistats RF: Delegate isotropic smoothing to nistats Mar 2, 2019
@effigies effigies merged commit 620f795 into poldracklab:master Mar 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants