Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update nthreads info in versioninfo #52423

Merged

Conversation

IanButterworth
Copy link
Sponsor Member

@IanButterworth IanButterworth commented Dec 6, 2023

Fixes #52404
@nilshg I opted to make it one line as it fits.

julia> versioninfo()
Julia Version 1.11.0-DEV.1011
Commit bb7091c6f2* (2023-12-04 14:58 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin23.0.0)
  CPU: 10 × Apple M2 Pro
  WORD_SIZE: 64
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores)
Environment:
  JULIA_EDITOR = code

@nilshg
Copy link
Sponsor Contributor

nilshg commented Dec 6, 2023

Looks great, thank you!

@christiangnrd
Copy link
Contributor

There might be an off-by-one error somewhere. I'm not familiar enough with the internals to be able to tell where but with this pr the total number of threads (8 default + 0 interactive + 4 GC = 12) is one higher than on master (11 on 8 virtual cores).

Or maybe one of the GC threads is shared with the default ones?

If this PR does not get backported to 1.10 and the current versioninfo() is incorrect, let me know and I'll create a separate issue to at least fix it.

@brenhinkeller brenhinkeller added the multithreading Base.Threads and related functionality label Dec 8, 2023
@IanButterworth
Copy link
Sponsor Member Author

Or maybe one of the GC threads is shared with the default ones?

Seems to be the case. The thread that spawns GC is used for GC, so ngcthreads() is only >1 if dedicated GC threads are requested

ngcthreads() = Int(unsafe_load(cglobal(:jl_n_gcthreads, Cint))) + 1

@IanButterworth
Copy link
Sponsor Member Author

bump @vchuravy (hopefully simple)

@giordano
Copy link
Contributor

Can this be backported to 1.10, since that's where the issue was originally reported on in #52404?

@IanButterworth IanButterworth added the backport 1.10 Change should be backported to the 1.10 release label Dec 23, 2023
@IanButterworth
Copy link
Sponsor Member Author

If this doesn't get specific approval first I'll merge this in a few days assuming #52423 (comment) is correct.

@IanButterworth IanButterworth merged commit e96c13a into JuliaLang:master Dec 28, 2023
7 checks passed
@IanButterworth IanButterworth deleted the ib/versioninfo_threads branch December 28, 2023 12:42
KristofferC pushed a commit that referenced this pull request Jan 5, 2024
Fixes #52404
@nilshg I opted to make it one line as it fits.
```
julia> versioninfo()
Julia Version 1.11.0-DEV.1011
Commit bb7091c* (2023-12-04 14:58 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin23.0.0)
  CPU: 10 × Apple M2 Pro
  WORD_SIZE: 64
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores)
Environment:
  JULIA_EDITOR = code
```

(cherry picked from commit e96c13a)
@KristofferC KristofferC mentioned this pull request Jan 5, 2024
33 tasks
KristofferC pushed a commit that referenced this pull request Jan 5, 2024
Fixes #52404
@nilshg I opted to make it one line as it fits.
```
julia> versioninfo()
Julia Version 1.11.0-DEV.1011
Commit bb7091c* (2023-12-04 14:58 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin23.0.0)
  CPU: 10 × Apple M2 Pro
  WORD_SIZE: 64
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores)
Environment:
  JULIA_EDITOR = code
```

(cherry picked from commit e96c13a)
KristofferC added a commit that referenced this pull request Feb 6, 2024
Backported PRs:
- [x] #51095 <!-- Fix edge cases where inexact conversions to UInt don't
throw -->
- [x] #52583 <!-- Don't access parent of triangular matrix in powm -->
- [x] #52645 <!-- update --gcthreads section in command line options -->
- [x] #52423 <!-- update nthreads info in versioninfo -->
- [x] #52721 <!-- inference: Guard TypeVar special case against vararg
-->
- [x] #52637 <!-- fix finding bundled stdlibs even if they are e.g.
devved in an environment higher in the load path -->
- [x] #52752 <!-- staticdata: handle cycles in datatypes -->
- [x] #52758 <!-- use a Dict instead of an IdDict for caching of the
`cwstring` for Windows env variables -->
- [x] #51375 <!-- Insert hardcoded backlinks to stdlib doc pages -->
- [x] #52994 <!-- place work-stealing queue indices on different cache
lines to avoid false-sharing -->
- [x] #53015 <!-- Add type assertion in iterate for logicalindex -->
- [x] #53032 <!-- Fix a list in GC devdocs -->
- [x] #52748 
- [x] #52856 
- [x] #52878
- [x] #52754 
- [x] #52228
- [x] #52924
- [x] #52569 <!-- Fix GC rooting during rehashing of iddict -->
- [x] #52605 <!-- Default uplo in symmetric/hermitian -->
- [x] #52618 <!-- heap snapshot: add gc roots and gc finalist roots to
fix unrooted nodes -->
- [x] #52781 <!-- fix type-stability bugs in Ryu code -->
- [x] #53055 <!-- Profile: use full terminal cols to show function name
-->
- [x] #53096 
- [x] #53076 
- [x] #52841 <!-- Extensions: make loading of extensions independent of
what packages are in the sysimage -->
- [x] #52078 <!-- Replace `&hArr;` by `&harr;` in documentation -->
- [x] #53035 <!-- use proper cache-line size variable in work-stealing
queue -->
- [x] #53066 <!-- doc: replace harr HTML entity by unicode -->
- [x] #52996 <!-- Apple silicon has 128 byte alignment so fix our
defines to match -->
- [x] #53121 

Non-merged PRs with backport label:
- [ ] #52694 <!-- Reinstate similar for AbstractQ for backward
compatibility -->
- [ ] #51479 <!-- prevent code loading from lookin in the versioned
environment when building Julia -->
@KristofferC KristofferC removed the backport 1.10 Change should be backported to the 1.10 release label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multithreading Base.Threads and related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve information displayed on threads by versioninfo
6 participants