# How to find details of the compiler and optimizations used by a specific installed version of Julia

**URL:** <https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501>\
**Category:** Performance\
**Created:** [January 31, 2022, 12:42pm UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501 "2022-01-31T12:42:31Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidB](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@DavidB](https://discourse.julialang.org/u/DavidB)\
**Post date:** [January 31, 2022, 12:42pm UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/1 "2022-01-31T12:42:31Z")

</div>

I’ve noticed that there is a performance significant difference in the execution of a Julia application between “bare metal” and within a container, but only on one specific platform. So want to see if there was a difference in the underlying compiler or optimizations used between the Julia version installed on the “bare metal” and inside the container.

Is there a way of displaying these details of the compiler and optimizations used in Julia?

---

<div class="post-metadata">

**Author:** ![lawless-m](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lawless-m/32/30869_2.png) [@lawless-m](https://discourse.julialang.org/u/lawless-m)\
**Post date:** [January 31, 2022, 3:22pm UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/2 "2022-01-31T15:22:25Z")

</div>

There’s this

`versioninfo(verbose=true)`

but that might only get you so far

---

<div class="post-metadata">

**Author:** ![lawless-m](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lawless-m/32/30869_2.png) [@lawless-m](https://discourse.julialang.org/u/lawless-m)\
**Post date:** [January 31, 2022, 3:25pm UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/3 "2022-01-31T15:25:31Z")

</div>

maybe `ldd /PATH_TO/julia-1.7.0/lib/libjulia.so` might shed light

---

<div class="post-metadata">

**Author:** ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Post date:** [January 31, 2022, 4:41pm UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/4 "2022-01-31T16:41:07Z")

</div>

> [@DavidB](#):
>
> the Julia version installed on the “bare metal” and inside the container.

You can find the docker-library Julia images `Dockerfiles` ( alpine, debian; windows ):

- here: → [https://github.com/docker-library/julia/tree/master/1.7](https://github.com/docker-library/julia/tree/master/1.7)

The alpine based container is “musl” based - and maybe it has a different performance than the glibc- based. ( `julia-1.7.1-musl-x86_64.tar.gz` )

And has [a different support level](https://julialang.org/downloads/#supported_platforms):

- Linux (Glibc) - is “Tier 1”
- Linux (Musl) - is “Tier 3”

So the Debian based “Julia” container ( == `Glibc` ; `Tier 1` ) is preferred for the “end users”

As I know no performance difference on Linux with native vs. container performance .  
but on MacOS and Windows … there is a known performance difference.

---

<div class="post-metadata">

**Author:** ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Post date:** [January 31, 2022, 4:42pm UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/5 "2022-01-31T16:42:45Z")

</div>

> [@DavidB](#):
>
> I’ve noticed that there is a performance significant difference in the execution of a Julia application between “bare metal” and within a container, but only on one specific platform

Please give more information.

---

<div class="post-metadata">

**Author:** ![DavidB](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@DavidB](https://discourse.julialang.org/u/DavidB)\
**Post date:** [February 1, 2022, 10:20am UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/6 "2022-02-01T10:20:18Z")

</div>

The execution only time for the container is slower than the are metal (host) execution time.  
The vector instruction execution (operational intensity) is significantly worse for the container version.

The platform processor is a Fujitsu Arm A64FX.  
OS is SLES15 Linux  
Profiling was done with LIKWID

Bare metal (host) execution time:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/9/49b1a0b133022d064c2fca37ce4754bf3fd33305.png)

---

<div class="post-metadata">

**Author:** ![DavidB](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@DavidB](https://discourse.julialang.org/u/DavidB)\
**Post date:** [February 1, 2022, 10:21am UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/7 "2022-02-01T10:21:03Z")

</div>

Container execution time:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/c/6c061d045270a7f24fbeec2e1582e52544b6576c.png)

---

<div class="post-metadata">

**Author:** ![DavidB](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@DavidB](https://discourse.julialang.org/u/DavidB)\
**Post date:** [February 1, 2022, 10:21am UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/8 "2022-02-01T10:21:36Z")

</div>

Bare metal (host) profiling:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/0/b/0b33d53b7411934cb4321e9022e0b5973329bd4e.png)

---

<div class="post-metadata">

**Author:** ![DavidB](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@DavidB](https://discourse.julialang.org/u/DavidB)\
**Post date:** [February 1, 2022, 10:22am UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/9 "2022-02-01T10:22:34Z")

</div>

Container profiling:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/4/241917121b1049290b48e382581aff069acf63f3.png)

---

<div class="post-metadata">

**Author:** ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Post date:** [February 1, 2022, 2:06pm UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/10 "2022-02-01T14:06:37Z")

</div>

> [@DavidB](#):
>
> The vector instruction execution (operational intensity) is significantly worse for the container version.
> 
> The platform processor is a Fujitsu Arm A64FX.

As I see - only in the [OpenBLAS v0.3.19 contains A64FX optimization.](https://github.com/xianyi/OpenBLAS/releases) - and not yet in Julia …

- `added basic support and cputype detection for Fujitsu A64FX`
- `added SVE-enabled SGEMM and DGEMM kernels for ARMV8SVE and A64FX`

And check the [A64FX related julia issues](https://github.com/JuliaLang/julia/search?q=A64FX&type=issues)

> [@DavidB](#):
>
> OS is SLES15 Linux

Please give more information:

- minimal Dockerfile ?
- Julia version ?
  - test [Julia “Nightly builds”](https://julialang.org/downloads/nightlies/)

- Source of julia image ?
  - optimized A64FX native build ?
  - or downloaded from [Download Julia](https://julialang.org/downloads/) as a “Generic Linux on ARM - AARch64” )

other ideas:

- If you are using the official Debian-based docker image
  - try to create SLES15 based docker images manually.

- [For A64FX](https://www.phoronix.com/scan.php?page=news_item&px=Fujitsu-A64FX-Better-Compiler) try ` -mcpu=a64fx`
  - or `-mtune=a64fx -mcpu=a64fx -march=armv8.2-a+sve`

- The SLE15 based dockerfile should start with
  - `FROM registry.suse.com/suse/sle15:latest`

- you can start julia with `--cpu-target` ( check: `julia --cpu-target help` )
- you can recompile/optimize the julia image for a64FX with [PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl)

---

<div class="post-metadata">

**Author:** ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Post date:** [February 1, 2022, 3:45pm UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/11 "2022-02-01T15:45:36Z")

</div>

> [@DavidB](#):
>
> Is there a way of displaying these details of the compiler and optimizations used in Julia?

check/compare the `Base.JLOptions()` results.

---

<div class="post-metadata">

**Author:** ![DavidB](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@DavidB](https://discourse.julialang.org/u/DavidB)\
**Post date:** [February 9, 2022, 11:23am UTC](https://discourse.julialang.org/t/how-to-find-details-of-the-compiler-and-optimizations-used-by-a-specific-installed-version-of-julia/75501/12 "2022-02-09T11:23:28Z")

</div>

Sorry for the delay:

I will try the A64FX options -mtune=a64fx -mcpu=a64fx -march=armv8.2-a+sve

Host Julia version:  
Version 1.6.2 (2021-07-14)

Dockerfile:  
FROM julia:1.6.2

RUN apt-get update -qq && apt-get install -y -qq gcc wget git apt-utils build-essential make locate

#run mkdir /QXContexts  
#ADD . /QXContexts/

RUN git clone [GitHub - JuliaQX/QXContexts.jl: Julia package for performing tensor contractions on distributed machines](https://github.com/JuliaQX/QXContexts.jl.git) /QXContexts  
WORKDIR /QXContexts

ENV JULIA\_DEPOT\_PATH /opt/julia

RUN julia --project=. -e ‘using Pkg; Pkg.instantiate();’

RUN julia --project=. -e ‘using Pkg; Pkg.add(“FileIO”); Pkg.add(“ArgParse”); Pkg.add(“TimerOutputs”);’

RUN julia --project=. -e ‘using Pkg; Pkg.build(“QXContexts”);’

# run tests to verify they are working and to precompile

RUN julia --project=. examples/rqc\_example.jl  
CMD [“julia”, “–project=/QXContexts”]
