# Julia In SWAN

**URL:** <https://swan-community.web.cern.ch/t/julia-in-swan/442>\
**Category:** Uncategorized\
**Created:** [June 10, 2021, 1:49pm UTC](https://swan-community.web.cern.ch/t/julia-in-swan/442 "2021-06-10T13:49:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mato](https://swan-community.web.cern.ch/user_avatar/swan-community.web.cern.ch/mato/32/14_2.png) [@mato](https://swan-community.web.cern.ch/u/mato)\
**Post date:** [June 10, 2021, 1:49pm UTC](https://swan-community.web.cern.ch/t/julia-in-swan/442/1 "2021-06-10T13:49:08Z")

</div>

Dear Julia enthusiasts,

With the introduction of the LCG\_100 stack, Julia version 1.6.0 is now available in SWAN. However, the Jupyter kernel that allows you to create Julia notebooks is not directly available. The user needs to install the Julia kernel and required packages on his/her EOS home directory. This is done by executing the following commands in a SWAN terminal:

```auto
julia -e 'import Pkg; Pkg.add("IJulia")'
julia -e 'using IJulia; installkernel("julia", env=merge(Dict("JULIA_NUM_THREADS"=>"4"), Dict(ENV)))'

```

Files will be placed in `$SWAN_HOME/.local/share/jupyter` and `$SWAN_HOME/.julia`. The execution of this commands is needed to be done only once (as long as the version of Julia is non changing). Additional ‘imported’ packages by the user will also be placed in ` $SWAN_HOME/.julia` and survive across sessions.

---

<div class="post-metadata">

**Author:** ![jling](https://swan-community.web.cern.ch/user_avatar/swan-community.web.cern.ch/jling/32/171_2.png) [@jling](https://swan-community.web.cern.ch/u/jling)\
**Post date:** [June 19, 2021, 5:15pm UTC](https://swan-community.web.cern.ch/t/julia-in-swan/442/2 "2021-06-19T17:15:24Z")

</div>

need

```auto
export JUPYTER_DATA_DIR=$HOME/.local/share/jupyter

```

btw, or `IJulia` won’t pass `Pkg.build()` step

---

<div class="post-metadata">

**Author:** ![mato](https://swan-community.web.cern.ch/user_avatar/swan-community.web.cern.ch/mato/32/14_2.png) [@mato](https://swan-community.web.cern.ch/u/mato)\
**Post date:** [June 21, 2021, 6:28am UTC](https://swan-community.web.cern.ch/t/julia-in-swan/442/3 "2021-06-21T06:28:09Z")

</div>

Thanks! The correct full instructions are:

```auto
export JUPYTER_DATA_DIR=$HOME/.local/share/jupyter
julia -e 'import Pkg; Pkg.add("IJulia")'
julia -e 'using IJulia; installkernel("julia", env=merge(Dict("JULIA_NUM_THREADS"=>"4"), Dict(ENV)))'

```

---

<div class="post-metadata">

**Author:** ![jling](https://swan-community.web.cern.ch/user_avatar/swan-community.web.cern.ch/jling/32/171_2.png) [@jling](https://swan-community.web.cern.ch/u/jling)\
**Post date:** [December 1, 2021, 2:29am UTC](https://swan-community.web.cern.ch/t/julia-in-swan/442/4 "2021-12-01T02:29:13Z")

</div>

> **[Julia 1.7 Highlights](https://julialang.org/blog/2021/11/julia-1.7-highlights/)**
>
> Some highlights of the Julia 1.7 release.

the most relevant part is:

> [Improved performance for handling registries on Windows and distributed file systems](https://julialang.org/blog/2021/11/julia-1.7-highlights/#improved_performance_for_handling_registries_on_windows_and_distributed_file_systems)

> Instead of using a thread pool to speed up closing files, we decided to take a different route. Julia comes bundled with [p7zip](http://p7zip.sourceforge.net/) and together with the standard library [`Tar.jl`](https://github.com/JuliaIO/Tar.jl) it is possible to directly read the compressed tarball into memory without materializing any files at all. By doing so the problem of materializing files is obliviated which significantly improves the performance of the registry on Windows, NFS and other distributed file systems like those typically used in HPC systems.

this should significantly improve performance on SWAN, which previously suffers from dealing with many-large-small files for the Julia registry.
