"Operating system error: Cannot allocate memory. Allocation would exceed memory limit"

Dear community,

I’m running a pure granular DEM simulation and I got this error when I try to save the particle position under tecplot format. The number of particles is 226771 and the system has 32 Gb RAM. The initial file is saved (**_DES_DATA_0000.dat) but when it tries to save the next time step it crashes. vtp files are written normally.

Operating system error: Cannot allocate memory
Allocation would exceed memory limit

Error termination. Backtrace:
Operating system error: Cannot allocate memory
Allocation would exceed memory limit

Error termination. Backtrace:
#0  0x7f28b08a8d01 in ???
#1  0x7f28b08a9849 in ???
#2  0x7f28b08a9aa4 in ???
#0  0x7f6f99513d01 in ???
#1  0x7f6f99514849 in ???
#2  0x7f6f99514aa4 in ???
#3  0x55d325d8391d in __write_des_data_mod_MOD_write_des_tecplot
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/des/write_des_data.f:355
#4  0x55d325d84419 in __write_des_data_mod_MOD_write_des_data
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/des/write_des_data.f:64
#3  0x559a21bd991d in __write_des_data_mod_MOD_write_des_tecplot
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/des/write_des_data.f:355
#4  0x559a21bda419 in __write_des_data_mod_MOD_write_des_data
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/des/write_des_data.f:64
#5  0x55d325bac9f4 in __write_spx1_mod_MOD_write_spx1
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/write_spx1.f:98
#5  0x559a21a029f4 in __write_spx1_mod_MOD_write_spx1
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/write_spx1.f:98
#6  0x559a219662e4 in __output_man_MOD_output_manager
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/output_manager.f:125
#7  0x559a2191305f in __des_time_march_MOD_des_time_step
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/des/des_time_march.f:244
#6  0x55d325b102e4 in __output_man_MOD_output_manager
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/output_manager.f:125
#7  0x55d325abd05f in __des_time_march_MOD_des_time_step
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/des/des_time_march.f:244
#8  0x55d325abbfdf in run_dem
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/mfix.f:211
#9  0x55d325abbfdf in run_mfix_
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/mfix.f:146
#10  0x55d325abc476 in mfix
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/mfix.f:298
#11  0x55d325abb698 in main
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/mfix.f:269
#8  0x559a21911fdf in run_dem
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/mfix.f:211
#9  0x559a21911fdf in run_mfix_
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/mfix.f:146
#10  0x559a21912476 in mfix
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/mfix.f:298
#11  0x559a21911698 in main
	at /home/fer/anaconda3/envs/mfix-20.4.0/share/mfix/src/model/mfix.f:269
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[6562,1],2]
  Exit code:    1
--------------------------------------------------------------------------

Unfortunatlely MFiX allocates a large array when writing the tecplot files - the memory usage is doubled because of this large temporary array. If you can configure more swap space this might help you get over the hurdle. It’s possible that the file-writing code could be modified to use smaller temporary arrays, but this is not on the development schedule at this time.

I see, thanks for the answer!