Using Julia on the SCF

Using Julia on the SCF

We provide Julia, including a variety of packages. To use the current version, do

module load julia


Julia packages provided by the system

To see what Julia packages are installed on the system, you can run

ls /usr/local/linux/julia-${JULIA_VERSION}/share/julia/packages

To see what Julia packages are directly available for loading (via `using` or `import`) through our system project, you can run

cat /usr/local/linux/julia-${JULIA_VERSION}/share/julia/environments/v<insert_julia_major_minor_version>/Project.toml

We're happy to install additional packages system-wide, particularly if they seem like they would be useful to multiple people. Just email us.

For Julia 1.6.6, for packages not available through the system project (see above), you need to add the packages to your Julia project (which might simply be the default project in ~/.julia/environments/v1.6) using `Pkg.add` as described below. Packages installed on the system won't be reinstalled (unless there is a newer version available than the one we installed); they'll simply be associated with your project. In Julia 1.4.1, you can directly use the packages we provide.

Install Julia packages into your account

(Note that for this to work, you need to have your active project be owned by you. Otherwise (in particular if you don't have a default project in ~/.julia/environments/julia/1.6), Julia will try to modify system files and you'll get a permission denied error. You can use `Pkg.activate()` to create a project in a directory you own.)

You can also install additional packages into your own account. E.g., to install Gaussian mixtures, simply do this in Julia:

using Pkg
using GaussianMixtures

By running the 'using' command immediately, Julia will precompile the package.

Note that if the current version of GaussianMixtures were already installed at the system level, Julia won't reinstall it, but will simply make the system-installed package available in your current project.


You can use Linux environment modules to switch between different Julia versions. This can be done on a one-time basis in a given terminal session or cluster submission script, or can be done in your .bashrc (after the stanza involving ~skel/std.bashrc) to set a default different than the system default. 

To switch from Julia 1.4.1 to Julia 1.6.6:

module switch julia/1.4.1 julia/1.6.6

To see what Julia is being used:

module list