Difference between revisions of "Julia"

From ArchWiki
Jump to navigation Jump to search
(A section for package build errors was added, because a package build error was encountered and I wished for such a section to exist during researching the issue.The result of the research)
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.)
 
(8 intermediate revisions by 6 users not shown)
Line 9: Line 9:
 
== Installation ==
 
== Installation ==
  
[[Install]] the {{Pkg|julia}} package. To learn and use Julia, please read [https://docs.julialang.org/en/stable/ upstream documents].
+
[[Install]] the {{Pkg|julia}} package. To learn and use Julia, please read [https://docs.julialang.org/en/latest/ upstream documents].
  
 
== IJulia ==
 
== IJulia ==
  
 
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 ~/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.
 
 
The DSO {{ic|/usr/lib/libopenblas.so}} from the package {{Pkg|openblas}} probably cannot function stably as 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.