Giter VIP home page Giter VIP logo

Comments (7)

carsten-forty2 avatar carsten-forty2 commented on July 30, 2024 2

Change default behaviour. Will be live after the next core update.

export OPENBLAS_NUM_THREADS=12 && python -c 'import pygimli as pg; print(pg.core.threadCount())'
12
unset OPENBLAS_NUM_THREADS && python -c 'import pygimli as pg; print(pg.core.threadCount())'
16

from gimli.

carsten-forty2 avatar carsten-forty2 commented on July 30, 2024 1

We maybe could change this that he only sets this environment variable, if its not already specified by the user?

from gimli.

prisae avatar prisae commented on July 30, 2024

This circumvents the issue (mostly):

import pygimli as pg
pg.setThreadCount(1)

but still, I would not expect an import to mess with my variables.

from gimli.

carsten-forty2 avatar carsten-forty2 commented on July 30, 2024

For conveniance reasons, the core extension of pygimli sets OPENBLAS_NUM_THREADS to number of cpu -2 right on initializing. You can change it back after importing pygimli with pg.setThreadCount(1)

from gimli.

prisae avatar prisae commented on July 30, 2024

I see. But when the number of CPU is 256 on a shared cluster, that is a very inconvenient default IMHO.

I would prefer what you say afterwards. IF there is a user set env variable, it should be respected.

from gimli.

prisae avatar prisae commented on July 30, 2024

And maybe also a MAX (no need to set the nthread to 254).

from gimli.

prisae avatar prisae commented on July 30, 2024

Great, like it, thanks for the quick turnaround! 8 or 16 was exactly what our HPC expert here also suggested as maximum, as openblas won't be much efficient beyond that number.

from gimli.

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.