Dear BST Community,
I encountered the following error when calculating the head model using the default template on windows. The attachment is the contents of the folder $HOME/.brainstorm/tmp
. The logs in the file openmeeg_log.txt are different from those in the community.
My Drive - Google Drive
Please help me to analyse what problem is causing this? Is there any solution for this?
Please update your post with a valid link to the log file, the current one just leads to GoogleDrive
The logs does not show any error in the execution of OpenMEEG.
Please try these two scenarios, to verify the problem is with your anatomy files or with OpenMEEG
A: Computing the head model with the Default anatomy surfaces, and a default EEG cap:
-
Create a new test subject, with the options:
Use default anatomy: No
Use default channel file: No -
In the anatomy view: right-click on the subject > Use template > MNI > ICBM152_2023b
This anatomy default has anatomy surfaces that have been testes with OpenMEEG -
In the functional view: right-click on the subject > New folder > name it the way you want
-
In the new folder, right-click, then Use default EEG cap > ICBM152 > Generic > 10-10 65
-
Right-click on the channel file > Compute head model > Select OpenMEEG and keep all the default values
The head model should be computed without troubles.
If there is problem with the computation please report any message in the Matlab command window, GUI, pop windows, etc. There is no need to try the other two scenarios.
If scenario A worked without troubles, try scenario B and C
B: Computing the head model with your the Default anatomy surfaces, and a default EEG cap:
-
Create a new test subject, with the options:
Use default anatomy: No
Use default channel file: No -
In the anatomy view: right-click on the subject > Use template > MNI > ICBM152_2023b
-
In the functional view: right-click on the subject > New folder > name it the way you want
-
Copy-paste your channel file to the new folder
-
Right-click on the channel file > MRI registration > Edit: Make sure the electrodes and correctly aligned on the head, and click on "Project on head surface".
-
Compute the head model with OpenMEEG.
Report any error message with this scenario.
When I use the first method, the calculations are still wrong.
** Error: OpenMEEG call: om_gain -EEG
** "C:\Users\spx\.brainstorm\tmp\openmeeg_241203_100437\openmeeg_hminv.mat"
** "C:\Users\spx\.brainstorm\tmp\openmeeg_241203_100437\openmeeg_dsm.mat"
** "C:\Users\spx\.brainstorm\tmp\openmeeg_241203_100437\openmeeg_h2em.mat"
** "C:\Users\spx\.brainstorm\tmp\openmeeg_241203_100437\openmeeg_gain_eeg.mat"
** OpenMEEG error #-1073740791:
** om_gain version 2.4.1 compiled at Aug 22 2018 19:47:41 using OpenMP
** Executing using 4 threads.
**
** | ------ om_gain
** | -EEG
** | C:\Users\spx\.brainstorm\tmp\openmeeg_241203_100437\openmeeg_hminv.mat
** | C:\Users\spx\.brainstorm\tmp\openmeeg_241203_100437\openmeeg_dsm.mat
** | C:\Users\spx\.brainstorm\tmp\openmeeg_241203_100437\openmeeg_h2em.mat
** | C:\Users\spx\.brainstorm\tmp\openmeeg_241203_100437\openmeeg_gain_eeg.mat
** | -----------------------
** Using variable with name: matrix
Alright, the problem seems to be with the OpenMEEG setup on yours system.
- Update your Brainstorm instance
- Update the OpenMEEG plugin within Brainstorm
- Try again to compute the head model with the default anatomy and the default EEG cap
If it still does not work. Please share your system information, this can be displayed with the menu Help > System info in the main Brainstorm GUI
***************************************************************************
** Error: OpenMEEG call: om_assemble -DSM
** "C:\Users\spx\.brainstorm\tmp\openmeeg_241204_122013\openmeeg.geom"
** "C:\Users\spx\.brainstorm\tmp\openmeeg_241204_122013\openmeeg.cond"
** "C:\Users\spx\.brainstorm\tmp\openmeeg_241204_122013\openmeeg_dipoles.txt"
** "C:\Users\spx\.brainstorm\tmp\openmeeg_241204_122013\openmeeg_dsm.mat"
** OpenMEEG error #1:
** om_assemble version 2.4.1 compiled at Aug 22 2018 19:47:28 using OpenMP
** Executing using 4 threads.
**
** | ------ om_assemble
** | -DSM
** | C:\Users\spx\.brainstorm\tmp\openmeeg_241204_122013\openmeeg.geom
** | C:\Users\spx\.brainstorm\tmp\openmeeg_241204_122013\openmeeg.cond
** | C:\Users\spx\.brainstorm\tmp\openmeeg_241204_122013\openmeeg_dipoles.txt
** | C:\Users\spx\.brainstorm\tmp\openmeeg_241204_122013\openmeeg_dsm.mat
** | -----------------------
** (DEPRECATED) Please consider updating your geometry file to the new format 1.1 (see data/README.rst): C:\Users\spx\.brainstorm\tmp\openmeeg_241204_122013\openmeeg.geom
** This geometry is a NESTED geometry.
** Info:: Mesh name/ID : 1
** # vertices : 1922
** # triangles : 3840
** Euler characteristic : 2
** Min Area : 7.90588e-06
** Max Area : 6.73148e-05
** Info:: Mesh name/ID : 2
** # vertices : 1922
** # triangles : 3840
** Euler characteristic : 2
** Min Area : 5.81266e-06
** Max Area : 7.73134e-05
** Info:: Mesh name/ID : 3
** # vertices : 1082
** # triangles : 2160
** Euler characteristic : 2
** Min Area : 2.68544e-05
** Max Area : 0.000116932
** Info:: Domain name : Scalp
** Conductivity : 1
** Composed by interfaces : +1 -3
** Interface "1"= { mesh "1" }
** Interface "3"= { mesh "3"(outermost) }
** Info:: Domain name : Skull
** Conductivity : 0.0125
** Composed by interfaces : +2 -1
** Interface "2"= { mesh "2" }
** Interface "1"= { mesh "1" }
** Info:: Domain name : Brain
** Conductivity : 1
** Composed by interfaces : -2
** Interface "2"= { mesh "2" }
** Info:: Domain name : Air
** Conductivity : 0
** Composed by interfaces : +3
** Considered as the outermost domain.
** Interface "3"= { mesh "3"(outermost) }
** Error memory allocation failed...
**
** For help with OpenMEEG errors, please refer to the online tutorial:
** https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem#Errors
***************************************************************************
=== System ===
OS name : Microsoft Windows [版本 10.0.22631.4460]
OS type : win64
Mem total : 8038 MiB
Mem avail : 2621 MiB
Thanks for the detailed information.
It seems to be a not-enough-RAM issue. Try with less vertices:
-
Generate the BEM surfaces with less vertices, e.g, 642 vertices, see the instructions in here:
https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem#Brainstorm -
Once computed, be sure those 642-vertex surfaces are selected as default surfaces ones (in green).
-
Now proceed to compute the head model, right-click on the channel file > Compute head model > Select OpenMEEG check the Use adjoint formulation option, to keep the estimated Memory use, lower than the available memory of your system.
Thank you very much for your help, my problem solved!