bids-apps / MAGeTbrain

2 stars 5 forks source link

antsRegistration segmentation fault #6

Open josephmje opened 5 years ago

josephmje commented 5 years ago

Hi @gdevenyi ,

I'm getting an error when trying to run the first stage of MAGeT.

This is my singularity call: singularity run -H ${tmp_dir} -B ${bids_dir}:/bids -B ${output_dir}:/out ${sing_container} /bids /out participant1 --participant_label ${SUB} --segmentation_type colin27-subcortical --n_cpus 4 --label-masking

And the output:

2018-11-26 16:16:06 UTC [     info] Creating input/atlas input/template input/subject
2018-11-26 16:16:06 UTC [     info] Cleaning up. Done

2018-11-26 16:16:06 UTC [     info] Specific template(s) specified //out/input/template/sub-CMH420005_ses-01_T1w.nii.gz
2018-11-26 16:16:07 UTC [  warning] Zero subjects found, please check input/subject/*_t1.[mnc, nii, nii.gz], this is okay if performing multiatlas
2018-11-26 16:16:07 UTC [     info] Found:
2018-11-26 16:16:07 UTC [     info]   1 atlases in input/atlas
2018-11-26 16:16:07 UTC [     info]   1 labels per atlas in input/atlas
2018-11-26 16:16:07 UTC [     info]   1 templates in input/template
2018-11-26 16:16:07 UTC [     info]   0 subjects in input/subject
2018-11-26 16:16:07 UTC [     info]   0 models in input/models
2018-11-26 16:16:07 UTC [     info] Progress:
2018-11-26 16:16:07 UTC [     info]   0 of 1 atlas-template registrations completed
2018-11-26 16:16:07 UTC [     info]   0 of -1 template-subject registrations completed
2018-11-26 16:16:07 UTC [     info]   0 of 0 resample labels completed
2018-11-26 16:16:07 UTC [     info]   0 of 0 voted labels completed
2018-11-26 16:16:07 UTC [     info] Computing Atlas to Template Registrations
file NULL does not exist .
/opt/antsRegistration-MAGeT/bin/mb_register.sh: line 74: 22460 Segmentation fault      antsRegistration --dimensionality 3 ${__mb_float} ${MB_VERBOSE:-} --minc --output [${outputdir}/$(basename ${movingfile})-$(basename ${fixedfile})] --use-histogram-matching 0 --initial-moving-transform ${outputdir}/$(basename ${movingfile})-$(basename ${fixedfile})0_GenericAffine.xfm --transform "SyN[0.25,3,0]" ${__mb_syn_metric} $(eval echo ${nonlinear_steps}) --masks [${fixedmask},${movingmask}]
qbatch: error: local run call returned error code 139
2018-11-26 16:16:21 UTC [     info] Cleaning up. Done

Traceback (most recent call last):
  File "/code/run.py", line 204, in <module>
    'QBATCH_CORES': str(1)})
  File "/code/run.py", line 39, in run
    raise Exception("Non zero return code: {0}".format(process.returncode))
Exception: Non zero return code: 1
gdevenyi commented 5 years ago

Hi,

Can you please confirm which version you're running.

In addition, the resources available on the system you're trying this on?

josephmje commented 5 years ago

Thanks @gdevenyi . I'm running v0.3.1 on a CentOS computing cluster.

Actually if I change my singularity call to: singularity run -H ${tmp_dir} -B ${bids_dir}:/bids -B ${output_dir}:/out ${sing_container} /bids /out participant1 --participant_label ${SUB}, the first stage seems to be working. I'm not sure if its because I left out the --n_cpus or --label-masking options.

gdevenyi commented 5 years ago

Hrm, well its a bit hard to tell since ANTs tools don't usually give a very useful output.

My guess is maybe antsRegistration running out of resources, how big is the machine you're running on, and since this is a cluster, are your resources limited?

gdevenyi commented 5 years ago

I see I don't have a "verbose" option here, I'll open an issue to all one to run.py.