Skip to content

Commit

Permalink
Merge branch 'topic/default/fix-check' into 'branch/default'
Browse files Browse the repository at this point in the history
Fix import check + prepare 0.4.2

See merge request fluiddyn/fluidfft!69
  • Loading branch information
paugier committed Aug 22, 2024
2 parents 2ffe179 + 3b0c47d commit b8fa328
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

See also the [unreleased changes].

## [0.4.2] (2024-08-22)

- Compatibility mpi4py 4.0
- Fix check import classes and `FLUIDFFT_DISABLE_IMPORT_CHECK`.

## [0.4.1] (2024-07-24)

- Support for Numpy 2.0 and Python 3.12
Expand Down Expand Up @@ -114,4 +119,5 @@ See also the [unreleased changes].

[0.4.0]: https://foss.heptapod.net/fluiddyn/fluidfft/-/compare/0.3.5...0.4.0
[0.4.1]: https://foss.heptapod.net/fluiddyn/fluidfft/-/compare/0.4.0...0.4.1
[unreleased changes]: https://foss.heptapod.net/fluiddyn/fluidfft/-/compare/0.4.1...branch%2Fdefault
[0.4.2]: https://foss.heptapod.net/fluiddyn/fluidfft/-/compare/0.4.1...0.4.2
[unreleased changes]: https://foss.heptapod.net/fluiddyn/fluidfft/-/compare/0.4.2...branch%2Fdefault
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = 'mesonpy'

[project]
name = "fluidfft"
version = "0.4.1"
version = "0.4.2"
description = "Efficient and easy Fast Fourier Transform (FFT) for Python."
authors = [
{name = "Pierre Augier", email = "[email protected]"},
Expand Down
9 changes: 8 additions & 1 deletion src/fluidfft/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ def _check_failure(method):
if not any(method.endswith(postfix) for postfix in ("pfft", "p3dfft")):
return False

if os.environ.get("FLUIDFFT_DISABLE_IMPORT_CHECK"):
return False

# for few methods, try before real import because importing can lead to
# a fatal error (Illegal instruction)
if mpi.rank == 0:
Expand All @@ -186,7 +189,11 @@ def _check_failure(method):
env = {
key: value
for key, value in os.environ.items()
if not ("MPI" in key or key.startswith("PMI_"))
if not (
"MPI" in key
or key.startswith("PMI_")
or key.startswith("PMIX_")
)
}
else:
env = os.environ
Expand Down

0 comments on commit b8fa328

Please sign in to comment.