# How to correctly install Julia in Renoir platform?

**URL:** https://discourse.julialang.org/t/how-to-correctly-install-julia-in-renoir-platform/43756
**Category:** New to Julia
**Tags:** installation
**Created:** [July 27, 2020, 11:43am UTC](https://discourse.julialang.org/t/how-to-correctly-install-julia-in-renoir-platform/43756 "2020-07-27T11:43:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![huaiyuli](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@huaiyuli](https://discourse.julialang.org/u/huaiyuli)
#### Post date: [July 27, 2020, 11:43am UTC](https://discourse.julialang.org/t/how-to-correctly-install-julia-in-renoir-platform/43756/1 "2020-07-27T11:43:43Z")

</div>

I am using a laptop with AMD Renoir CPU, the operating system is Manjaro under WSL2. Under a simple performance test there appears to be a major performance problem:

```julia
julia> versioninfo()

Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 5 4600HS with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, znver1)

julia> using LinearAlgebra

julia> LinearAlgebra.versioninfo()
BLAS: libopenblas (OpenBLAS 0.3.10 NO_LAPACK NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY USE_OPENMP Prescott MAX_THREADS=64)
LAPACK: liblapack

```

I assume that it is recognized as a Prescott CPU and the performance does not surprise me:

```julia
julia> peakflops(10_000)
7.764909084542572e10 

```

For a 6c12t processor it should not be right as my 7200U laptop has about 5e10 on battery. To add it gives basically same result in the Windows version of Julia.

I tried also to download from GitHub and compile it myself. With a naive compilation it gives:

```julia
julia> versioninfo()
Julia Version 1.6.0-DEV.531
Commit 3dc49ca18d (2020-07-24 05:37 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 5 4600HS with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, btver1)

julia> using LinearAlgebra

julia> LinearAlgebra.versioninfo()
BLAS: libopenblas (OpenBLAS 0.3.9 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Prescott MAX_THREADS=32)
LAPACK: libopenblas64_

julia> peakflops(10_000)
5.056306894529036e10

```

To make things worse now the LLVM is even Bristol Ridge arch. I may be able to solve the part of OpenBLAS but the LLVM is confusing. Since I am pretty much a starter and using Julia as a learning tool instead of coping with compilation first, how should I fix the performance problem and have the hardware recognized correctly? BTW, I would expect step-to-step procedures since I suppose it is not only me but many other users new to Julia.

To add: [This thread](https://discourse.julialang.org/t/julia-faster-on-mac-osx-than-in-linux/9839/18) reported a similar Prescott problem. However, I suppose MKL to be a not acceptable solution for Zen CPUs and the “Prescott” should have an **easy debug mode to override.**

* * *

Update: I reinstalled and reconfigured the libopenblas from AUR, now the system Julia has:

```julia
julia> LinearAlgebra.versioninfo()
BLAS: libopenblas (OpenBLAS 0.3.10 NO_AFFINITY USE_OPENMP ZEN MAX_THREADS=12)
LAPACK: liblapack

julia> peakflops(10_000)
1.9276897177522015e11

```

It now saves me from the annoyance and enables me to focus on actual coding and real problems. However, I still suggest there being problems since I tried editing `Make.user` too and **it didn’t work at all.**

---

<div class="post-metadata">

### Author: ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)
#### Post date: [July 27, 2020, 3:25pm UTC](https://discourse.julialang.org/t/how-to-correctly-install-julia-in-renoir-platform/43756/2 "2020-07-27T15:25:00Z")

</div>

Did you ever check how many threads BLAS was using? It is possible that you were not fully utilizing your CPU on your first tests. For example, I get about 5.7e10 with only 1 thread, but like 2.4e11 with 6 threads.

See this discussion

> [@Maximum BLAS threads number](https://discourse.julialang.org/t/maximum-blas-threads-number/25320):
>
> Hi, consider the following example: julia\> versioninfo() Julia Version 1.1.1 Commit 55e36cc308 (2019-05-16 04:10 UTC) Platform Info: OS: Linux (x86\_64-pc-linux-gnu) CPU: Intel(R) Xeon(R) Gold 6136 CPU @ 3.00GHz WORD\_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.1 (ORCJIT, skylake) Environment: JULIA\_NUM\_THREADS = 24 julia\> using LinearAlgebra julia\> BLAS.set\_num\_threads(24) julia\> ccall((:openblas\_get\_num\_threads64\_, Base.libblas\_name), Cint, ()) 16 julia\> BLAS.set\_num\_threads(12…

---

<div class="post-metadata">

### Author: ![huaiyuli](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@huaiyuli](https://discourse.julialang.org/u/huaiyuli)
#### Post date: [July 27, 2020, 4:16pm UTC](https://discourse.julialang.org/t/how-to-correctly-install-julia-in-renoir-platform/43756/4 "2020-07-27T16:16:28Z")

</div>

I checked, no problem there and they are normal. Seems it is a problem of OpenBLAS not recognizing the CPU and falling back to Pentium 4 settings. I would hope though this shouldn’t be solved by recompilation like what I did latter.

---

<div class="post-metadata">

### Author: ![jebej](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jebej/32/1784_2.png) [@jebej](https://discourse.julialang.org/u/jebej)
#### Post date: [July 27, 2020, 9:35pm UTC](https://discourse.julialang.org/t/how-to-correctly-install-julia-in-renoir-platform/43756/5 "2020-07-27T21:35:44Z")

</div>

I am also having the same issue on a Ryzen 7 4700U.

---

<div class="post-metadata">

### Author: ![jebej](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jebej/32/1784_2.png) [@jebej](https://discourse.julialang.org/u/jebej)
#### Post date: [July 28, 2020, 1:29pm UTC](https://discourse.julialang.org/t/how-to-correctly-install-julia-in-renoir-platform/43756/6 "2020-07-28T13:29:44Z")

</div>

I made an issue to track this: [https://github.com/JuliaLang/julia/issues/36826](https://github.com/JuliaLang/julia/issues/36826)

---

<div class="post-metadata">

### Author: ![jebej](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jebej/32/1784_2.png) [@jebej](https://discourse.julialang.org/u/jebej)
#### Post date: [July 30, 2020, 8:20pm UTC](https://discourse.julialang.org/t/how-to-correctly-install-julia-in-renoir-platform/43756/7 "2020-07-30T20:20:49Z")

</div>

To follow up, a patch was merged for LLVM to detect Renoir as `znver2` which will be in 1.6.

For OpenBLAS, a patch was also merged, but in the meantime the architecture can be selected with an environment variable: `OPENBLAS_CORETYPE=ZEN`.

```julia
julia> LinearAlgebra.versioninfo()
BLAS: libopenblas (OpenBLAS 0.3.5 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Zen MAX_THREADS=32)
LAPACK: libopenblas64_

```
