Difference between revisions of "Julia"

From ArchWiki
Jump to navigation Jump to search
m (Previous link returned 404, current stable is 1.0 but as that may change, latest is the best option for routing to docs.)
m (I have deleted this section as installing the latest version of julia: v1.3.0 from the official repositories with `sudo pacman -S julia` no longer causes this Arpack build error.)
 
(3 intermediate revisions by 3 users not shown)
Line 14: Line 14:
  
 
If attempting to install [https://github.com/JuliaLang/IJulia.jl ijulia] by running {{ic|Pkg.add("IJulia")}} gives the warning {{ic|MbedTLS had build errors.}} you might need to install the {{Pkg|mbedtls}} package.
 
If attempting to install [https://github.com/JuliaLang/IJulia.jl ijulia] by running {{ic|Pkg.add("IJulia")}} gives the warning {{ic|MbedTLS had build errors.}} you might need to install the {{Pkg|mbedtls}} package.
 
== Package build errors ==
 
 
=== Arpack ===
 
 
Building the Arpack package can result in an error like shown below (stacktrace omitted):
 
 
{{hc|julia> Pkg.build("Arpack")|
 
  Building Arpack → `~/.julia/packages/Arpack/UiiMc/deps/build.log`
 
┌ Error: Error building `Arpack`:
 
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(~/.julia/packages/Arpack/UiiMc/deps/usr)") is not satisfied, cannot generate deps.jl!}}
 
 
[https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5 An issue has been filed].
 
 
Arpack packages its own {{ic|libarpack.so}} that requires the DSO {{ic|libopenblas64_.so.0}} to be present on the system:
 
 
{{hc|$ ldd ~/.julia/packages/Arpack/UiiMc/deps/usr/lib/libarpack.so {{!}} grep 'not found'|<nowiki>        libopenblas64_.so.0 => not found</nowiki>}}
 
 
The {{ic|UiiMc}} part of the path may be different on your system. As shown, the required DSO is not present on the system, causing the build error. A [https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5#issuecomment-437869878 workaround] to this problem is to create a symbolic link to the DSO file provided by the {{Pkg|openblas}} package, i.e.
 
 
# ln -s /usr/lib/libopenblas.so /usr/lib/libopenblas64_.so.0
 
 
and then rebuild the Arpack package in Julia. However, it is in unclear whether the DSO {{ic|/usr/lib/libopenblas.so}} from the package {{Pkg|openblas}} can function as a stable drop-in replacement, since [https://github.com/xianyi/OpenBLAS/issues/1763 the 64 suffix seems to be used to indicate a difference in interface] and [http://numpy-discussion.10968.n7.nabble.com/Linking-Numpy-with-parallel-OpenBLAS-td41590.html the 64 suffix does indicate a different version rather than a difference in target architecture].
 
  
 
== Integration with editors ==
 
== Integration with editors ==

Latest revision as of 15:01, 11 December 2019

Note: https://julialang.org/ has beautiful and open-source documentation, non-Arch-specific information should be contributed there.

Julia is a high-level, high-performance dynamic programming language for numerical computing. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library.

Installation

Install the julia package. To learn and use Julia, please read upstream documents.

IJulia

If attempting to install ijulia by running Pkg.add("IJulia") gives the warning MbedTLS had build errors. you might need to install the mbedtls package.

Integration with editors

Vim

Syntax highlighting and more

julia-vim

Linting

The julialint plugin combined with the Lint.jl package can provide linting.

Performance

It is recommended that you use a multithreaded BLAS implementation, such as openblas. This can lead to speedups of 10-50x for certain matrix operations.