Skip to content

Commit

Permalink
Merge pull request #2552 from devitocodes/cleanup-master
Browse files Browse the repository at this point in the history
misc: update all link to main
  • Loading branch information
mloubout authored Mar 7, 2025
2 parents 28bf4cc + 1bd9222 commit 661939b
Show file tree
Hide file tree
Showing 33 changed files with 103 additions and 103 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/asv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
inputs:
tags:
description: 'Run ASV'
# Trigger the workflow on push to the master branch
# Trigger the workflow on push to the main branch
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-devito.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [published]
push:
branches:
- main # Push events on master branch
- main # Push events on main branch

jobs:
deploy-devito:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
# but only for the main branch
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ concurrency:

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
# but only for the main branch
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ concurrency:

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
# but only for the main branch
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest-core-mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ concurrency:

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
# but only for the main branch
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest-core-nompi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ concurrency:

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
# but only for the main branch
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
# but only for the main branch
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/triggers.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Master triggers
name: main triggers

on:
push:
branches:
- main # Push events on master branch
- main # Push events on main branch

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ concurrency:

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
# but only for the main branch
push:
branches:
- main
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ We welcome third-party contributions, and we would love you to become an active

Software contributions are made via GitHub pull requests to https://github.com/devitocodes/devito. If you are planning a large contribution, we encourage you to engage with us frequently to ensure that your effort is well-directed. See below for more details.

Devito is distributed under the MIT License, https://github.com/devitocodes/devito/blob/master/LICENSE.md. The act of submitting a pull request or patch (with or without an explicit Signed-off-by tag) will be understood as an affirmation of the following:
Devito is distributed under the MIT License, https://github.com/devitocodes/devito/blob/main/LICENSE.md. The act of submitting a pull request or patch (with or without an explicit Signed-off-by tag) will be understood as an affirmation of the following:

Developer's Certificate of Origin 1.1

Expand Down Expand Up @@ -40,7 +40,7 @@ There are several options:

### Making changes

