Difference between revisions of "Julia 2016"
Schwietzer (talk | contribs) |
Schwietzer (talk | contribs) |
||
Line 30: | Line 30: | ||
You can add a package by using the ''add'' command: | You can add a package by using the ''add'' command: | ||
add example example2 # you can add multiple packages at once | add example example2 # you can add multiple packages at once | ||
The packages will be installed into your $HOME directory at ~/.julia/packages | |||
The same applies to removing packages with the ''rm'' command and updating packages with ''update'': | The same applies to removing packages with the ''rm'' command and updating packages with ''update'': | ||
rm example | rm example | ||
update example2 | update example2 | ||
Within Pkg, you can type in '''?''' to get an overview about the commands available. | |||
== Adding and using GR == | == Adding and using GR == | ||
For Julia, you can install GR, a universal framework for cross-platform visualization applications. | For Julia, you can install GR, a universal framework for cross-platform visualization applications. <br/> | ||
Before doing that, '''you must have established an SSh connection with X11 Forwarding to our cluster'''. | |||
This can be done by adding the option '''-X''' to our SSH connection: | |||
''ssh abcd1234@carl.hpc.uni-oldenburg.de -X'' | |||
Now, you can follow the steps shown above at the section ''Adding packages'' to add GR: | |||
<span style="color:#99FF44">julia> </span> ] | |||
<span style="color:#99CCFF">(v1.0) pkg> </span> add GR | |||
Now you can return to Julia (CTRL + C) and start ''using GR'' and maybe add a testing sequence to prove that everything works fine: | |||
<span style="color:#99FF44">julia> </span> using GR | |||
<span style="color:#99FF44">julia> </span> histogram(randn(10000)) | |||
Now you should see a histogram popping up. | |||
== Documentation == | == Documentation == |
Revision as of 14:10, 22 February 2019
Introduction
Julia is a high-level general-purpose dynamic programming language. Julia uses multiple dispatch as a paradigm, making it easy to express many object-oriented and functional programming patterns. The standard library provides asynchronous I/O, process control, logging, profiling, a package manager, and more.
Installed version
The currently installed version is 1.0.1 on the environment hpc-env/6.4.
Using Julia
If you want to find out more about Julia on the HPC Cluster, you can use the command
module spider Julia
This will show you basic informations e.g. a short description and the currently installed version.
To load the desired version, you must load the module as well as the environment:
module load hpc-env/6.4 module load Julia
Adding packages
Julia has a built in package manager.
You can start the package manager Pkg by starting Julia and typing the closed square bracket: ]
julia> ] (v1.0) pkg>
The Terminal will change color and will switch from julia> to (v1.0) pkg>
Now every command you type in controlls Pkg. You can add a package by using the add command:
add example example2 # you can add multiple packages at once
The packages will be installed into your $HOME directory at ~/.julia/packages
The same applies to removing packages with the rm command and updating packages with update:
rm example update example2
Within Pkg, you can type in ? to get an overview about the commands available.
Adding and using GR
For Julia, you can install GR, a universal framework for cross-platform visualization applications.
Before doing that, you must have established an SSh connection with X11 Forwarding to our cluster. This can be done by adding the option -X to our SSH connection:
ssh abcd1234@carl.hpc.uni-oldenburg.de -X
Now, you can follow the steps shown above at the section Adding packages to add GR:
julia> ] (v1.0) pkg> add GR
Now you can return to Julia (CTRL + C) and start using GR and maybe add a testing sequence to prove that everything works fine:
julia> using GR julia> histogram(randn(10000))
Now you should see a histogram popping up.
Documentation
The full documentation about the programming language Lisa can be found here.
Further information are also available on the homepage