Open MEEG error

Iopen_meeg_error_7_18 calculation the open-meeg headmodel for a single shell MEG-headmodel I get the following error after updating to the latest open-meeg version on macbook os X13.5 and Matlab 2016b. The problem ist not caused by memory issues.

Thanks for your help.

Marcel

Hi Marcel,

on a mac the installation of OpenMEEG is broken.

See: OpenMEEG error #134: dyld: library not loaded

It should be fixed soon.

Alex

Hi Marcel,

We tried to fix this issue. See this comment:

Please update Brainstorm and try again.

Cheers,
Francois

Hi Francois,

I still cannot use openmeeg on my mac after updating brainstorm. I am getting the attached error. Even downgrading to version 2.2 does not work, because brainstorm wants me to use the latest version.
Using version 2.2 at least worked on a linux server, so I can use this for now.

Marcel

open_meeg_error_7_18_2

When calculating the headmodel using openmmeg on my windows 7 computer (Matlab 2014a) I get the following error using the latest version of Brainstorm and openmeeg:

Subscripted assignment dimension mismatch.

Error in bst_openmeeg (line 446)
Gain(OPTIONS.iMeg, :slight_smile: = om_load_full(meggain_file);

Error in bst_headmodeler (line 470)
[Gain, errMessage] = bst_openmeeg(OPTIONS);

Error in panel_headmodel>ComputeHeadModel (line 647)
[OPTIONS, errMessage] = bst_headmodeler(OPTIONS);

Error in panel_headmodel (line 27)
eval(macro_method);

Error in panel_protocols>TreeHeadModel (line 1156)
[OutputFiles, errMessage] = panel_headmodel(‘ComputeHeadModel’, iChanStudies);

Error in panel_protocols (line 44)
eval(macro_method);

Error in tree_callbacks>@(h,ev)panel_protocols(‘TreeHeadModel’,bstNodes) (line 2269)
gui_component(‘MenuItem’, jPopup, [], ‘Compute head model’, IconLoader.ICON_HEADMODEL, [], @(h,ev)panel_protocols(‘TreeHeadModel’,
bstNodes));

Do you know what causes this error?

Marcel

Sorry, but there is a different error related to this topic that has been there for a while: When I use the batch processing tool for headmodeling with the attached setting I get the following error, when trying to set OpenMEEG options using to edit button.
error_openmeeg_batch
Reference to non-existent field 'SEEGMethod'.

Error in panel_openmeeg>CreatePanel (line 88)
isSeeg = strcmpi(OPTIONS.SEEGMethod, 'openmeeg') && ~isempty(OPTIONS.iSeeg);

Error in panel_openmeeg (line 28)
eval(macro_method);

Error in gui_show_dialog (line 51)
[bstPanel, panelName] = fcnPanel('CreatePanel', varargin{:});

Error in panel_process_select>CreatePanel/EditProperties_Callback (line 1569)
value = gui_show_dialog(sCurProcess.Comment, fcnPanel, 1, [], sCurProcess, sFiles);

Error in panel_process_select>@(h,ev)EditProperties_Callback(iProcess,optNames{iOpt}) (line 1330)
gui_component('button', jPanelOpt, [], 'Edit...', [],[], @(h,ev)EditProperties_Callback(iProcess, optNames{iOpt}));

This batch process is very useful for me so that I do not have to process every single headmodel for each run.

Thanks a lot for looking into this!

Marcel

Ah of course… I didn’t change the execution path.
Sorry, I might need a few more trials and errors, as I cannot test this myself…
Can you update and try again?

I fixed this pipeline editor bug as well.

Thank you for adapting the pipeline editor. Now I can edit the settings here, but I get the following error when starting the headmodel pipeline for a single shell MEG BEM.

Error: File: java_dialog.m Line: 382 Column: 16
Arguments to IMPORT must either end with “.*” or else specify a fully qualified class name: “org.brainstorm.dialogs.HotkeyDialog” fails this test.

Error in bst_error (line 135)
java_dialog(‘error’, fullErrMsg, errTitle);

Error in bst_call (line 31)
bst_error();

Error in gui_brainstorm>@(h,ev)bst_call(@ProcessRun_Callback) (line 277)
gui_component(‘toolbarbutton’, jToolbarA, [], ‘’, {IconLoader.ICON_RUN, TB_SIZE}, ‘Start’, @(h,ev)bst_call(@ProcessRun_Callback));

Thanks for looking at this.
Marcel

Have you restarted Matlab?

Yes, I restarted Matlab. I gave you the error from the Linux computer. I went back to version 2.2 on the linux computer and it works fine.

This is the error from the Mac:

Subscripted assignment dimension mismatch.

Error in bst_openmeeg (line 450)
Gain(OPTIONS.iMeg, :slight_smile: = om_load_full(meggain_file);

Error in bst_headmodeler (line 470)
[Gain, errMessage] = bst_openmeeg(OPTIONS);

Error in panel_headmodel>ComputeHeadModel (line 647)
[OPTIONS, errMessage] = bst_headmodeler(OPTIONS);

Error in panel_headmodel (line 27)
eval(macro_method);

Error in panel_protocols>TreeHeadModel (line 1156)
[OutputFiles, errMessage] = panel_headmodel(‘ComputeHeadModel’, iChanStudies);

Error in panel_protocols (line 44)
eval(macro_method);

Error in tree_callbacks>@(h,ev)panel_protocols(‘TreeHeadModel’,bstNodes) (line 2269)
gui_component(‘MenuItem’, jPopup, [], ‘Compute head model’, IconLoader.ICON_HEADMODEL, [],
@(h,ev)panel_protocols(‘TreeHeadModel’, bstNodes));

Marcel

The error with “org.brainstorm.dialogs.HotkeyDialog” you copied previously was not related to the OpenMEEG version. Could you please try with the version 2.4 of OpenMEEG?
(for this: delete the folder $HOME/.brainstorm/openmeeg and restart the computation).

This is the error from the Mac:
Subscripted assignment dimension mismatch.

About this I don’t know… I don’t have a mac, I cannot debug it…
@Sylvain @jeremym @MartinC @Alexandre We need MACOS testers here

After updating Brainstorm and Open MEEG we receive the same error (see below) on a Windows 10 machine. Might the error be related to the error shown on the mac?
Greetings,
Matthias

Unable to perform assignment because the size of the left side is 306-by-45006 and the size of the right side is
1224-by-45006.

Error in bst_openmeeg (line 450)
Gain(OPTIONS.iMeg,:slight_smile: = om_load_full(meggain_file);

Error in bst_headmodeler (line 470)
[Gain, errMessage] = bst_openmeeg(OPTIONS);

Error in panel_headmodel>ComputeHeadModel (line 647)
[OPTIONS, errMessage] = bst_headmodeler(OPTIONS);

Error in panel_headmodel (line 27)
eval(macro_method);

Error in panel_protocols>TreeHeadModel (line 1156)
[OutputFiles, errMessage] = panel_headmodel(‘ComputeHeadModel’, iChanStudies);

Error in panel_protocols (line 44)
eval(macro_method);

Error in tree_callbacks>@(h,ev)panel_protocols(‘TreeHeadModel’,bstNodes) (line 2269)
gui_component(‘MenuItem’, jPopup, [], ‘Compute head model’, IconLoader.ICON_HEADMODEL, [],
@(h,ev)panel_protocols(‘TreeHeadModel’, bstNodes));

I’m sorry for all these issues related with the OpenMEEG upgrade…
Please give us a few weeks. We’ll work on it with @Alexandre at some point in August.

Hello Francois, I am having similar issues with OpenMEEG. I have attempted to run a head model on some MEG data with every variable possible and it either runs indefinitely without finish or terminates due to ‘om_gain’ error. Is there any way this will be resolved within the next two weeks? I must give a presentation for my internship at the NIH in two weeks and am relying on this software. If this is not possible do you recommend any other solution for generating a head model. For now I may simply use the overlapping spheres method.Thank you.

Sorry for the inconvenience, which is essentially beyond our control. We are communicating actively with the OpenMEEG group to resolve these integration issues that appeared with their new version.

If you are using EEG, consider using the spherical head model option instead.
If you are using MEG, the overlapping model is a great alternative.

If it runs forever, it might be because you selected a source space that is too big. In the subject anatomy folder, make sure the cortex surface selected (displayed in green) is the low resolution one (15000 vertices).
Check also the BEM surfaces, maybe try with less vertices on each layer (try down to 600 for the head, 400 for the inner and outer skull)

I’m trying to reproduce it. Can anyone provide a MWE ?
I’ve run tutorial_epilepsy('/home/sik/Downloads/', '/tmp/report_dir/') and everything works fine.

What happens if you do the equivalent of this linux commands?

~
❯ cd ~/.brainstorm/openmeeg/linux64       

~/.brainstorm/openmeeg/linux64
❯ export LD_LIBRARY_PATH=$PWD

~/.brainstorm/openmeeg/linux64
❯ ./om_assemble 
./om_assemble version 2.4.0 compiled at Jul 13 2018 15:57:20 using OpenMP
 Executing using 4 threads.

./om_assemble [-option] [filepaths...]

option :
   -HeadMat, -HM, -hm :   
       Compute Head Matrix for Symmetric BEM (left-hand side of linear system).
             Arguments :
             ...
               dipoles positions and orientations
               a mesh file or a file with point positions at which to evaluate the potential
               output matrix
               (Optional) domain name where lie all dipoles.


~/.brainstorm/openmeeg/linux64
❯ 

Hi Francois,
Our lab is also having similar issues with OpenMEEG. We are using the spherical and overlapping models for the time being. However it would be really helpful if you could tell us when you think this problem would be solved.
We are working on a new source localization project and it would help to know when OpenMEEG would start working again so we can plan our data analysis’ timeline.

Thank you,
Michel

image

Hi Francois and team,

May I know what actually happen, by referring to above printscreen shot, may you suggest to overcome the problem. TQ

Error: OpenMEEG call: om_assemble -HM
** "C:\Users\O M E N.brainstorm\tmp\openmeeg.geom"
** "C:\Users\O M E N.brainstorm\tmp\openmeeg.cond"
** "C:\Users\O M E N.brainstorm\tmp\openmeeg_hm.mat"
** OpenMEEG error #1:
** om_assemble version 2.4.1 compiled at Aug 22 2018 19:47:28 using OpenMP
** Executing using 6 threads.
**
** | ------ om_assemble
** | -HM
** | C:\Users\O M E N.brainstorm\tmp\openmeeg.geom
** | C:\Users\O M E N.brainstorm\tmp\openmeeg.cond
** | C:\Users\O M E N.brainstorm\tmp\openmeeg_hm.mat
** | -----------------------
** (DEPRECATED) Please consider updating your geometry file to the new format 1.1 (see data/README.rst): C:\Users\O M E N.brainstorm\tmp\openmeeg.geom
** IO: load: Unknown mesh file format for C:\Users\O
**
** For help with OpenMEEG errors, please refer to the online tutorial:
** https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem#Errors