First of all, read of [code of conduct](https://github.com/devitocodes/devito/blob/master/CODE_OF_CONDUCT.md) and make sure you agree with it.
First of all, read of [code of conduct](https://github.com/devitocodes/devito/blob/main/CODE_OF_CONDUCT.md) and make sure you agree with it.

The protocol to propose a patch is:
* [Recommended, but not compulsory] Talk to us on Slack about what you're trying to do. There is a great chance we can support you.
Expand All @@ -60,12 +60,12 @@ Tip, especially for newcomers: prefer short, self-contained Pull Requests over l

Some coding rules are "enforced" (and automatically checked by our Continuous Integration systems), some are "strongly recommended", others are "optional" but welcome.

* We _enforce_ [PEP8](https://www.python.org/dev/peps/pep-0008/), with a few exceptions, listed [here](https://github.com/devitocodes/devito/blob/master/setup.cfg#L3)
* We _enforce_ [PEP8](https://www.python.org/dev/peps/pep-0008/), with a few exceptions, listed [here](https://github.com/devitocodes/devito/blob/main/setup.cfg#L3)
* We _enforce_ a maximum line length of 90 characters.
* We _enforce_ indentation via 4 spaces.
* We _suggest_ to use ``flake8`` to check the above points locally, before filing a Pull Request.
* We _strongly recommend_ to document any new module, class, routine, ... with [NumPy-like docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html#example-numpy) ("numpydoc").
* We _strongly recommend_ imports to be at the top of a module, logically grouped and, within each group, to be alphabetically ordered. As an example, condider our [__init__.py](https://github.com/devitocodes/devito/blob/master/devito/__init__.py): the first group is imports from the standard library; then imports from third-party dependencies; finally, imports from devito modules.
* We _strongly recommend_ imports to be at the top of a module, logically grouped and, within each group, to be alphabetically ordered. As an example, condider our [__init__.py](https://github.com/devitocodes/devito/blob/main/devito/__init__.py): the first group is imports from the standard library; then imports from third-party dependencies; finally, imports from devito modules.
* We _strongly recommend_ to follow standard Python coding guidelines:
- Use camel caps for class names, e.g. ``class FooBar``.
- Method names must start with a small letter; use underscores to separate words, e.g. ``def _my_meth_...``.
Expand Down
18 changes: 9 additions & 9 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Yes. Devito uses [ctypes.CDLL](https://docs.python.org/3/library/ctypes.html#cty

## What performance optimizations does Devito apply

Take a look [here](https://github.com/devitocodes/devito/tree/master/examples/performance) and in particular [at this notebook](https://github.com/devitocodes/devito/blob/master/examples/performance/00_overview.ipynb).
Take a look [here](https://github.com/devitocodes/devito/tree/main/examples/performance) and in particular [at this notebook](https://github.com/devitocodes/devito/blob/main/examples/performance/00_overview.ipynb).

[top](#Frequently-Asked-Questions)

Expand Down Expand Up @@ -205,7 +205,7 @@ Other optimizations include common sub-expressions elimination, hoisting of loop

![Flops reduction](https://ndownloader.figshare.com/files/22862822/preview/22862822/preview.jpg)

For more info, take a look [at this notebook](https://github.com/devitocodes/devito/blob/master/examples/performance/00_overview.ipynb).
For more info, take a look [at this notebook](https://github.com/devitocodes/devito/blob/main/examples/performance/00_overview.ipynb).

[top](#Frequently-Asked-Questions)

Expand All @@ -214,11 +214,11 @@ For more info, take a look [at this notebook](https://github.com/devitocodes/dev

Many Devito examples are provided that demonstrate application for specific problems, including e.g. fluid mechanics and seismic modeling. We focus in this question on seismic modeling examples that provide convenience wrappers to build differential equations and create Devito Operators for various types of modeling physics including isotropic and anisotropic, acoustic and elastic.

These examples ([link](https://github.com/devitocodes/devito/tree/master/examples)) use abstractions to remove details from the methods that actually build the operators. The idea is that at the time you build a Devito operator, you don't need specific material parameter arrays (e.g. velocity or density or Thomsen parameter), and you don't need specific locations of sources and receiver instruments. All you need to build the operator is a placeholder that can provide the dimensionality and (for example) the spatial order of finite difference approximation you wish to employ. In this way you can build and return functioning highly optimized operators to which you can provide the specific implementation details at runtime via command line arguments.
These examples ([link](https://github.com/devitocodes/devito/tree/main/examples)) use abstractions to remove details from the methods that actually build the operators. The idea is that at the time you build a Devito operator, you don't need specific material parameter arrays (e.g. velocity or density or Thomsen parameter), and you don't need specific locations of sources and receiver instruments. All you need to build the operator is a placeholder that can provide the dimensionality and (for example) the spatial order of finite difference approximation you wish to employ. In this way you can build and return functioning highly optimized operators to which you can provide the specific implementation details at runtime via command line arguments.

An example of this abstraction (or placeholder design pattern) in operation is the call to the isotropic acoustic ```AcousticWaveSolver.forward``` method that returns a Devito operator via the ```ForwardOperator``` method defined in [operators.py](https://github.com/devitocodes/devito/blob/master/examples/seismic/acoustic/operators.py#L65-L105).
An example of this abstraction (or placeholder design pattern) in operation is the call to the isotropic acoustic ```AcousticWaveSolver.forward``` method that returns a Devito operator via the ```ForwardOperator``` method defined in [operators.py](https://github.com/devitocodes/devito/blob/main/examples/seismic/acoustic/operators.py#L65-L105).

You will note that this method uses placeholders for the material parameter arrays and the source and receiver locations, and then at runtime uses arguments provided to the returned ```Operator``` to provide state to the placeholders. You can see this happen on lines 112-113 in [wavesolver.py](https://github.com/devitocodes/devito/blob/master/examples/seismic/acoustic/wavesolver.py#L112-L113).
You will note that this method uses placeholders for the material parameter arrays and the source and receiver locations, and then at runtime uses arguments provided to the returned ```Operator``` to provide state to the placeholders. You can see this happen on lines 112-113 in [wavesolver.py](https://github.com/devitocodes/devito/blob/main/examples/seismic/acoustic/wavesolver.py#L112-L113).

[top](#Frequently-Asked-Questions)

Expand Down Expand Up @@ -251,7 +251,7 @@ These environment variables can either be set from the shell or programmatically
Used to select a specific "backend compiler". The backend compiler takes as input the code generated by Devito and produces a shared object. Supported backend compilers are `gcc`, `icc`, `pgcc`, `clang`. For each of these compilers, Devito uses some preset compilation flags (e.g., `-O3`, `-march=native`, `-fast-math`). If this environment variable is left unset, Devito will attempt auto-detection of the most suitable backend compiler available on the underlying system.

#### DEVITO_PLATFORM
This environment variable is mostly needed when running on GPUs, to ask Devito to generate code for a particular device (see for example this [tutorial](https://github.com/devitocodes/devito/blob/master/examples/gpu/01_diffusion_with_openmp_offloading.ipynb)). Can be also used to specify CPU architectures such as Intel's -- Haswell, Broadwell, SKL and KNL -- ARM, AMD, and Power. Often one can ignore this variable because Devito typically does a decent job at auto-detecting the underlying platform.
This environment variable is mostly needed when running on GPUs, to ask Devito to generate code for a particular device (see for example this [tutorial](https://github.com/devitocodes/devito/blob/main/examples/gpu/01_diffusion_with_openmp_offloading.ipynb)). Can be also used to specify CPU architectures such as Intel's -- Haswell, Broadwell, SKL and KNL -- ARM, AMD, and Power. Often one can ignore this variable because Devito typically does a decent job at auto-detecting the underlying platform.

#### DEVITO_LANGUAGE
Specify the generated code language. The default is `C`, which means sequential C. Use `openmp` to emit C+OpenMP or `openacc` for C+OpenACC.
Expand Down Expand Up @@ -335,7 +335,7 @@ pytest -vs <test.py> [more detailed log]


## What is the difference between f() and f[] notation
Devito offers a functional language to express finite difference operators. This is introduced [here](https://github.com/devitocodes/devito/blob/master/examples/userapi/01_dsl.ipynb) and systematically used throughout our examples and tutorials. The language relies on what in jargon we call the "f() notation".
Devito offers a functional language to express finite difference operators. This is introduced [here](https://github.com/devitocodes/devito/blob/main/examples/userapi/01_dsl.ipynb) and systematically used throughout our examples and tutorials. The language relies on what in jargon we call the "f() notation".

```python
>>> from devito import Grid, Function
Expand Down Expand Up @@ -522,7 +522,7 @@ Instead of swapping arrays, devito uses the modulus of a time index to map incre

## Can I subclass basic types such as TimeFunction

Yes, just like we did for our seismic examples, for example, the [PointSource class](https://github.com/devitocodes/devito/blob/master/examples/seismic/source.py). A few caveats are necessary, though.
Yes, just like we did for our seismic examples, for example, the [PointSource class](https://github.com/devitocodes/devito/blob/main/examples/seismic/source.py). A few caveats are necessary, though.

First, classes such as `Function` or `SparseTimeFunction` are inherently complex. In fact, `SparseTimeFunction` itself is a subclass of `Function`. The whole class hierarchy is modular and well-structured, but at the same time, it's depth and offers several hooks to allow specialization by subclasses -- for example, all methods starting with `__` such as `__init_finalize__` or `__shape_setup__`. It will take some time to digest it. Luckily, you will only need to learn a little of this, at least for simple subclasses.

Expand Down Expand Up @@ -691,7 +691,7 @@ possible arguments: mpirun, mpiexec, srun, e.g.: `mpirun -np <num processes> [op

* In case you used hardcoded boundary conditions to model your problem, consider switching to `SubDomain`s. Devito's support for distributed NumPy arrays enables domain decomposition without requiring changes to user code. The data is physically distributed, but from the user’s
perspective, it remains a logically centralized entity. Users can interact with data using familiar indexing schemes (e.g., slicing) without concern about the underlying layout.
You can find related tutorials [here:](https://github.com/devitocodes/devito/tree/master/examples/userapi).
You can find related tutorials [here:](https://github.com/devitocodes/devito/tree/main/examples/userapi).

For example, instead of
```python
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
[![Build Status for the Core backend](https://github.com/devitocodes/devito/workflows/CI-core/badge.svg)](https://github.com/devitocodes/devito/actions?query=workflow%3ACI-core)
[![Build Status with MPI](https://github.com/devitocodes/devito/workflows/CI-mpi/badge.svg)](https://github.com/devitocodes/devito/actions?query=workflow%3ACI-mpi)
[![Build Status on GPU](https://github.com/devitocodes/devito/workflows/CI-gpu/badge.svg)](https://github.com/devitocodes/devito/actions?query=workflow%3ACI-gpu)
[![Code Coverage](https://codecov.io/gh/devitocodes/devito/branch/master/graph/badge.svg)](https://codecov.io/gh/devitocodes/devito)
[![Code Coverage](https://codecov.io/gh/devitocodes/devito/branch/main/graph/badge.svg)](https://codecov.io/gh/devitocodes/devito)
[![Slack Status](https://img.shields.io/badge/chat-on%20slack-%2336C5F0)](https://join.slack.com/t/devitocodes/shared_invite/zt-2hgp6891e-jQDcepOWPQwxL5JJegYKSA)
[![asv](http://img.shields.io/badge/benchmarked%20by-asv-blue.svg?style=flat)](https://devitocodes.github.io/devito-performance)
[![PyPI version](https://badge.fury.io/py/devito.svg)](https://badge.fury.io/py/devito)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/devitocodes/devito/master)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/devitocodes/devito/main)
[![Docker](https://img.shields.io/badge/dockerhub-images-important.svg?logo=Docker?color=blueviolet&label=docker&sort=semver)](https://hub.docker.com/r/devitocodes/devito)

[Devito](http://www.devitoproject.org) is a Python package to implement
Expand All @@ -21,7 +21,7 @@ thereof.
- [About Devito](#about-devito)
- [Installation](#installation)
- [Resources](#resources)
- [FAQs](https://github.com/devitocodes/devito/blob/master/FAQ.md)
- [FAQs](https://github.com/devitocodes/devito/blob/main/FAQ.md)
- [Performance](#performance)
- [Get in touch](#get-in-touch)
- [Interactive jupyter notebooks](#interactive-jupyter-notebooks)
Expand Down Expand Up @@ -88,7 +88,7 @@ docker-compose up devito
After running the last command above, the terminal will display a URL such as
`https://127.0.0.1:8888/?token=XXX`. Copy-paste this URL into a browser window
to start a [Jupyter](https://jupyter.org/) notebook session where you can go
through the [tutorials](https://github.com/devitocodes/devito/tree/master/examples)
through the [tutorials](https://github.com/devitocodes/devito/tree/main/examples)
provided with Devito or create your own notebooks.

[See here](http://devitocodes.github.io/devito/download.html) for detailed installation
Expand All @@ -100,7 +100,7 @@ have seen in the past.
## Resources

To learn how to use Devito,
[here](https://github.com/devitocodes/devito/blob/master/examples) is a good
[here](https://github.com/devitocodes/devito/blob/main/examples) is a good
place to start, with lots of examples and tutorials.

The [website](https://www.devitoproject.org/) also provides access to other
Expand All @@ -117,7 +117,7 @@ If you are interested in any of the following
* Benchmarking operators;

then you should take a look at this
[README](https://github.com/devitocodes/devito/blob/master/benchmarks/user).
[README](https://github.com/devitocodes/devito/blob/main/benchmarks/user).

## Get in touch

Expand All @@ -126,4 +126,4 @@ are facing issues or just trying it out, join the
[conversation](https://join.slack.com/t/devitocodes/shared_invite/zt-2hgp6891e-jQDcepOWPQwxL5JJegYKSA).

## Interactive jupyter notebooks
The tutorial jupyter notebook are available interactively at the public [binder](https://mybinder.org/v2/gh/devitocodes/devito/master) jupyterhub.
The tutorial jupyter notebook are available interactively at the public [binder](https://mybinder.org/v2/gh/devitocodes/devito/main) jupyterhub.
2 changes: 1 addition & 1 deletion benchmarks/user/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ or number of fields used in the computation.

`benchmark.py` allows to set optimization mode, as well as several optimization
options, via the `--opt` argument. Please refer to
[this](https://github.com/devitocodes/devito/blob/master/examples/performance/00_overview.ipynb)
[this](https://github.com/devitocodes/devito/blob/main/examples/performance/00_overview.ipynb)
notebook for a comprehensive list of all optimization modes and options
available in Devito. You may also want to take a look at the example command
lines a few sections below.
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/user/advisor/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Intel Advisor roofline profiling on Devito

This README aims to help users derive rooflines through using Devito with [Intel Advisor](https://www.intel.com/content/www/us/en/developer/tools/oneapi/advisor.html).
We recommend going through tutorial [02_advisor_roofline.ipynb](https://github.com/devitocodes/devito/blob/master/examples/performance/02_advisor_roofline.ipynb) for a more detailed step-by-step guidance.
We recommend going through tutorial [02_advisor_roofline.ipynb](https://github.com/devitocodes/devito/blob/main/examples/performance/02_advisor_roofline.ipynb) for a more detailed step-by-step guidance.

### Prerequisites:
* Support is guaranteed only for Intel oneAPI 2025; earlier versions may not work.
Expand Down
Loading

0 comments on commit 661939b

Please sign in to comment.