Mrtrix error

Hello all,

I am new to DWI/DKI and Mrtrix preprocessing.

I am using the following commands to preprocess my data which does not have reverse encoding in VMware Ubuntu.

  1. mrconvert -fslgrad *.bvec *.bval *.nii.gz *.mif
  2. dwidenoise *.mif *_denoised.mif
  3. mrconvert *_denoised.mif *_denoised.nii
  4. mrcalc *.mif *_denoised.mif -subtract *_noise.mif
  5. dwifslpreproc *_denoised.mif *_preproc.mif -rpe_none -pe_dir j no_cleanup

I get following warnngs and errors at the dwifslpreproc command. I do not know how to resolve this. Can anyone help??

dwifslpreproc: [WARNING] sampling of b=1000 shell is strongly asymmetric; distortion correction may benefit from use of: -eddy_options " … --slm=linear … "
dwifslpreproc: [WARNING] sampling of b=2500 shell is strongly asymmetric; distortion correction may benefit from use of: -eddy_options " … --slm=linear … "

[ERROR] eddy* --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --very_verbose --out=dwi_post_eddy --verbose (app.py:199)
dwifslpreproc: [ERROR] Information from failed command:

eddy_cpu
========
/home/abhishek/fsl/share/fsl/bin/eddy_cpu: line 2: 235375 Killed /home/abhishek/fsl/bin/eddy_cpu “$@”

dwifslpreproc:
dwifslpreproc: [ERROR] For debugging, inspect contents of scratch directory: /home/abhishek/dwifslpreproc-tmp-87SI8D/

Commands typically get ‘killed’ due to running out of RAM. How much RAM do you have access to on your system? I expect it won’t be all that much if you’re running in a virtual machine.

And how big are the images you’re trying to process? You’ll need at least double the size of your input (uncompressed) file for eddy to be able to operate – and probably considerably more than that in practice (not something I’ve assessed in any detail!).

Cheers,
Donald

Hello @jdtournier,

Thank you for your answer. The command worked after I increased the RAM for the virtual machine to 64 GB, and dwifslpreproc worked fine.

My PC has 128 GB of RAM, and my dataset is around 1.5 GB per subject.

Although the command worked, it takes around 3-4 hours to complete the dwifslpreproc command for a single subject. I have around 100 subjects. Is there a way to work around this?

Good to hear. The issue with the runtime is the lack of access to the GPU. There are two versions of eddy, which is the FSL command that does the bulk of the work. One of them relies on GPU acceleration (using Nvidia’s CUDA technology), and would run much faster. But most virtual machines don’t provide direct access to the GPU to programs running within them. There may be some implementations that allow you to, but this is not something I’m up to date with. Maybe others with more experience can provide some advice here?

Thank you for your repsonse @jdtournier. I think the fsl-based dwifslpreproc might work faster with other methods like GPU-based or server-based systems compared to VMWare.

I am currently using Mrtrix with eddy_cuda version.
Once again thank you for your answers and support !!

1 Like