GithubHelp home page GithubHelp logo

Comments (14)

banach-space avatar banach-space commented on July 22, 2024 1

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.

mattgodbolt avatar mattgodbolt commented on July 22, 2024

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.

mattgodbolt avatar mattgodbolt commented on July 22, 2024

I added it to the list and we'll see...

from clang-builder.

Sameeranjoshi avatar Sameeranjoshi commented on July 22, 2024

from clang-builder.

mattgodbolt avatar mattgodbolt commented on July 22, 2024

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.

Sameeranjoshi avatar Sameeranjoshi commented on July 22, 2024

andrzej [dot] warzynski [at] gmail [dot] com

from clang-builder.

mattgodbolt avatar mattgodbolt commented on July 22, 2024

Thanks @Sameeranjoshi !

from clang-builder.

mattgodbolt avatar mattgodbolt commented on July 22, 2024

So it looks like it's running out of memory. I got a snapshot just before it died.
Screenshot from 2021-12-06 21-57-46

I'm guessing lots of linkers going on?

from clang-builder.

mattgodbolt avatar mattgodbolt commented on July 22, 2024

See 4f0ff86

from clang-builder.

mattgodbolt avatar mattgodbolt commented on July 22, 2024

Restricting to 4 links didn't help (assuming I did it right).

from clang-builder.

mattgodbolt avatar mattgodbolt commented on July 22, 2024

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.

kiranchandramohan avatar kiranchandramohan commented on July 22, 2024

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.

mattgodbolt avatar mattgodbolt commented on July 22, 2024

Thanks -- we can definitely give that a go. I am pretty sure we have gold available in our build env.

from clang-builder.

mattgodbolt avatar mattgodbolt commented on July 22, 2024

And we built!

https://github.com/compiler-explorer/compiler-workflows/actions/runs/1554449377

Thanks all!

from clang-builder.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.