Problem with 12 cores ubuntu 22.04

Hello,
I was trying to run headmodel with a cortex type. And I run into this error. It is cut because is long message. I think it is realted to parallel processing.

I have copied the message from matlab.

BST> Plugin openmeeg already loaded: /root/.brainstorm/plugins/openmeeg
./om_gain -EEG "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_hminv.mat" "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_dsm.mat" "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_h2em.mat" "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_gain_eeg.mat" 2>&1: Killed

***************************************************************************
** Error: [process_headmodel]  Sources > Compute head model
** OpenMEEG call: om_gain -EEG
**       "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_hminv.mat"
**       "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_dsm.mat"
**       "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_h2em.mat"
**       "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_gain_eeg.mat"
** OpenMEEG error #137: 
** ./om_gain version 2.4.1 compiled at Aug 29 2018 08:19:44 using OpenMP
**  Executing using 12 threads.
** 
** | ------ ./om_gain
** | -EEG
** | /root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_hminv.mat
** | /root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_dsm.mat
** | /root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_h2em.mat
** | /root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_gain_eeg.mat
** | -----------------------
** Using variable with name: matrix
** /bin/bash: line 1: 460472 Killed                  ./om_gain -EEG "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_hminv.mat" "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_dsm.mat" "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_h2em.mat" "/root/.brainstorm/tmp/openmeeg_240606_091056/openmeeg_gain_eeg.mat" 2>&1
** 
** For help with OpenMEEG errors, please refer to the online tutorial:
** https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem#Errors
** 
***************************************************************************

Hi @andraderenew,

Check this other thread reporting the same error, it seem related to memory:
It could be found with the error code showed in the shared error message:
** OpenMEEG error #137:

https://neuroimage.usc.edu/forums/t/openmeeg-error-137/10939

To avoid duplicating posts, please post on that other thread if you issue has the same cause.
Use the monitor system software in Ubuntu to track the usage of RAM to see if that is the case