JuliaSIMD / JuliaSIMD/Polyester.jl

`@batch` loops freeze completely on Apple M2 Pro with Julia x86 (Rosetta)

Open
#126 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Julia
Stars
285
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Because of the problems with ARM (#88 and #89) I wanted to give Julia x86 with Rosetta a shot.
Unfortunately, `@batch` doesn't really work at all for me there:
```
julia> @btime @batch for _ in 1:1000 end
1.258 μs (0 allocations: 0 bytes)

julia> @btime @batch for _ in 1:1000 end
```
It just freezes there forever and doesn't react to Ctrl + C. CPU load goes down to a constant 100%.

I can't reproduce this by just putting `@batch for _ in 1:1000 end` into a plain `for` loop, so there must be something that BenchmarkTools is doing to trigger this bug. But it's not just BenchmarkTools. I can't run any multithreaded simulations with our simulation code: https://github.com/trixi-framework/Trixi.jl/issues/1724

```
julia> versioninfo()
Julia Version 1.9.3
Commit bed2cd540a1 (2023-08-24 14:43 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (x86_64-apple-darwin22.4.0)
CPU: 10 × Apple M2 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, westmere)
Threads: 10 on 10 virtual cores
Environment:
JULIA_EDITOR = code
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.