-
Notifications
You must be signed in to change notification settings - Fork 32
Installation
First, install Devito using pip
, or see the Devito's GitHub page for installation with Conda and further information. The current release of JUDI requires Python 3 and the current Devito version. Run all of the following commands from the (bash) terminal command line (not in the Julia REPL). First, check that you are indeed using python 3. On some systems, it may be called python3
instead of python
(and pip3
instead of pip
).
pip install --user devito matplotlib # or `pip3 install --user devito matplotlib`
Once Devito is installed, 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)
For reading and writing seismic SEG-Y data, JUDI uses the SegyIO package and matrix-free linear operators are based the Julia Operator LIbrary (JOLI). These packages are all contained in the slimgroup
Julia package registry SLIMregistryJL that contains JUDI as well. To add the registry run:
julia -e 'using Pkg; Pkg.add("Pkg")'
julia -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url="https://github.com/slimgroup/SLIMregistryJL.git"))'
The Pkg.add("Pkg")
is mandatory on a new Julia setup to force the package manager to trigger the Julia General registry, you will most likely have errors in the following step without it as the generic packages will not be found.
With Devito installed and the extra packages registered, you can simply install JUDI via:
julia -e 'using Pkg; Pkg.develop("JUDI")'
And you will have JUDI and all its dependencies installed. Remember that, due to Julia package management, all dependencies are only available within the JUDI environment (julia --project
) and not globally as an individual package. You will need to install every package that you want to use individually separately. You can install all dependencies at once globally running the utility script in the JUDI directory:
cd ~/.julia/dev/JUDI
julia deps/install_global.jl
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