## Running out of RAM when compiling on Ubuntu

Questions and problems about using polymake go here.
ZivaU
Posts: 2
Joined: 10 Nov 2021, 10:27

### Running out of RAM when compiling on Ubuntu

I use Ubuntu 20.4 and have 8GB of RAM. I first installed polymake using sudo apt install polymake. When re-compiling my computer freezes and I managed to figure out that it runs out of RAM (when I am not running anything it uses approximately 1GB). I then tried uninstalling polymake and installing again from source (following the instructions at https://polymake.org/doku.php/install/install), but ran into the same problem.

Is there anything I can do to avoid this?

gawrilow
Main Author
Posts: 389
Joined: 25 Dec 2010, 17:40

### Re: Running out of RAM when compiling on Ubuntu

When you install an official package via apt, there should be no need in recompilation, everything is ready to use. What exactly were you trying to do that caused the compilation?

ZivaU
Posts: 2
Joined: 10 Nov 2021, 10:27

### Re: Running out of RAM when compiling on Ubuntu

Thank you for a prompt response!

I used it for some computations, closed it and opened it again (this would be my second use of it). That caused it to recompile.

gawrilow
Main Author
Posts: 389
Joined: 25 Dec 2010, 17:40

### Re: Running out of RAM when compiling on Ubuntu

After your first session, a directory structure named ~/.polymake/wrappers.0 or similar should have appeared in your home directory. How many files with a suffix ".cpperl" are there in total? Use the find command to list them all, they reside in deeper subdirectories. If there are just one or two, then it's a bad news: your computer is simply too small for polymake or you have too many other processes running in parallel (watching videos?). But if there are in fact many such files, you can help yourself with a small hack: create a simple script file

#!/bin/bash
/usr/bin/ninja -j 1 "\$@"

Store this script under the name "ninja" in any directory which occurs in your PATH before /usr/bin, and set the executable bit (chmod u+x ninja). Then it will start only one compilation job at any time, hopefully it will nicely fit in your RAM.