Hi Arnold,
Thanks, we went down the same road with Melanni last week, and, while I
am still trying to understand what the problem is (somehow related to
memory alignment), the issue was disappearing if the MEX file were
compiled from a terminal:
mkoctfile --mex mat2file.c
instead of invoking mex() within octave:
mex mat2file.c
It shouldn't make any difference (check the source code of mex.m) but
apparently it does... I would be curious if you can reproduce the same
phenomenon.
Best regards,
Guillaume.
On 30/10/2018 21:33, Arnold Evia wrote:
> Hello Guillaume and Melanni,
>
> I am also having the same issue as Melanni using PALM in Ubuntu.
> I tried the commands that you suggested, and got the same output as Melanni.
>
> After some debugging, I may have found a clue as to what's happening.
> In mat2file.c, I placed a few print statements for some variables right before the error message (line 252):
>
> printf("code = %d\n",map->dtype->code);
> printf("bits = %d\n",map->dtype->bits);
> printf("channels = %d\n",map->dtype->channels);
>
> if (map->dtype == NULL) mexErrMsgTxt("Unrecognised 'dtype' value.");
> if (map->dtype->bits % 8) mexErrMsgTxt("Can not yet write logical data.");
> if (map->dtype->channels != 1) mexErrMsgTxt("Can not yet write complex data.");
>
> The program returned unusual numbers:
>
> code = 16
> bits = 32726
> channels = 7
> Error using subsasgn>subfun ([log in to unmask]:168)
> mat2file: Can not yet write logical data.
>
> Running the program again with the same parameters, values for code and channels stays constant, but the value for bits would change:
>
> code = 16
> bits = 32696
> channels = 7
> Error using subsasgn>subfun ([log in to unmask]:168)
> mat2file: Can not yet write complex data.
>
> As you can see, sometimes bits will be divisible by 8, and the program returns a different error.
> There is a table in the script that defines the values for bits, and channels for a specific code.
> In this case, bits should be 32, and channels should be 1.
> I don't know why bits and channels are being set to incorrect values, and I hope this sheds some light.
>
> -Arnold Evia
>
--
Guillaume Flandin, PhD
Wellcome Centre for Human Neuroimaging
UCL Queen Square Institute of Neurology
London WC1N 3BG
########################################################################
To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
|