I know the OpenMEEG team worked a lot for correcting some bugs lately but it seems that the new version did not solve everything.
I have EEG/MEG data in which I want to compute the head model in EEG and in MEG.
It is working well in EEG, but for the same meshes, I have the following error for MEG:
** Error: No noise covariance matrix available.
Unable to perform assignment because the size of the left side is 294-by-24006 and the size of the right side is 2316-by-24006.
Error in bst_openmeeg (line 450)
Gain(OPTIONS.iMeg, :) = 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)
Error in panel_protocols>TreeHeadModel (line 1156)
[OutputFiles, errMessage] = panel_headmodel('ComputeHeadModel', iChanStudies);
Error in panel_protocols (line 44)
Error in tree_callbacks>@(h,ev)panel_protocols('TreeHeadModel',bstNodes) (line 2271)
gui_component('MenuItem', jPopup, , 'Compute head model', IconLoader.ICON_HEADMODEL, , @(h,ev)panel_protocols('TreeHeadModel',
I am using 64-bit Ubuntu, in Matlab 2018b, with an up-to-date version of brainstorm (28-sep-2018) and OpenMEEG (
can you share the content of the tmp folder containing the openmeeg files?
3 options I see:
another IO Bug on OpenMEEG code
bug in the brainstorm wrapper for MEG
left over files from old OpenMEEG versions
This tmp folder is in your home folder, something like:
Zip all its contents immediately after getting this error. Restarting a new computation, closing or starting Brainstorm empties this folder.
I could not replicate the crash using the files attached:
I just hacked some MEG sensor locations to complete the computation.
Can it be a pb with brainstorm MEG leadfield? or maybe it's because you did not provide the MEG sensor locations?
I’m not sure what you mean by the brainstorm MEG leadfield. But for sure the MEG sensor locations were provided!
The thing is that with the exact same data, if I use an older version of OpenMEEG (2.2.0), I am able to calculate the gain matrix without crash…
ok so with your squids file I had not seen I do see something weird.
I opened an issue:
thanks a lot for the issue report.
let’s hope we can fix this quickly.
Sorry for my late response. Unfortunately I cannot replicate.
@Francois from the matlab trace I’ve trouble to figure out which
om_ binary failed. It seems that it might be
om_load_full but I find it weird (actually i don’t even know what that binary is).
om_gain is the usual suspect.
@tanguy could you run an
ldd of the binary that brainstrom is executing underneath?
this is what I get on my pc:
(base) ❯ ldd ~/.brainstorm/openmeeg/linux64/om_gain
libgtk3-nocsd.so.0 => /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 (0x00007f615daf4000)
libOpenMEEG.so.1 => /home/sik/.brainstorm/openmeeg/linux64/libOpenMEEG.so.1 (0x00007f615d738000)
libOpenMEEGMaths.so.1 => /home/sik/.brainstorm/openmeeg/linux64/libOpenMEEGMaths.so.1 (0x00007f615c285000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f615c055000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f615bcb7000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f615b929000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f615b711000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f615b320000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f615b11c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f615aefd000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f615ace0000)
Here’s what I get:
capulet 119% ldd ~/.brainstorm/openmeeg/linux64/om_gain
linux-vdso.so.1 => (0x00007ffcb2c77000)
libOpenMEEG.so.1 => not found
libOpenMEEGMaths.so.1 => not found
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007fc086f53000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc086c4d000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc086937000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc08671f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc086356000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc086152000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc085f34000)
@tanguy we don’t manage to replicate on multiple machines. You get this errors on all subjects? can you try on a different machine to see if you can replicate?
Yes, I get this error in all the machines in the lab (all Linux64) and all my MEG subjects (.ds files). Do you want me to send you some data to test with?
@tanguy. My fault, can you export the
LD_LIBRAY_PATH and repeat the ldd? I think that this
not found would disappear.
Then the next step would be to replicate the call that brainstorm does.
see, these threads:
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
❯ export LD_LIBRARY_PATH=$PWD
./om_assemble version 2.4.0 compiled at Jul 13 2018 15:57:20 using OpenMP
Executing using 4 threads.
@jhan24 could you run the openmeeg from the terminal and post the error for me? Thx.
To do so, open the terminal, find your brainstorm’s openmeeg installation and run the line you see in the compute head model error you posted. (There’s a trick, you might export the LD_LIBRARY_PATH)
In my case is:
(base) ❯ cd ~/.brainstorm/openmeeg/linux64
(base) ❯ export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
@Francois the BST error claims a missing covariance matrix, ant the openmeeg_log.txt shows no failure.
I think the error about the missing noise covariance matrix is unrelated, this does not happen in the same tasks.
This is probably something that residual that was in the Matlab command window.
@Francois is right. The missing noise covariance error is an unrelated warning that I’ve copied/pasted by mistake. It is not part of my OpenMEEG problem, my bad.
I am not sure what to do now, I’ve updated my LD_LIBRARY_PATH and now all the libraries are seen by ldd. If I launch om_gain from a terminal, I’ve got no error, but in brainstorm, it is still not working. Any idea?
capulet 159% cd ~/.brainstorm/openmeeg/linux64
capulet 160% ldd ./om_gain
linux-vdso.so.1 => (0x00007ffeae976000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007ff3ec2a8000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff3ebfa2000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff3ebc8c000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff3eba74000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff3eb6ab000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff3eb48d000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff3eb289000)
libz.so.1 => /opt/minc-itk4/lib/libz.so.1 (0x00007ff3eb06e000)
capulet 161% ./om_gain -MEG ~/.brainstorm/tmp/openmeeg_hminv.mat ~/.brainstorm/tmp/openmeeg_dsm.mat ~/.brainstorm/tmp/openmeeg_h2mm.mat ~/.brainstorm/tmp/openmeeg_ds2meg.mat ~/.brainstorm/tmp/openmeeg_gain_meg.mat ./om_gain version 2.4.1 compiled at Aug 29 2018 08:19:44 using OpenMP
Executing using 4 threads.
| ------ ./om_gain
| Elapsed Time: 49.137 s.