Skip to content

Installation

Mathias Louboutin edited this page Jan 5, 2022 · 7 revisions

Standard installation

JUDI is registered in Julia's General registry and can be installed with the standard command (]):

pkg> add JUDI

or from the command line

julia -e 'using Pkg;Pkg.add("JUDI")'

And you can replace add by dev/develop if you wish to use JUDI in development mode. By default, JUDI will install Devito using julia's PyCall by itself. However, the compiler you wish to use (gcc/icc/nvc/....) based on the Dvito configuration are up to the user to install. You can find a list of the possible configurations HERE.

Custom Devito installation

Some users may decide to have their own Devito (and in general python) setup to allow more control. In this case, you will need to point julia to your PYTHON installation and re-build the necessary packages.

Once Devito is installed (you can follow the installation instructions HERE and we recommend a standard pip installation for julai compatibility), define the PYTHON environment variable so that Julia knows where to find the python packages such as Devito and its dependencies.

export PYTHON=$(which python) # or $(which python3) 

Once this is set, you can rebuild PyCall to point to your python:

pkg> build PyCall

or from the command line

julia -e 'using Pkg;Pkg.build("PyCall")

Dependencies

Some of the examples use additional packages for setup and IO. You can either install these package by hand when missing, or you can run the following julia script to install examples related packages:

julia PATH/TO/JUDI/deps/install_global.jl

Test installation

Once installed, you can test your installation by running some tests. If you installed only JUDI and did not install the dependencies individually, you will have to run all examples/tests/experiments using JUDI within the JUDI environment julia --project (inside the JUDI directory) or julia --project=path_to_JUDI from another directory. If you installed the dependencies you can run everything with the basic julia command julia script.jl.

You can run the standard JUDI (julia objects only, no Devito):

 GROUP="JUDI" julia test/runtests.jl  # or GROUP="JUDI" julia --project test/runtests.jl

or the isotropic acoustic operators' tests (with Devito):

 GROUP="ISO_OP" julia test/runtests.jl  # or GROUP="ISO_OP" julia --project test/runtests.jl
Clone this wiki locally