Installing ClimateMachine

Install Julia

The Climate Machine (CLIMA) uses the Julia programming language and has been tested for the latest Julia release version 1.5, which can be downloaded via your package manager or from the Julia website.

Install MPI (optional)

The ClimateMachine uses the Message Passing Interface (MPI) for distributed processing via the MPI.jl package. This package downloads and installs an MPI implementation for your platform. However, on high-performance computing systems, you will probably want to configure this package to use the system-provided MPI implementation. You can do so by setting the environment variable JULIA_MPI_BINARY=system.

Install MPI.jl in Julia using the built-in package manager (press ] at the Julia prompt):

julia> ]
(v1.5) pkg> add MPI

The package should be installed and built without errors. You can verify that all is well with:

julia> ]
(v1.5) pkg> test MPI

If you are having problems, see the MPI.jl documentation for help.

Install the ClimateMachine

Download the ClimateMachine source (you will need Git):

$ git clone https://github.com/CliMA/ClimateMachine.jl

Now change into the ClimateMachine.jl directory with

$ cd ClimateMachine.jl

and install all the required packages with:

$ julia --project -e 'using Pkg; pkg"instantiate"; pkg"build MPI"'

Pre-compile the packages to allow the ClimateMachine to start faster:

$ julia --project -e 'using Pkg; pkg"precompile"'

You can verify your installation with:

$ julia --project test/runtests.jl

This will take a while!

You are now ready to run one of the tutorials. For instance, the dry Rayleigh Benard tutorial:

$ julia --project tutorials/Atmos/dry_rayleigh_benard.jl

The ClimateMachine is CUDA-enabled and will use GPU(s) if available. To run on the CPU, set the environment variable CLIMATEMACHINE_SETTINGS_DISABLE_GPU to true. This can either be done inline with the Julia launch command using

CLIMATEMACHINE_SETTINGS_DISABLE_GPU=true julia --project

or for the whole shell session, for example with bash this would be

export CLIMATEMACHINE_SETTINGS_DISABLE_GPU=true