JUSTUS2/Software/Julia: Difference between revisions
M Carmesin (talk | contribs) |
M Carmesin (talk | contribs) |
||
Line 71: | Line 71: | ||
== Tips & Tricks == |
== Tips & Tricks == |
||
* [[Parallel_Programming]] |
* [[JUSTUS2/Software/Julia/Parallel_Programming|Parallel Programming]] |
Revision as of 14:26, 5 November 2024
The main documentation is available via |
Description | Content |
---|---|
module load | math/julia |
Availability | bwUniCluster | JUSTUS2 |
License | MIT License |
Citing | [1] |
Links | Project homepage | Documentation |
Graphical Interface | No |
Introduction
Julia is a high-level, high-performance, dynamic programming language, being designed with scientific computing in mind. Parallel programming features, such as multi-threading are included in the core language, while there also exit packages leveraging the power of MPI and CUDA.
There are no packages preinstalled besides the Julia language core, please use the Julia package manager to install any required Julia package.
The Julia module on Justus loads suitable versions of CUDA and OpenMPI and the corresponding Julia packages CUDA.jl and MPI.jl will be automatically configured to use these libraries after being installed by the user. Any changes, either by loading modules with different MPI and/ or CUDA versions as well as using the ones that come as Julia artifacts are likely to lead to errors.
Interactive Example
Load Julia module and start interactive REPL session with 8 threads, using the environment in the current directory:
$ module load math/julia $ julia -t 8 --project=.
Enter ']' to go into package manager and install package UnicodePlots
.
add UnicodePlots
Leave the package manager with the backspace key.
Create a vector with 64 elements set to 0 and fill it using all 8 threads with the corresponding tread id number.
vec = zeros(64) Threads.@threads for i in eachindex(vec) vec[i]= Threads.threadid() end
Load the UnicodePlots
package and draw a scatter plot of the contents of vec
using UnicodePlots scatterplot(vec)
Further documentation
- Julia Workshop at HLRS: The material of this workshop is in large parts also valid for the Justus cluster (on Justus you only need the module math/julia).