Guidelines to Set Up Julia#
Here we focus only on setting up the environment for Julia tutorials on OSS and p-cluster.
For more general information about Julia, please take a look at the main docs and https://julialang.org.
1. Install Julia#
The standard method to install julia in a linux environment is as follows, from a terminal window :
curl -fsSL https://install.julialang.org | sh
1.1 OSS#
To be able to use the latest versions of packages :
git clone https://github.com/ECCO-Hackweek/ecco-2024
source ecco-2024/book/tutorials/Julia_ECCO_and_more/setenv_julia.csh
note: this will by-pass the Julia verison pre-installed in /opt/julia-1.10.5/bin/julia
1.2 p-cluster#
To activate the change in your current session :
. ~/.bashrc
2. Install Linux Modules#
To enable parallel MITgcm runs on the p-cluster, for Julia tutorials, download and run setup_modules.csh :
git clone https://github.com/ECCO-Hackweek/ecco-2024
source ecco-2024/book/tutorials/Julia_ECCO_and_more/setup_modules.csh
3. Install Julia Packages#
Start julia, by running the
julia
in the terminal window on p-cluster or OSS.Or open a notebook on the OSS and setting the kernel to
Julia 1.11.0
.
Then, you should be able to add and test any package as shown below. In this example, we use the Julia package manager, Pkg.jl. In this example, we try out the IJulia.jl, the jupyter kernel for Julia.
using Pkg
Pkg.add("IJulia")
Pkg.test("IJulia")
Resolving package versions...
No Changes to `~/.julia/environments/v1.10/Project.toml`
No Changes to `~/.julia/environments/v1.10/Manifest.toml`
Testing IJulia
Status `/private/var/folders/vn/3r695jqd3177cw09wdmf3z940000gn/T/jl_CJsVTO/Project.toml`
[8f4d0f93] Conda v1.10.2
[7073ff75] IJulia v1.25.0
[682c06a0] JSON v0.21.4
[739be429] MbedTLS v1.1.9
[b85f4697] SoftGlobalScope v1.1.0
[c2297ded] ZMQ v1.3.0
[2a0f44e3] Base64
[ade2ca70] Dates
[b77e0a4c] InteractiveUtils
[8f399da3] Libdl
[56ddb016] Logging
[d6f4376e] Markdown
[44cfe95a] Pkg v1.10.0
[de0858da] Printf
[3fa0cd96] REPL
[9a3f8284] Random
[8dfed614] Test
[cf7118a7] UUIDs
Status `/private/var/folders/vn/3r695jqd3177cw09wdmf3z940000gn/T/jl_CJsVTO/Manifest.toml`
[8f4d0f93] Conda v1.10.2
[7073ff75] IJulia v1.25.0
[692b3bcd] JLLWrappers v1.6.0
[682c06a0] JSON v0.21.4
[739be429] MbedTLS v1.1.9
[69de0a69] Parsers v2.8.1
[aea7be01] PrecompileTools v1.2.1
[21216c6a] Preferences v1.4.3
[b85f4697] SoftGlobalScope v1.1.0
[81def892] VersionParsing v1.3.0
[c2297ded] ZMQ v1.3.0
[8f1865be] ZeroMQ_jll v4.3.5+0
[a9144af2] libsodium_jll v1.0.20+1
[0dad84c5] ArgTools v1.1.1
[56f22d72] Artifacts
[2a0f44e3] Base64
[ade2ca70] Dates
[f43a241f] Downloads v1.6.0
[7b1f6079] FileWatching
[b77e0a4c] InteractiveUtils
[b27032c2] LibCURL v0.6.4
[76f85450] LibGit2
[8f399da3] Libdl
[56ddb016] Logging
[d6f4376e] Markdown
[a63ad114] Mmap
[ca575930] NetworkOptions v1.2.0
[44cfe95a] Pkg v1.10.0
[de0858da] Printf
[3fa0cd96] REPL
[9a3f8284] Random
[ea8e919c] SHA v0.7.0
[9e88b42a] Serialization
[6462fe0b] Sockets
[fa267f1f] TOML v1.0.3
[a4e569a6] Tar v1.10.0
[8dfed614] Test
[cf7118a7] UUIDs
[4ec0a83e] Unicode
[deac9b47] LibCURL_jll v8.4.0+0
[e37daf67] LibGit2_jll v1.6.4+0
[29816b5a] LibSSH2_jll v1.11.0+1
[c8ffd9c3] MbedTLS_jll v2.28.2+1
[14a3606d] MozillaCACerts_jll v2023.1.10
[83775a58] Zlib_jll v1.2.13+1
[8e850ede] nghttp2_jll v1.52.0+1
[3f19e933] p7zip_jll v17.4.0+2
Precompiling project...
✓ SoftGlobalScope
✓ ZeroMQ_jll
✓ ZMQ
✓ IJulia
4 dependencies successfully precompiled in 3 seconds. 11 already precompiled.
Testing Running tests...
install.jl
[ Info: Installing ijuliatest kernelspec in /Users/gaelforget/Library/Jupyter/kernels/Yef1rLr4kXKxq9rbEh3m-1.10
[ Info: Installing ahzAHZ019.-_ ~!@#%^&*() kernelspec in /Users/gaelforget/Library/Jupyter/kernels/ahzahz019.-_-__________-1.10
Test Summary: | Pass Total Time
installkernel | 10 10 0.3s
comm.jl
Test Summary: | Pass Total Time
comm | 5 5 0.3s
msg.jl
Test Summary: | Pass Total Time
msg | 2 2 0.1s
execute_request.jl
Test Summary: | Pass Total Time
errors | 1 1 0.3s
Test Summary: | Pass Total Time
docdict | 2 2 0.5s
Test Summary: | Pass Total Time
Custom MIME types | 5 5 0.3s
Test Summary: | Pass Total Time
Render 1st available MIME in MIME-vector. | 5 5 0.1s
stdio.jl
Test Summary: | Pass Total Time
stdio | 2 2 0.1s
inline.jl
Test Summary: | Pass Total Time
Custom Jupyter inline display | 2 2 0.0s
Testing IJulia tests passed