-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update FAQ.md #2195
Merged
Merged
Update FAQ.md #2195
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
- [Does Devito optimize complex expressions](#does-devito-optimize-complex-expressions) | ||
- [How are abstractions used in the seismic examples](#how-are-abstractions-used-in-the-seismic-examples) | ||
- [What environment variables control how Devito works](#what-environment-variables-control-how-devito-works) | ||
- [What are the accepted combinations of PLATFORM, ARCH, and LANGUAGE](#what-are-the-accepted-combinations-of-platform-arch-and-language) | ||
- [How do you run the unit tests from the command line](#how-do-you-run-the-unit-tests-from-the-command-line) | ||
- [What is the difference between f() and f[] notation](#what-is-the-difference-between-f-and-f-notation) | ||
- [What is the indexed notation](#what-is-the-indexed-notation) | ||
|
@@ -226,7 +227,8 @@ You will note that this method uses placeholders for the material parameter arra | |
## What environment variables control how Devito works | ||
|
||
### How to get the list of Devito environment variables | ||
You can get the list of environment variables with the following python code: | ||
|
||
You can get the list of environment variables and all their possible values with the following python code: | ||
|
||
```python | ||
from devito import print_defaults | ||
|
@@ -244,26 +246,6 @@ These environment variables can either be set from the shell or programmatically | |
| programmatically | configuration['language'] = 'openmp' | | ||
|
||
|
||
### Table of values for Devito environment variables | ||
|
||
Note the default values are in **bold**. Links in the table take you to a section describing how the variables controls the behavior of Devito execution. | ||
|
||
| Variable | Values | | ||
|:---|:---| | ||
| [DEVITO_ARCH](#DEVITO_ARCH) | **custom**, gnu, gcc, clang, pgcc, pgi, nvc, cuda, osx, intel, icpc, icc, intel-knl, knl, gcc-4.9, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10, gcc-11, gcc-12 | | ||
| [DEVITO_PLATFORM](#DEVITO_PLATFORM) | **cpu64**, cpu64-dummy, intel64, snb, ivb, hsw, bdw, skx, klx, clx, knl, knl7210, arm, power8, power9, nvidiaX] | | ||
| [DEVITO_PROFILING](#DEVITO_PROFILING) | **basic**, advanced, advisor | | ||
| [DEVITO_BACKEND](#DEVITO_BACKEND) | **core**, void | | ||
| [DEVITO_DEVELOP](#DEVITO_DEVELOP) | **True**, False | | ||
| [DEVITO_OPT](#DEVITO_OPT) | noop, **advanced**, advanced-fsg, (noop, C), (noop, openmp), (noop, openacc), (advanced, C), (advanced, openmp), (advanced, openacc), (advanced-fsg, C), (advanced-fsg, openmp), (advanced-fsg, openacc)] | | ||
| [DEVITO_MPI](#DEVITO_MPI) | **0**, 1, basic, diag, overlap, overlap2, full | | ||
| [DEVITO_LANGUAGE](#DEVITO_LANGUAGE) | 0, 1, **C**, openmp, openacc (0==C, 1==openmp)| | ||
| [DEVITO_AUTOTUNING](#DEVITO_AUTOTUNING) | **off**, basic, aggressive, max, [off, preemptive], [off, destructive], [off, runtime], [basic, preemptive], [basic, destructive], [basic, runtime], [aggressive, preemptive], [aggressive, destructive], [aggressive, runtime], [max, preemptive], [max, destructive], [max, runtime] | | ||
| [DEVITO_LOGGING](#DEVITO_LOGGING) | DEBUG, PERF, **INFO**, WARNING, ERROR, CRITICAL | | ||
| [DEVITO_FIRST_TOUCH](#DEVITO_FIRST_TOUCH) | **0**, 1 | | ||
| [DEVITO_JIT_BACKDOOR](#DEVITO_JIT_BACKDOOR) | **0**, 1 | | ||
| [DEVITO_IGNORE_UNKNOWN_PARAMS](#DEVITO_IGNORE_UNKNOWN_PARAMS) | **0**, 1 | | ||
|
||
### Description of Devito environment variables | ||
|
||
#### DEVITO_ARCH | ||
|
@@ -272,12 +254,12 @@ Used to select a specific "backend compiler". The backend compiler takes as inpu | |
#### 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. | ||
|
||
#### 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. | ||
|
||
#### DEVITO_PROFILING | ||
Choose the performance profiling level. This is also automatically increased with `DEVITO_LOGGING=PERF` or `DEVITO_LOGGING=DEBUG`, in which case this environment variable can be ignored. | ||
|
||
#### DEVITO_BACKEND | ||
The execution backend. Since Devito v4.2, this environment variable can be ignored. | ||
|
||
#### DEVITO_DEVELOP | ||
Mostly useful for developers when chasing [segfaults](https://github.com/devitocodes/devito/blob/24ede9131473f69c1e44ba3b852f8654d3fd953e/devito/data/allocators.py#L373). | ||
|
||
|
@@ -287,9 +269,6 @@ Choose the performance optimization level. By default set to the maximum level, | |
#### DEVITO_MPI | ||
Controls MPI in Devito. Use `1` to enable MPI. The most powerful MPI mode is called "full", and is activated setting `DEVITO_MPI=full`. The "full" mode implements a number of optimizations including computation/communication overlap. | ||
|
||
#### 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. | ||
|
||
#### DEVITO_AUTOTUNING | ||
Search across a set of block shapes to maximize the effectiveness of loop tiling (aka cache blocking). You can choose between `off` (default), `basic`, `aggressive`, `max`. A more aggressive autotuning should eventually result in better runtime performance, though the search phase will take longer. | ||
|
||
|
@@ -309,6 +288,36 @@ Set `DEVITO_IGNORE_UNKNOWN_PARAMS=1` to avoid Devito raising an exception if one | |
[top](#Frequently-Asked-Questions) | ||
|
||
|
||
## What are the accepted combinations of PLATFORM, ARCH, and LANGUAGE | ||
|
||
#### LANGUAGE={C,openmp} | ||
|
||
These two languages can be used with virtually any PLATFORM and ARCH. | ||
|
||
With a device PLATFORM (e.g., `nvidiaX`, `amdgpuX`, or `intelgpuX`), the compiler will generate OpenMP code for device offloading. | ||
|
||
When using OpenMP offloading, it is recommended to stick to the corresponding vendor compiler, so `ARCH=amdclang` for AMD, `ARCH={icc,icx,intel}` for Intel, and `ARCH=nvc` for NVidia. | ||
|
||
#### LANGUAGE=openacc | ||
|
||
Requires: `PLATFORM=nvidiaX` and `ARCH=nvc`. | ||
|
||
The legacy PGI compiler is also supported via `ARCH=pgcc`. | ||
|
||
#### LANGUAGE=cuda | ||
|
||
_DevitoPRO only._ | ||
|
||
Requires: `PLATFORM=nvidiaX` and `ARCH=cuda`. | ||
|
||
#### LANGUAGE=hip | ||
|
||
_DevitoPRO only._ | ||
|
||
Requires: `PLATFORM=amdgpuX` and `ARCH=hip`. | ||
|
||
[top](#Frequently-Asked-Questions) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this is here, you should drop line 303 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know what line 303 pointed to |
||
|
||
## How do you run the unit tests from the command line | ||
In addition to the [tutorials]( https://www.devitoproject.org/devito/tutorials.html), the unit tests provide an excellent way to see how the Devito API works with small self-contained examples. You can exercise individual unit tests with the following python code: | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
removed as obsolete and unmaintanable
replaced suggesting the user to execute
print_defaults
instead ( a few lines above)