Error response function

Dear all,

I’m running the script dwi2response and I get and error, but I don’t know what it fails.

dwi2response tournier 7101.mif 7101_response.txt

dwi2response: Note that this script makes use of commands / algorithms that have relevant articles for citation. Please consult the help page (-help option) for more information.
dwi2response: Generated temporary directory: /tmp/dwi2response-tmp-NIB609/
Command: mrconvert /media/manuel/6abbdb9a-052b-4aa4-9335-dd6bdc507d9f/bmanuel/TRACTOGRAPHY/RAW-DATA/DIFF/7101.mif - -stride 0,0,0,1 | dwiextract - /tmp/dwi2response-tmp-NIB609/dwi.mif
dwi2response: [ERROR] Command failed: mrconvert /media/manuel/6abbdb9a-052b-4aa4-9335-dd6bdc507d9f/bmanuel/TRACTOGRAPHY/RAW-DATA/DIFF/7101.mif - -stride 0,0,0,1 | dwiextract - /tmp/dwi2response-tmp-NIB609/dwi.mif
dwi2response: Output of failed command:
dwi2response: Changing back to original directory (/media/manuel/6abbdb9a-052b-4aa4-9335-dd6bdc507d9f/bmanuel/TRACTOGRAPHY/RAW-DATA/DIFF)
dwi2response: Deleting temporary directory /tmp/dwi2response-tmp-NIB609/

Any clue? Thanks in advance



Hi @mblesac,

Could you copy-paste and run this line, and tell us what the output is?

mrconvert /media/manuel/6abbdb9a-052b-4aa4-9335-dd6bdc507d9f/bmanuel/TRACTOGRAPHY/RAW-DATA/DIFF/7101.mif - -stride 0,0,0,1 | dwiextract - test.mif

That should give you / us some insight into what the actual problem is at that very first step of the script!

I’d be suspecting an out of RAM problem, similar to this thread. How big is your image? How much RAM do you have on the system? And how much space in /tmp?

I think that’s right, is some memory issue, because when I run mrconvert it works without any problem.

My images are 4GB, in /tmp I have 11.8 (I think here is the problem) and the RAM is 66GB

That was the problem, I changed the output directory to another hard drive and now works perfect. Thanks!

1 Like

Good to know!

I did a little more digging, since I was curious as to why both here and in another thread the script isn’t capturing any of the terminal output from the unsuccessful command:

dwi2response: Output of failed command:
tumbleweed appears on terminal

The problem is that when the fatal error occurs, the relevant (non-MRtrix3) library doesn’t write the error to the command’s standard error output, but to the current tty terminal. As a result, due to the mechanism used by the Python script library for calling these commands, the script library fails to capture this text, leaving you with an empty error message and a confused look. (Mind you, even if it were printed, the error message itself isn’t that clear: ‘Bus Error (core dumped)’)

I’m trying to fix this so that the script can give a more informative error; but for now, if “Output of failed command” is empty, there’s a good chance that you’ve run out of memory.