Invalid MEX-file simplified Kong 2022 parcellation

48 views
Skip to first unread message

lorenzo pasquini

unread,
Jul 13, 2024, 11:39:33 AM7/13/24
to CBIG users
Hello,

I am trying to use the standalone code (relevant section in IMPORTANT NEW FEATURE) see link below:

 

Yet, I am getting the following error:

 

Invalid MEX-file

'/xxx/A_Postdoc/software/CBIG-master/external_packages/matlab/default_packages/cifti-matlab/@xmltree/private/xml_findstr.mexmaci64':

dlopen(/xxx/A_Postdoc/software/CBIG-master/external_packages/matlab/default_packages/cifti-matlab/@xmltree/private/xml_findstr.mexmaci64,

6): Library not loaded: @loader_path/libmex.dylib

  Referenced from:

  /xxx/software/CBIG-master/external_packages/matlab/default_packages/cifti-matlab/@xmltree/private/xml_findstr.mexmaci64

    Reason: image not found

 

Error in xmltree (line 40)

                ~isempty(xml_findstr(varargin{1},'<',1,1)))

 

Error in ft_read_cifti (line 149)

tree = xmltree(xmldata);

 

Error in CBIG_ComputeCorrelationProfile (line 103)

        s_mesh = ft_read_cifti(fullfile(getenv('CBIG_CODE_DIR'), 'data', 'templates', 'surface', ...

 

Error in CBIG_MSHBM_generate_profiles (line 119)

    CBIG_ComputeCorrelationProfile(seed_mesh,targ_mesh, profile_file, 'NONE', '0.1', fMRI_list, 'NONE', censor_list, split_flag);

 

Error in CBIG_MSHBM_parcellation_single_subject (line 329)

        CBIG_MSHBM_generate_profiles(seed_mesh, target_mesh, project_dir, '1', '1', '1');

 

Error in test_script (line 9)

CBIG_MSHBM_parcellation_single_subject(params);

 

Has anyone encountered this error before?


Could this be something related to the MATLAB version used? 


Or to a faulty installation of the environment? The setup instructions have not worked for me.


Or maybe I am not understanding how to correctly implement that piece of code (see enclosed script)?


Any help would be very much appreciated.


Best


Lorenzo

test_script.m

Ruby Kong

unread,
Jul 14, 2024, 1:51:16 AM7/14/24
to lorenzo pasquini, CBIG users
Hi Lorenzo,

Have you followed these steps to set up the environment. 


Especially this step: 2)Set MATLABPATH and startup.m

Best,
Ruby

Sent from my iPhone


On 13 Jul 2024, at 11:39 PM, lorenzo pasquini <lollop...@gmail.com> wrote:

Hello,
--
You received this message because you are subscribed to the Google Groups "CBIG users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cbig_users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cbig_users/17a16f3e-5db7-423e-8e8b-f1cccedafc5an%40googlegroups.com.
<test_script.m>

Ruby Kong

unread,
Jul 14, 2024, 8:17:23 AM7/14/24
to lorenzo pasquini, CBIG users
My 2019 parcellation scripts do not rely on the workbench. However, I am not sure our scripts can work on MacOS. We developed our scripts in the Linux system. 

On Sun, 14 Jul 2024 at 17:02, lorenzo pasquini <lollop...@gmail.com> wrote:
Hi Ruby

Thanks for reaching back.
I have not. One of the issues is that the latest version of the Connectome workbench does not work on my Mac. How important is it to update the paths to all software in the sh file?
Should I just move the startup file somewhere else?

Thanks

Lorenzo

lorenzo pasquini

unread,
Jul 16, 2024, 3:52:03 AM7/16/24
to Ruby Kong, CBIG users
Hi Ruby

Thanks for reaching back.
I have not. One of the issues is that the latest version of the Connectome workbench does not work on my Mac. How important is it to update the paths to all software in the sh file?
Should I just move the startup file somewhere else?

Thanks

Lorenzo
On Sun, Jul 14, 2024 at 6:51 AM Ruby Kong <roo....@gmail.com> wrote:

Ruby Kong

unread,
Jul 22, 2024, 11:44:40 AM7/22/24
to lorenzo pasquini, CBIG users, Manesh Girn
Hi Lorenzo,

Might be matlab version issue. Thanks for letting us know! We use Matlab2018. It looks like you are running my 2021 paper, did you also try my 2019 code for estimating brain networks? Any error from the 2019 code?

On Fri, 19 Jul 2024 at 22:26, lorenzo pasquini <lollop...@gmail.com> wrote:
Thanks Ruby,

I moved on to use the scripts on linux and things have been smoother.

Could I ask you for some further advice on the following error?

Error using matlab.internal.graph.MLGraph

Duplicate edges not supported.


Error in matlab.internal.graph.constructFromEdgeList (line 125)

G = underlyingCtor(double(s), double(t), totalNodes);


Error in graph (line 258)

                matlab.internal.graph.constructFromEdgeList(...


Error in CBIG_SPGrad_create_graph (line 27)

        G = graph(verts(mask), neighbors(mask), grad_weight);


Error in CBIG_SPGrad_generate_gradient_matrix (line 117)

lh_G = CBIG_SPGrad_create_graph(lh_surf, lh_grad_edge);


Error in CBIG_ArealMSHBM_generate_gradient (line 146)

        CBIG_SPGrad_generate_gradient_matrix(mesh, medial_mask, downsample, out_gradient_dir);


Have you ever encountered this before?
Can you also remind me which matlab version you are using? 
Our system still has 2015 installed as default.

Adding Manesh Girn to this thread, a postdoc at our center who is helping with analyzing the data.

Best

Lorenzo



lorenzo pasquini

unread,
Jul 23, 2024, 3:44:33 AM7/23/24
to Ruby Kong, CBIG users, Manesh Girn
Thanks Ruby,

I moved on to use the scripts on linux and things have been smoother.

Could I ask you for some further advice on the following error?

Error using matlab.internal.graph.MLGraph

Duplicate edges not supported.


Error in matlab.internal.graph.constructFromEdgeList (line 125)

G = underlyingCtor(double(s), double(t), totalNodes);


Error in graph (line 258)

                matlab.internal.graph.constructFromEdgeList(...


Error in CBIG_SPGrad_create_graph (line 27)

        G = graph(verts(mask), neighbors(mask), grad_weight);


Error in CBIG_SPGrad_generate_gradient_matrix (line 117)

lh_G = CBIG_SPGrad_create_graph(lh_surf, lh_grad_edge);


Error in CBIG_ArealMSHBM_generate_gradient (line 146)

        CBIG_SPGrad_generate_gradient_matrix(mesh, medial_mask, downsample, out_gradient_dir);


Have you ever encountered this before?
Can you also remind me which matlab version you are using? 
Our system still has 2015 installed as default.

Adding Manesh Girn to this thread, a postdoc at our center who is helping with analyzing the data.

Best

Lorenzo




On Sun, Jul 14, 2024 at 1:17 PM Ruby Kong <roo....@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages