VMware Communities
Keccogrin
Contributor
Contributor

Program "killed" in the Virtual Machine

Hello,

I am using VMware Workstation 12 Player (with host = Windows 8.1, Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 64-bit o.s., RAM = 8 GB) (and guest = Ubuntu 14.04-LTS).

When I try to run a (particularly big) program written in Fortran (which would require 13-14 hours as I estimated), at the very beginning (when some matrices are built) the message "Killed" appears, and the program stops.

What is the problem here?

I think it should not be a problem of memory size because I have 23.5 GB used and 22.5 GB free.

Maybe is it the small RAM?

I've also tried to set the memory of the Virtual Machine to the maximum (see the image), but nothing.

Thank you in advance,

Bye,

Francesco

Tags (1)
0 Kudos
3 Replies
dariusd
VMware Employee
VMware Employee

Does your Ubuntu guest's "dmesg" or /var/log/messages show any activity at the time the process is killed?  If the virtual machine fills its 4 GBytes of RAM, the Linux kernel's out-of-memory (OOM) killer will step in and terminate a process in the guest -- often it kills the process which is using the most RAM, which would probably be your Fortran program.

If it's the OOM killer which is responsible, you'll either need to find a way to allocate additional RAM to the virtual machine (Can you nudge it up to 6 GBytes?  Can you add additional physical RAM to your host system?), or rearrange your Fortran program to reduce its memory requirements.

Cheers,

--

Darius

0 Kudos
Keccogrin
Contributor
Contributor

Thank you dariusd

here it is what the "dmsg" command reports:

[ 1036.251805] [ 2786]  1000  2786  3464195   9153453868   984519         0 SISLDG-swe

[ 1036.251806] Out of memory: Kill process 2786 (SISLDG-swe) score 924 or sacrifice child

[ 1036.251808] Killed process 2786 (SISLDG-swe) total-vm:13856780kB, anon-rss:3661332kB, file-rss:48kB

Do you think I can estimate the amount of RAM needed by my program (SISLDG-swe) before running it? Is there a quick and simple way to do this?

Bye,

Francesco

0 Kudos
dariusd
VMware Employee
VMware Employee

There's no straightforward way to estimate the program's memory usage without inspecting its input and algorithm.  Clearly it needs to use more than 3.66 GBytes.

Try powering the VM off and then adjusting its memory allocation up from 4096 MB towards 6320 MB.  You might also be able to configure swap space within the Ubuntu guest, which will use hard disk space as extra "memory"... but that will be very slow, particularly for a computationally intensive workload.  Your best option is to try increasing the amount of RAM available to the virtual machine, adding more physical RAM to the host if necessary (and if possible).

Cheers,

--

Darius

0 Kudos