0

I am trying to install graph-tool on my laptop with 4GB RAM. I realized that the RAM is not sufficient and so I created a swap file of size 4GB using the instructions given here. However, I still keep getting the following error after sudo make:

virtual memory exhausted: Cannot allocate memory
make[4]: *** [graph_blockmodel_covariates.lo] Error 1
make[4]: Leaving directory `/home/snehal/Packages/graph-tool-2.13/src/graph/community'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/snehal/Packages/graph-tool-2.13/src/graph'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/snehal/Packages/graph-tool-2.13/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/snehal/Packages/graph-tool-2.13'
make: *** [all] Error 2

I am unable to understand the issue. Is there any particular way which I need to tell to system to use memory in the swap file?

Thanks in advance.

Peaceful
  • 4,920
  • 15
  • 54
  • 79

1 Answers1

1

this sounds very surprising; can you look at your RAM using your system monitor to confirm? I've never seen graph-tool take that much memory. And anyway your system should almost freeze if the RAM was really exhausted.

Please post details about your OS and what you used to compile graph-tool. Also check on that you have indeed satisfied all the requirements.

EDIT: the accepted procedure on debian or ubuntu to install graph-tool is to add Tiago's repository in your sources, then install the precompiled package using apt-get install python-graph-tool or through synaptic. Note that it will not be the bleeding-edge release, though.

Silmathoron
  • 1,781
  • 1
  • 15
  • 32
  • I have of course successfully configured it so the requirements are already met. I have already installed graph-tool on some other machine with very high RAM. I just want to know how can I use that swap file memory during compilation. – Peaceful Mar 19 '16 at 16:49
  • What kind of linux distribution do you use? Maybe using a precompiled package would help you reduce the amount of RAM needed... If you don't need one of the latest features that are not in the last release, you can get them easily for debian, gentoo, and arch. – Silmathoron Mar 19 '16 at 17:03
  • I am using Ubuntu 14.04 – Peaceful Mar 19 '16 at 17:08
  • 1
    Then you should try using the precompiled deb. Follow the [instructions](https://graph-tool.skewed.de/download) in the "Pre-compiled Packages" section for "Debian & Ubuntu". – Silmathoron Mar 19 '16 at 17:15
  • Could you elaborate on that? There is no `sudo make` when installing .deb packages... – Silmathoron Mar 19 '16 at 17:33
  • Just tried that. Doesn't matter. Basically `make` returns that error. – Peaceful Mar 19 '16 at 17:36
  • There is no *need* to use make if you are using a pre-compiled package. It is impossible to run out of memory in that case. – Tiago Peixoto Mar 20 '16 at 15:41
  • @TiagoPeixoto: You mean I should simply try `make install` after `./configure`? – Peaceful Mar 20 '16 at 18:20
  • 2
    No, you do not run configure and make at all. You should simply install the pre-compiled packages as described in https://graph-tool.skewed.de/download#debian – Tiago Peixoto Mar 20 '16 at 18:24
  • Can one of you add this as the answer so that I can accept that? I think @Silmathoron can also edit his answer and I will accept it. Thanks to both of you – Peaceful Mar 20 '16 at 18:43