-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from slimgroup/refactor-22
Major refactor and cleanup
- Loading branch information
Showing
132 changed files
with
7,103 additions
and
5,039 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# The Julia Devito Inversion framework (JUDI) | ||
|
||
[](https://slimgroup.github.io/JUDI.jl) | ||
[](https://github.com/slimgroup/JUDI.jl/actions/workflows/ci-op.yml) | ||
[](https://doi.org/10.5281/zenodo.3878711) | ||
[](https://codecov.io/gh/slimgroup/JUDI.jl) | ||
| **Documentation** | **Build Status** | | | ||
|:--------------------------------------:|:-----------------------------------------------:|:----------------------------------------------------:| | ||
| [![][docs-stable-img]][docs-stable-status] [![][docs-dev-img]][docs-dev-status] | [![][build-img]][build-status] [![][codecov-img]][codecov-status] [![][aqua-img]][aqua-status] | [![][license-img]][license-status] [![][zenodo-img]][zenodo-status] | | ||
|
||
|
||
## Overview | ||
|
||
|
@@ -52,7 +52,7 @@ export DEVITO_PLATFORM=nvidiaX | |
|
||
## Running with Docker | ||
|
||
If you do not want to install JUDI, you can run [JUDI] as a [docker image](https://hub.docker.com/repository/docker/mloubout/judi). The first possibility is to run the docker container as a Jupyter notebook. [JUDI] provides two docker images for the latest [JUDI] release for Julia versions `1.6` (LTS) and `1.7` (latest stable version). The images names are `mloubout/judi:JVER-latest` where `JVER` is the Julia version. This docker images contains pre-installed compilers for CPUs (gcc 10) and Nvidia GPUs (nvc) vi the nvidia HPC sdk. The environment is automatically set for [Devito] based on the hardware available. | ||
If you do not want to install JUDI, you can run [JUDI] as a [docker image](https://hub.docker.com/repository/docker/mloubout/judi). The first possibility is to run the docker container as a Jupyter notebook. [JUDI] provides two docker images for the latest [JUDI] release for Julia versions `1.6` (LTS) and `1.7` (latest stable version). The images names are `mloubout/judi:JVER-latest` where `JVER` is the Julia version. This docker images contain pre-installed compilers for CPUs (gcc-10) and Nvidia GPUs (nvc) via the nvidia HPC sdk. The environment is automatically set for [Devito] based on the hardware available. | ||
|
||
**Note**: If you wish to use your gpu, you will need to install [nvidia-docker](https://docs.nvidia.com/ai-enterprise/deployment-guide/dg-docker.html) and run `docker run --gpus all` in order to make the GPUs available at runtime from within the image. | ||
|
||
|
@@ -72,8 +72,7 @@ Inside the container, all examples are located in the directory `/app/judi/examp | |
|
||
**Previous versions**: As of version `v2.6.7` of JUDI, we also ship version-tagged images as `mloubout/judi:JVER-ver` where `ver` is the version of [JUDI] wanted, for example the current [JUDI] version with Julia 1.7 is `mloubout/judi:1.7-v2.6.7` | ||
|
||
**Development version**: Additionaly, we provide two images corresponding to the latest development version of [JUDI] (latest state of the master branch). These images are called `mloubout/judi:JVER-dev` and can be used in ta similar way. | ||
|
||
**Development version**: Additionally, we provide two images corresponding to the latest development version of [JUDI] (latest state of the master branch). These images are called `mloubout/judi:JVER-dev` and can be used in a similar way. | ||
|
||
|
||
## Testing | ||
|
@@ -88,12 +87,12 @@ via: | |
By default, only the [JUDI] base API will be tested. However, the testing suite supports other modes controlled via the environment variable `GROUP` such as: | ||
|
||
```Julia | ||
GROUP=[JUDI] Julia --project -e 'using Pkg;Pkg.test(coverage=false)' | ||
GROUP=JUDI Julia --project -e 'using Pkg;Pkg.test(coverage=false)' | ||
``` | ||
|
||
The supported modes are: | ||
|
||
- [JUDI] : Only the base API (linear operators, vectors, ...) | ||
- JUDI : Only the base API (linear operators, vectors, ...) | ||
- BASICS: Generic modeling and inversion tests such as out of core behavior | ||
- ISO_OP : Isotropic acoustic operators | ||
- ISO_OP_FS : Isotropic acoustic operators with free surface | ||
|
@@ -230,7 +229,7 @@ To speed up the convergence of our imaging example, we set up a basic preconditi | |
```Julia | ||
# Set up matrix-free linear operators | ||
opt = Options(optimal_checkpointing = true) # set to false to disable optimal checkpointing | ||
F = judiModeling(info, model0, q.geometry, dD.geometry; options=opt) | ||
F = judiModeling(model0, q.geometry, dD.geometry; options=opt) | ||
J = judiJacobian(F, q) | ||
|
||
# Right-hand preconditioners (model topmute) | ||
|
@@ -313,8 +312,26 @@ eprint = {https://doi.org/10.1190/geo2018-0174.1} | |
|
||
Also visit the Devito homepage at <https://www.devitoproject.org/publications> for more information and references. | ||
|
||
Contact authors via: [email protected] and [email protected]. | ||
Contact authors via: [email protected]. | ||
|
||
|
||
[docs-stable-img]:https://img.shields.io/badge/docs-stable-blue.svg | ||
[docs-stable-status]:https://slimgroup.github.io/JUDI.jl | ||
|
||
[docs-dev-img]:https://img.shields.io/badge/docs-dev-blue.svg | ||
[docs-dev-status]:https://slimgroup.github.io/JUDI.jl/dev | ||
|
||
[build-img]:https://github.com/slimgroup/JUDI.jl/workflows/CI-tests/badge.svg | ||
[build-status]:https://github.com/slimgroup/JUDI.jl/actions?query=workflow%3ACI-tests | ||
|
||
[codecov-img]:https://codecov.io/gh/slimgroup/JUDI.jl/branch/master/graph/badge.svg | ||
[codecov-status]:https://codecov.io/gh/slimgroup/JUDI.jl | ||
|
||
[aqua-img]:https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg | ||
[aqua-status]:https://github.com/JuliaTesting/Aqua.jl | ||
|
||
[zenodo-img]:https://zenodo.org/badge/DOI/10.5281/zenodo.3878711.svg | ||
[zenodo-status]:https://doi.org/10.5281/zenodo.3878711 | ||
|
||
[Devito]:https://github.com/devitocodes/devito | ||
[JUDI]:https://github.com/slimgroup/JUDI.jl | ||
[license-img]:http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat | ||
[license-status]:LICENSE.md |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Weave = "44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9" | ||
|
||
[compat] | ||
Documenter = "0.25" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,42 @@ | ||
using Documenter, JUDI | ||
using Documenter, JUDI, Weave | ||
|
||
import JUDI: judiMultiSourceVector | ||
import Base.show | ||
|
||
# Some dispatch needed for Weave | ||
show(io::IO, ::MIME, ms::judiMultiSourceVector) = println(io, "$(typeof(ms)) wiht $(ms.nsrc) sources") | ||
show(io::IO, ::MIME, m::Model) = print(io, "Model (n=$(m.n), d=$(m.d), o=$(m.o)) with parameters $(keys(m.params))") | ||
show(io::IO, ::MIME, A::PhysicalParameter) = println(io, "$(typeof(A)) of size $(A.n) with origin $(A.o) and spacing $(A.d)") | ||
show(io::IO, ::MIME, G::Geometry) = println(io, "$(typeof(G)) wiht $(length(G.nt)) sources") | ||
|
||
# Convert example to documentation markdown file | ||
ex_path = "$(JUDI.JUDIPATH)/../examples/scripts" | ||
weave("$(ex_path)/modeling_basic_2D.jl"; out_path="src/tutorials/05_quickstart.md", doctype="github") | ||
|
||
# Create documentation | ||
makedocs(sitename="JUDI documentation", | ||
doctest=false, clean=true, | ||
authors="Mathias Louboutin", | ||
pages = Any[ | ||
"Home" => "index.md", | ||
"About" => "about.md", | ||
"Installation" => "installation.md", | ||
"Abstract vectors" => "abstract_vectors.md", | ||
"Data Structures" => "data_structures.md", | ||
"Linear Operators" => "linear_operators.md", | ||
"Input/Output" => "io.md", | ||
"Helper Functions" => "helper.md", | ||
"JUDI API" => Any[ | ||
"Abstract vectors" => "abstract_vectors.md", | ||
"Data Structures" => "data_structures.md", | ||
"Linear Operators" => "linear_operators.md", | ||
"Input/Output" => "io.md", | ||
"Helper Functions" => "helper.md"], | ||
"Getting Started" => "basics.md", | ||
"Inversion" => "inversion.md", | ||
"Tutorial" => "tutorials.md", | ||
"Devito backend reference" => "pysource.md"], | ||
"Tutorials" => map( | ||
s -> "tutorials/$(s)", | ||
sort(filter(x->endswith(x, ".md"), readdir(joinpath(@__DIR__, "src/tutorials/"))))), | ||
"Devito backend reference" => "pysource.md"], | ||
format = Documenter.HTML( | ||
# assets = ["assets/slim.css"], | ||
prettyurls = get(ENV, "CI", nothing) == "true"), | ||
) | ||
|
||
# Deploy documentation | ||
deploydocs(repo="github.com/slimgroup/JUDI.jl") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
1 comment
on commit 01eedad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/58839
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v3.0.0 -m "<description of version>" 01eedad195f2a52d608ad7ee183f0cf492d20696
git push origin v3.0.0
@JuliaRegistrator register