Code Monkey home page Code Monkey logo

Comments (5)

solardiz avatar solardiz commented on June 13, 2024

Hi. It is news to me if/that -j detects the actual number of CPUs. That wasn't the case - it would run as many jobs as the Makefile's parallelism allows, so would overwhelm smaller systems. Even if it's better now, I guess that's not universal across platforms and older versions of make are still in use. So we either make no changes or add our own detection of CPU count to include that number in the suggested command.

from john.

solardiz avatar solardiz commented on June 13, 2024

But make -sj should, according to the documentation, automatically try to use as many jobs as possible, based on the number of available CPU cores.

I don't see the "based on the number of available CPU cores" part in the documentation. Where is that?

add our own detection of CPU count to include that number in the suggested command.

Do you want to implement this, @AlbertVeli?

from john.

AlbertVeli avatar AlbertVeli commented on June 13, 2024

But make -sj should, according to the documentation, automatically try to use as many jobs as possible, based on the number of available CPU cores.

I don't see the "based on the number of available CPU cores" part in the documentation. Where is that?

It was actually an assumption based on how it seemed to work. I should have checked before.

add our own detection of CPU count to include that number in the suggested command.

Do you want to implement this, @AlbertVeli?

I can give it a try and see if it succeeds.

from john.

AlbertVeli avatar AlbertVeli commented on June 13, 2024

One easy way would be to call ncores, from coreutils. It is not guaranteed to be installed everywhere though. But ncores if installed, else a default value of 4. What do you think of that?

Edit. The tool from coreutils is called nproc, not ncores.

from john.

solardiz avatar solardiz commented on June 13, 2024

We ended up going with "add our own detection of CPU count to include that number in the suggested command". So we can close this issue as completed, in that sense.

from john.

Related Issues (20)

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.