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 MPIThe package should be installed and built without errors. You can verify that all is well with:
julia> ]
(v1.5) pkg> test MPIIf 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.jlNow change into the ClimateMachine.jl directory with
$ cd ClimateMachine.jland 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.jlThis 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.jlThe 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 --projector for the whole shell session, for example with bash this would be
export CLIMATEMACHINE_SETTINGS_DISABLE_GPU=true