Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error executing fslmaths #2

Open
lbutry opened this issue Aug 12, 2024 · 1 comment
Open

Error executing fslmaths #2

lbutry opened this issue Aug 12, 2024 · 1 comment

Comments

@lbutry
Copy link

lbutry commented Aug 12, 2024

Hi,

I'm running the Docker image on a Mac M1. After the FreeSurfer parcellation finishes without errors, I'm encountering this error:

/opt/create_3d_brain_docker.sh: line 123: 4469 Illegal instruction fslmaths.fsl $SUBJECTS_DIR/subcortical/subcortical.nii -mul $SUBJECTS_DIR/subcortical/bin.nii $SUBJECTS_DIR/subcortical/subcortical.nii.gz

Here's the terminal output starting from the end of FreeSurfer:

...
Started at Sun Aug 11 19:07:16 UTC 2024 
Ended   at Sun Aug 11 21:23:47 UTC 2024
#@#%# recon-all-run-time-hours 2.275
hostname: Command not found.
recon-all -s output finished without error at Sun Aug 11 21:23:47 UTC 2024
done
mri_convert /root/3dbrains/subject/output/mri/aseg.mgz /root/3dbrains/subject/output/subcortical/subcortical.nii 
reading from /root/3dbrains/subject/output/mri/aseg.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 1.10163e-10, 0)
j_ras = (0, 2.91038e-11, -1)
k_ras = (-1.10163e-10, 1, 0)
writing to /root/3dbrains/subject/output/subcortical/subcortical.nii...

7.4.1
cwd /opt
cmdline mri_binarize --i /root/3dbrains/subject/output/subcortical/subcortical.nii --match 2 3 24 31 41 42 63 72 77 51 52 13 12 43 50 4 11 26 58 49 10 17 18 53 54 44 5 80 14 15 30 62 --inv --o /root/3dbrains/subject/output/subcortical/bin.nii 
sysname  Linux
hostname b7e2793991a2
machine  x86_64
user     root

input      /root/3dbrains/subject/output/subcortical/subcortical.nii
frame      0
nErode3d   0
nErode2d   0
output     /root/3dbrains/subject/output/subcortical/bin.nii
Binarizing based on matching values
nMatch 32
 0     2
 1     3
 2    24
 3    31
 4    41
 5    42
 6    63
 7    72
 8    77
 9    51
10    52
11    13
12    12
13    43
14    50
15     4
16    11
17    26
18    58
19    49
20    10
21    17
22    18
23    53
24    54
25    44
26     5
27    80
28    14
29    15
30    30
31    62
binval        0
binvalnot     1
fstart = 0, fend = 0, nframes = 1
Starting parallel 1
Found 1031756 values in range
Counting number of voxels in first frame
Found 1031755 voxels in final mask
Writing output to /root/3dbrains/subject/output/subcortical/bin.nii
Count: 1031755 1031755.000000 16777216 6.149739
mri_binarize done
/opt/create_3d_brain_docker.sh: line 123:  4469 Illegal instruction     fslmaths.fsl $SUBJECTS_DIR/subcortical/subcortical.nii -mul $SUBJECTS_DIR/subcortical/bin.nii $SUBJECTS_DIR/subcortical/subcortical.nii.gz

Can you help me out with it?

@skjerns
Copy link
Owner

skjerns commented Aug 19, 2024

Sorry, I have no idea what the problem might be :-/

ChatGPT says that

The software (in this case, fslmaths.fsl) may be compiled with specific optimizations that are not compatible with the CPU architecture of the machine where it's being run. This is common if the software was compiled for a different or more advanced CPU architecture than the one you're using.

So it might be that it does not work on a Mac M1 (due to ARM architecture), even though I would assume that by using Docker this should not be a problem. Also, FSL is compatible with M1 according to my quick google search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants