Skip to content

Julia

Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library.

Software modules on Grace

Versions:
    Julia/1.5.3-linux-x86_64
    Julia/1.6.1-linux-x86_64
    Julia/1.9.3-linux-x86_64

If you choose to use the -linux binariy versions you will need to set your JULIA_DEPOT_PATH to $SCRATCH/.julia before you run Julia for the first time to install Julia packages under your scratch space. Since the default installation path (~/.julia) will quickly use up your file quota, which could be checked with showquota.

 export JULIA_DEPOT_PATH=$SCRATCH/.julia

Using Pre-installed Julia on Grace

On Grace, a given Julia module can be loaded with the 'module load' command.

For example, to load the Julia module version Julia/1.9.3-linux-x86_64 use the following command:

module load Julia/1.9.3-linux-x86_64

To run Julia from the command line, do:

julia

To run code non-interactively, do:

julia script.jl arg1 arg2

Julia Packages

Julia 1.9.3

To add Julia packages, please make sure that JULIA_DEPOT_PATH has been set to a directory under $SCRATCH. E.g.,

export JULIA_DEPOT_PATH=$SCRATCH/.julia

1. Load the Julia module

module load  Julia/1.9.3-linux-x86_64

2. Open the Julia REPL

julia

you will see the julia prompt which looks like this:

julia>

3. Type ] to open the Pkg REPL

]

you will see the Pkg prompt which looks like this:

(@v1.5) pkg>

4. add your package (Plots in this example will add more than 10,000 files to your $SCRATCH/.julia directory)

(@v1.5) pkg> add Plots

5. type backspace to return to the julia REPL from the Pkg REPL

Julia_tamu

The Julia_tamu module directory provides a shared directory for packages. Users do not have permission to install packages into this directory but can request packages installed.

Julia_tamu just loads Julia which has RCall installed for using R in julia code.

To install packages into your own $SCRATCH directory, you will need to the following:

  • Request a file quota increase for your $SCRATCH directory if needed.

    • Initializing your $SCRATCH julia package directory and installing a few julia packages can create 50,000+ files.
  • Change the JULIA_DEPOT_PATH environment variable after loading the Julia module and prior to starting julia.

    • The Julia_tamu module currently loads Julia which contains R and some other packages.
Back to top