Dwipreproc -eddy error solution

preprocessing
error

#1

dwipreproc: [WARNING] sampling of b=600 shell is strongly asymmetric; distortion correction may benefit from use of: -eddy_options " ... --slm=linear ... "
dwipreproc: Total readout time not provided at command-line; assuming sane default of 0.1
Command:  mrinfo dwi.mif -export_grad_mrtrix grad.b
Command:  dwi2mask dwi.mif - | maskfilter - dilate - | mrconvert - eddy_mask.nii -datatype float32 -strides -1,+2,+3
Command:  mrconvert dwi.mif -import_pe_table dwi_manual_pe_scheme.txt eddy_in.nii -strides -1,+2,+3,+4 -export_grad_fsl bvecs bvals -export_pe_eddy eddy_config.txt eddy_indices.txt
Command:  eddy_cuda --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --out=dwi_post_eddy
dwipreproc: [WARNING] Command failed: eddy_cuda --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --out=dwi_post_eddy
dwipreproc: [WARNING] CUDA version of eddy appears to have failed; trying OpenMP version
Command:  eddy_openmp --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --out=dwi_post_eddy
dwipreproc: 
dwipreproc: [ERROR] Command failed: eddy_openmp --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --out=dwi_post_eddy (dwipreproc:853)
dwipreproc: Output of failed command:
            Segmentation violation, Address not mapped, Offending address = 0x28
            /lib/x86_64-linux-gnu/libc.so.6 strlen [0x7fdb7e6e0746]
            eddy_openmp ) [0x6062eb] [&X�?
            eddy_openmp ) [0x5ff163] [&X�?
            eddy_openmp ) [0x45f759] [&X�?


Hello everyone, I’m wondering about dwipreproc
That failed because of eddy_cuda actually but now I’m using a virtual machine in Windows10 (but OS using mrtrix3 is ubuntu 16.04)
Is that any solution to solve that warning?

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

  2. [ERROR] Command failed: eddy_openmp --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --out=dwi_post_eddy (dwipreproc:853)

In here?


#2

For the first issue, refer to the FSL EDDY documentation – the bit where they discuss ‘sampling on the sphere’. To cut a long story short, add -eddy_options "--slm=linear " to your dwipreproc call to silence the warning – although there’s a good chance it won’t make all that much difference.

The second issue is more problematic though. Clearly, your eddy_openmp command is crashing out with a memory access violation (most likely a bug). To debug this one, you’d need to inspect the contents of the temporary folder (you can see its location in your output, it’s probably still there, but if not, invoke with -nocleanup) to check all the inputs to that eddy_openmp command are valid and as the command would expect. If everything looks OK, try running that eddy_openmp command directly within that folder (i.e. copy/paste that line into a terminal, with the working directory set to the temporary folder). If that still crashes out with the same error, then you’d need to refer to the FSL support forum…

This recent thread may also be useful here.


#3

We’d met this same problem.
There is also a weird information when we ‘mrconvert’ the DICOM to mif.

WARNING] Number of entries in mosaic slice timing (36) does not match number of images in mosaic (31); omitting

And also met the following problem during the ‘dwipreproc’.

[ERROR] Command failed: eddy_openmp --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --out=dwi_post_eddy (dwipreproc:853)

At the beginning we raneddy_openmp in the temporary folder but it still gave us error although all inputs are valid.

Then I convert the bvecs, bvals, eddy_config.txt, eddy_indices.txt from raw DICOM data instead of dwi.mif. Then it works well.
I don’t know if this information would give you some clues to find the mechanism behind this problem.

Best,
Ziqian


#4

WARNING] Number of entries in mosaic slice timing (36) does not match number of images in mosaic (31); omitting

This is hopefully already fixed; updating your MRtrix3 installation to the latest version of the master branch and re-compiling will hopefully fix the issue.

At the beginning we ran eddy_openmp in the temporary folder but it still gave us error although all inputs are valid.

eddy is entirely out of our control being an FSL command. The only thing I can suggest is re-running it with the --verbose option.

Then I convert the bvecs, bvals, eddy_config.txt, eddy_indices.txt from raw DICOM data instead of dwi.mif. Then it works well.

That doesn’t really help a whole lot unfortunately; we would need to know both exactly how those files that you have generated from a raw DICOM differ from those that were generated within dwipreproc, as well as whatever steps had been performed in generation of the file “dwi.mif” that is presumably the image that you are providing as input to dwipreproc.