nipy / mindboggle

Automated anatomical brain label/shape analysis software (+ website)
http://mindboggle.info
Other
143 stars 54 forks source link

ANTs cortical thickness failed to run on example MRI dataset #126

Closed NickFausto closed 6 years ago

NickFausto commented 6 years ago

Dear all,

while testing your software the above mentioned error occured. I am not really sure wether this is my fault as I am running mindboogle (including the preprocessing steps with FreeSurfer and ANT) the first time. Please find eclosed the according crash-file.

Cheers!

crash-20170905-110458-jovyan-antsCorticalThickness-381c3ace-31cb-484c-9509-4d5ee8e93628.pklz.zip

binarybottle commented 6 years ago

Hello. Are you running this in the Docker container, or are you running the Docker as an executable? If you are doing the former, then I don't think you have the Atropos template in the right place: "...mindboggle123_output/working/Mindboggle123/antsCorticalThickness/T_template0_BrainCerebellumProbabilityMask.nii.gz' does not exist."

Please see the instructions on http://mindboggle.readthedocs.io/en/latest/#run-separate-commands

NickFausto commented 6 years ago

Thank you for the swift reply!

I am running this as a container (with the command docker run --rm -ti -v $HOST:$DOCK nipy/mindboggle $IMAGE --id $ID). However, the pipeline proceeded to the end, even though the mind boggle directory remained empty.

binarybottle commented 6 years ago

Ah -- You are running the docker container as an executable (http://mindboggle.readthedocs.io/en/latest/#run-one-command). Since you seem to be having some kind of path issue, perhaps it would be better for you to try and run the FreeSurfer and ANTs commands separately before running mindboggle (http://mindboggle.readthedocs.io/en/latest/#run-separate-commands).

NickFausto commented 6 years ago

Thanks again! Did not really make a difference.

When running ANTS-Preprocessing solely (as mentioned above) I do get the exact same error message. Im running the image on Docker CE (Version 17.06.2-ce-mac27 (19124) Channel: stable, 428bd6ceae) on macOS Sierra Version 10.12.6 (16G29).

Any other ideas?

binarybottle commented 6 years ago

When you are in the Docker container, can you see the template files (e.g., ...mindboggle123_output/working/Mindboggle123/antsCorticalThickness/T_template0_BrainCerebellumProbabilityMask.nii.gz)?

NickFausto commented 6 years ago

Please find the the whole content of the aforementioned directory below:

command.txt
_inputs.pklz
nipype_priors _node.pklz _report
result_antsCorticalThickness.pklz
T_template0_BrainCerebellumProbabilityMask.nii.gz

binarybottle commented 6 years ago

I'm sorry -- let's back up for a second. If you are running ANTs separately, then you should not be running mindboggle123 or getting the same error. Could you please send me the antscorticalthickness.sh command you are running?

araikes commented 6 years ago

I too am having an issue with ANTs for the example data. I'm running Mindboggle inside the docker container on Windows 10. I've started the docker machine and used the --entrypoint method described in the documentation.

At the point of SyN registration, it runs through 50 iterations of 1Diagnostic and then hits an error. Please see the attached picture. picture1

binarybottle commented 6 years ago

@araikes -- I believe the problem you are having is different. If ANTs suddenly aborts, that strikes me as either an issue with ANTs or possibly with the amount of RAM/storage allocated to the Docker container.

araikes commented 6 years ago

@binarybottle I can try to increase the RAM and see if that helps. I do see that the commands with errors have a double slash (e.g., "/opt/ants//antsRegistration") and I'm not sure if that might be the issue.

Thanks

NickFausto commented 6 years ago

Thanks for your help. I am running now everything on Ubuntu 16.04 Xenial LTS and it seems to run perfectly. It doesnt matter wether I run the single command or everything separately. Might be some odd OS-related bug or my inabaility to install it properly on Mac OS.

binarybottle commented 6 years ago

Hmm... @satra and @akeshavan -- what do you think might be the problem here?

satra commented 6 years ago

@NickFausto - given that you can run in a different environment, this really looks like, as @binarybottle notes, a memory issue on OSX. the default docker setting is often around 2G and this version of mindboggle, specifically the ants call, can take upto 12G of ram.

in some situations, the virtual memory manager will handle things, but in some cases it won't. on our cluster, which is unforgiving if you cross memory limits, we use an upperbound of 16G per process.

binarybottle commented 6 years ago

@NickFausto -- Were you able to fix the problem by increasing the Docker's RAM?

binarybottle commented 6 years ago

@satra made the following change in pull request #132: antsCorticalThickness is set with use_floatingpoint_precision=True to make ants run much faster with much less memory requirements. I am preparing a minor release with this change. This should help in your case as well.

NickFausto commented 6 years ago

Sorry for the late reply. All works well now. It was indeed an issue with the RAM.

Thank you for your help!

binarybottle commented 6 years ago

Glad to hear this resolved the issue!