Comments (14)
Hi @mattgodbolt, hi @Sameeranjoshi 👋🏻
Thank you for your e-mail! I'm replying here so that more people can participate (in case I missed anything).
Sadly, LLVM Flang has rather extreme memory requirements. From my personal experience, 64GB should be sufficient. From the screenshot that you copied above, it looks like the build is crashing at compile rather than link time. This makes sense and (AFAIK) is due to a heavy use of templates in various parts of LLVM Flang (hence heavy use of memory at compile time).
I wasn't able to dig out the actual build commands that are used here. I've checked the action for building Clang and I saw ninja install
. This might be too ambitious for LLVM Flang. From ninja docs
Builds are always run in parallel, based by default on the number of CPUs your system has.
AFAIK, ninja
is equivalent to ninja -j64
(on a 64 core machine). I would start by experimenting with ninja -j32
(basically, nproc
/2) and see what happens. You can then try gradually increasing the number of jobs to speed things up. Similar logic applies to make
(though the default behaviour of make
and ninja
is different). I'm not aware of any CMake setting that would help here (e.g. tweaking the number of links jobs is unlikely to help).
thanks for working on this and for Compiler Explorer!
-Andrzej
from clang-builder.
Error is:
CMake Error at CMakeLists.txt:97 (message):
Clang is not enabled, but is required for the Flang driver
-- Configuring incomplete, errors occurred!
So I guess maybe we just need to add clang to the list...
from clang-builder.
I added it to the list and we'll see...
from clang-builder.
from clang-builder.
Thanks @Sameeranjoshi . The email address you mentioned got blanked for privacy reasons by github, but I can ask around.
In other news, llvm-flang now fails to build as it seems to kill the (new) runner:
The self-hosted runner: i-0752cedb3b50eb50c lost communication with the server. Verify the machine is running and has a healthy network connection. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.
It only seems to be the llvm-flang build that kills us, though that could be an issue on our side.
from clang-builder.
andrzej [dot] warzynski [at] gmail [dot] com
from clang-builder.
Thanks @Sameeranjoshi !
from clang-builder.
So it looks like it's running out of memory. I got a snapshot just before it died.
I'm guessing lots of linkers going on?
from clang-builder.
See 4f0ff86
from clang-builder.
Restricting to 4 links didn't help (assuming I did it right).
from clang-builder.
Thanks @banach-space -- I will try limiting the parallel using clang's own throttling - https://llvm.org/docs/CMake.html#frequently-used-llvm-related-variables suggests I can also reduce the number of compilations as well as link steps (when using ninja
, specifically, which as you potin out we do)
Thanks!
from clang-builder.
Can you also use gold or lld to link? -DLLVM_USE_LINKER=gold
Sometimes the compilation of files and link steps overlap and these linkers use less memory.
from clang-builder.
Thanks -- we can definitely give that a go. I am pretty sure we have gold
available in our build env.
from clang-builder.
And we built!
https://github.com/compiler-explorer/compiler-workflows/actions/runs/1554449377
Thanks all!
from clang-builder.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clang-builder.