Hey guys, I was trying to install GLOW on my local PC which has 16GB RAM. The RAM usage was 3.5 GB, before I stared building GLOW. After I stared the ninja all command, initially the RAM usage was around ~4.5-5GB. Later the RAM usage was full and it started moving stuff to SWAP and that's when my system started to hang. This was due to linking of some libraries. Atlast I could not install it in local PC, and had to install it on a azure machine, to work with it.
Is there a work around to install on a system with 16GB RAM?
Hi @csbenk, I am building on my local machine which also has 16GB RAM, and have no issue. Can you give more info on how you are configuring your cmake, e.g. what CMAKE_BUILD_TYPE you're using, etc.? Also, what LLVM build type and version are you using? Do you know what library is causing the issue when linking?
CMAKE_BUILD_TYPE param was set to Debug and I built LLVM using the build_llvm.sh script in utils/ folder.
I am away from my PC that I was working, I can get back to you on the library causing the issue only after tomorrow. I will let you know the library linking which was causing the issue then.
I confirm the issue. I think this is due to the memory needed to link with LLVM. Each link process consumes more than 5GB of memory. I've got 24GB of memory, and I had to limit myself to ninja -j 2 to avoid issues. Otherwise, my computer freezes and potentially crashes due to tremendous swapping.
Edit: I also compile in Debug mode.
@csbenk
I was running with instruments on my mac and ninja all did not consume any significant amount of memory.
Platform information would be useful too: OS and compiler version, as well as the version of LLVM you're linking against.
I am so sorry for claiming that GLOW consumes lot of memory. It was LLVM. bash build_llvm.sh initally runs fine but as and on it reaches its end, it starts to consume more and more RAM.
OS: Ubuntu 16.04
I have not run the ninja all command to compile GLOW on my local PC as LLVM cannot be built.
Should I close the issue?
thanks for confirmation @csbenk
As a side note: I recompiled LLVM, in Release mode this time. It's much faster to link and the glow link consumes much less memory.
Thanks @tlepley-cadence. Building LLVM in Release mode helped.
Now, I built GLOW :smile:
Most helpful comment
As a side note: I recompiled LLVM, in
Releasemode this time. It's much faster to link and the glow link consumes much less memory.