# Dwifslpreproc - Eddy failed with message

**URL:** https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180
**Category:** Uncategorized
**Created:** [November 29, 2023, 2:13pm UTC](https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180 "2023-11-29T14:13:36Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ejanson6](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/e/7993a0/32.png) [@ejanson6](https://community.mrtrix.org/u/ejanson6)
#### Post date: [November 29, 2023, 2:13pm UTC](https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180/1 "2023-11-29T14:13:36Z")

</div>

Dear MRtrix community,

Although another topic about this error was poster previously ([Dwifslpreproc Fails with EDDY::: Eddy failed with message Error](https://community.mrtrix.org/t/dwifslpreproc-fails-with-eddy-eddy-failed-with-message-error/6930)), I did not find a solution yet.

I’m trying to run dwifslpreproc on my multi-shell neonatal data, including a B0 pair, using the following command:

```auto
for_each * : dwifslpreproc IN/dwi_denoised_unringed.mif IN/dwi_denoised_unringed_preproc.mif -pe_dir j- -rpe_pair -se_epi IN/B0_pair.mif 

```

However, I receive the following error:

```auto
dwifslpreproc: [ERROR] eddy_cpu --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --out=dwi_post_eddy --verbose (dwifslpreproc:972)
          dwifslpreproc: [ERROR] Information from failed command:
          dwifslpreproc:
                         Reading images
                         @��v�
                         
                         EDDY::: Eddy failed with message 

```

Once I open the textile ‘error.txt’ in the scratch directory, I see no additional error information.  
The images loaded for the eddy\_cpu command can be opened manually using mrview and are present in the scratch directory.

Any advice on how to continue?

Many thanks in advance!!

Els

---

<div class="post-metadata">

### Author: ![Shai\_P](https://community.mrtrix.org/user_avatar/community.mrtrix.org/shai_p/32/3289_2.png) [@Shai\_P](https://community.mrtrix.org/u/Shai_P)
#### Post date: [December 5, 2023, 12:58am UTC](https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180/2 "2023-12-05T00:58:37Z")

</div>

@ejanson6 Im the original poster of the question you referenced. I think this may be an issue with mac OS and fsl eddy/cuda compatibility but I am not certain.

---

<div class="post-metadata">

### Author: ![mschira](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mschira/32/2917_2.png) [@mschira](https://community.mrtrix.org/u/mschira)
#### Post date: [December 5, 2023, 2:42am UTC](https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180/3 "2023-12-05T02:42:13Z")

</div>

Hm it looks like the following command failed:

```auto
eddy_cpu --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --out=dwi_post_eddy --verbose (dwifslpreproc:972

```

did you check in the temp directory if the input imgages (eddy\_in.nii, eddy\_mask.nii, eddy\_config.txt ) exist?  
Do they look fine or are they faulty?  
M.

---

<div class="post-metadata">

### Author: ![j-tseng](https://community.mrtrix.org/user_avatar/community.mrtrix.org/j-tseng/32/3096_2.png) [@j-tseng](https://community.mrtrix.org/u/j-tseng)
#### Post date: [December 6, 2023, 8:06pm UTC](https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180/4 "2023-12-06T20:06:02Z")

</div>

+1 to this - I’ve seen this eddy error before and in my case, the auto-generated `eddy_mask.nii` file was way off from a proper brain mask. I was able to circumvent this by using the `-eddy_mask` argument for `dwifslpreproc` since I already had a mask from some other processing step.

---

<div class="post-metadata">

### Author: ![ejanson6](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/e/7993a0/32.png) [@ejanson6](https://community.mrtrix.org/u/ejanson6)
#### Post date: [December 14, 2023, 1:01pm UTC](https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180/5 "2023-12-14T13:01:54Z")

</div>

Thanks for your response! In my case, the eddy\_in and eddy\_mask file look okay to me. See here the mask with reduced opacity on top of the input file:

 ![Screenshot 2023-12-14 at 13.35.03](https://community.mrtrix.org/uploads/default/original/2X/5/581c9def6afc1a31cead08cca1e49d4116de9514.jpeg)

---

<div class="post-metadata">

### Author: ![ejanson6](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/e/7993a0/32.png) [@ejanson6](https://community.mrtrix.org/u/ejanson6)
#### Post date: [December 14, 2023, 1:01pm UTC](https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180/6 "2023-12-14T13:01:59Z")

</div>

Dear mschira, thank you so much for thinking along. These files do exist, can be opened and look good.

---

<div class="post-metadata">

### Author: ![mschira](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mschira/32/2917_2.png) [@mschira](https://community.mrtrix.org/u/mschira)
#### Post date: [December 18, 2023, 12:23am UTC](https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180/7 "2023-12-18T00:23:39Z")

</div>

> [@mschira](#):
>
> `eddy_cpu --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --out=dwi_post_eddy --verbose (dwifslpreproc:972`

Do you have fsl installed? If so I would recommend trying the command:  
_ **eddy\_openmp --imain=eddy\_in.nii --mask=eddy\_mask.nii --acqp=eddy\_config.txt --index=eddy\_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --out=dwi\_post\_eddy --verbose** _

That should do exactly the same as eddy\_cpu, but forgoing the mrtrix wrapper.

---

<div class="post-metadata">

### Author: ![ejanson6](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/e/7993a0/32.png) [@ejanson6](https://community.mrtrix.org/u/ejanson6)
#### Post date: [December 19, 2023, 10:23am UTC](https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180/8 "2023-12-19T10:23:14Z")

</div>

Dear mschira, thank you for the suggestion. FSL is installed, but the command eddy\_openmp and the ‘normal’ eddy do not work. I still receive the error message about reading images…

dwifslpreproc-tmp-1WCNWH % eddy\_openmp --imain=eddy\_in.nii --mask=eddy\_mask.nii --acqp=eddy\_config.txt --index=eddy\_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --out=dwi\_post\_eddy --verbose

zsh: command not found: eddy\_openmp

dwifslpreproc-tmp-1WCNWH % eddy --imain=eddy\_in.nii --mask=eddy\_mask.nii --acqp=eddy\_config.txt --index=eddy\_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --out=dwi\_post\_eddy --verbose

Reading images

??

---

<div class="post-metadata">

### Author: ![mschira](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mschira/32/2917_2.png) [@mschira](https://community.mrtrix.org/u/mschira)
#### Post date: [December 21, 2023, 12:14am UTC](https://community.mrtrix.org/t/dwifslpreproc-eddy-failed-with-message/7180/9 "2023-12-21T00:14:39Z")

</div>

Maybe that is where the problem lies?  
I think eddy\_cpu calls essentially eddy\_openmp.  
Can you try and locate if the program eddy\_openmp exists on your computer maybe using the search function? What system are you using?  
I don’t think troubleshooting your FSL or MRtrix installation is my forte.  
I would recommend you to use the Neurodesk app. You can find it at [neurodesk.org](http://neurodesk.org).  
We have working modules for MRtrix 3.0.2 and 3.0.3.

I would probably recommend in the neurodesk app you would need to type

> ml mrtrix3/3.0.3

and then do your dwifslpreproc again.

If you are running it on a server you can use neurocommand. Let me know, I can help you.  
Best  
M.
