Dwipreproc: Empty error from eddy_openmp


Hi everyone,

I’ve been facing an issue with eddy_openmp while processing a concatenated (mrcat) diffusion MRI dataset. Not only does eddy_cuda fail for processing, but eddy_openmp gives me an empty error. Has anyone encountered the same problem?

The command I’ve been trying to use is:

dwipreproc DTIcat_denoised.mif DTIcat_preproc.mif -rpe_none -pe_dir AP -eddy_options "--slm=linear " -info

Here’s the dataset:

Image:               "DTIcat_denoised.mif"
  Dimensions:        112 x 112 x 69 x 258
  Voxel size:        1.96429 x 1.96429 x 2.05 x ?
  Data strides:      [ -2 -3 4 1 ]
  Format:            MRtrix
  Data type:         32 bit float (little endian)
  Intensity scaling: offset = 0, multiplier = 1
  Transform:               0.9955     0.08941     0.03142      -116.7
                         -0.09138      0.9935     0.06804      -96.77
                         -0.02513    -0.07061      0.9972      -33.34
  EchoTime:          0.085
  FlipAngle:         85
  RepetitionTime:    4.5
  command_history:   mrcat "/mnt/DTI_p1_b1200_APA_optim - 501/IM-0024-8901-0001.dcm" "/mnt/DTI_p2_b2500_APA_optim - 701/IM-0026-8901-0001.dcm" "DTIcat.mif"  (version=3.0_RC3-135-g2b8e7d0c)
                     dwidenoise "DTIcat.mif" "DTIcat_denoised.mif"  (version=3.0_RC3-135-g2b8e7d0c)
  comments:          HV00 (HV_00) [MR] DTI_p1_b1200_APA_optim
                     study: RAD smr neuro 60 [ ORIGINAL PRIMARY M_SE M SE ]
                     DOB: 17/12/2010
                     DOS: 11/02/2019 10:00:50
  dw_scheme:         0.03142273054,0.06804225594,0.9971874952,1200
  [258 entries]      -0.7987939119,-0.3998337686,0.4495001137,1200
  mrtrix_version:    3.0_RC3-135-g2b8e7d0c

Here’s the error message:

Command:  eddy_cuda --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --slm=linear --out=dwi_post_eddy
          eddy_cuda: error while loading shared libraries: libcudart.so.7.5: cannot open shared object file: No such file or directory
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 --slm=linear --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 --slm=linear --out=dwi_post_eddy
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 --slm=linear --out=dwi_post_eddy (dwipreproc:853)
dwipreproc: Output of failed command:
Traceback (most recent call last):
  File "/opt/mrtrix3/bin/dwipreproc", line 853, in <module>
    (eddy_stdout, eddy_stderr) = run.command(eddy_openmp_cmd + ' ' + eddy_all_options)
  File "/opt/mrtrix3/lib/mrtrix3/run.py", line 224, in command
    with open(os.path.join(app.tempDir, 'error.txt'), 'w') as outfile:
IOError: [Errno 5] Input/output error: '/mnt/processed/dwipreproc-tmp-V1BW3X/error.txt'

Thank you for any tips in advance.


Hi Daniel,

While I’ve certainly heard of eddy failing without providing any information on stdout or stderr, this particular error is different to anything I’ve seen before. The MRtrix3 library is trying to write the output from eddy into a text file inside the script temporary running directory, both to store for later reference and also so that it can be printed to the terminal for you at a later stage of “script termination”; but the system is returning an “Input/Output error” when attempting to open that file for writing. But if the Python libraries can’t write files to that temporary directory, how has the script proceeded as far as it has? Can you reproduce this fault (ie. it’s not a sporadic unmounting of shared storage or the like?)

Regardless, given the line at which the exception occurs, it does indeed seem as though eddy has not provided any information about why it failed (indeed in the next tag update I’ve ensured that MRtrix3 will state more explicitly if the failing command has produced no output, partly to remove ambiguities such as this).

You could try providing here the outputs of both mrinfo and mrstats on eddy_in.nii and eddy_mask.nii, and the contents of files eddy_config.txt, eddy_indices.txt, bvecs and bvals. If there’s anything obviously wrong that should be enough to tell; but if not, assuming the data are well-formed, and running eddy without the MRtrix3 dwipreproc wrapper gives the same result, then fundamentally it’s an FSL issue, and you might have a better chance on their mailing list.