Skip to content

Commit

Permalink
Try fluidfft 0.4.0rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Feb 10, 2024
1 parent caf2339 commit b929129
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 114 deletions.
3 changes: 0 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ build:
tools:
python: "3.11"
apt_packages:
# workaround: bad fluidfft with false hard dependency to mpi4py
- libopenmpi-dev
- graphviz
jobs:
post_create_environment:
- pip install pdm pip -U
post_install:
- pdm use -f $READTHEDOCS_VIRTUALENV_PATH
- FLUIDFFT_TRANSONIC_BACKEND="python" pip install fluidfft
- pdm sync -G doc -G fft -G test --no-self
- pip install . --config-settings=setup-args=-Dtransonic-backend=python

Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ MPI_NUM_PROCS ?= 2
.PHONY: black black_check clean clean_pyc clean_so cleantransonic coverage_short develop dist lint _report_coverage shortlog tests _tests_coverage tests_mpi

develop: sync
pdm run pip install -e . -v --no-build-isolation --no-deps

sync:
pdm sync --clean --no-self
pdm sync --clean

install_fluidfft_plugins:
pdm run pip install fluidfft-fftw fluidfft-fftwmpi fluidfft-mpi_with_fftw

lock:
pdm lock -G :all
pdm lock

clean_so:
find fluidsim -name "*.so" -delete
Expand Down
2 changes: 1 addition & 1 deletion fluidsim/operators/test/test_operators3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def xfail_if_fluidfft_class_not_importable(func):
if not FLUIDFFT_INSTALLED or "FLUIDSIM_TYPE_FFT" not in os.environ:
return func

from fluidfft.fft3d import import_fft_class
from fluidfft import import_fft_class

try:
import_fft_class(os.environ["FLUIDSIM_TYPE_FFT"])
Expand Down
22 changes: 7 additions & 15 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,11 @@ def _test(session, env=None):
def test_without_fft_and_pythran(session):
command = "pdm sync --clean -G dev -G test -G mpi --no-self"
session.run_always(*command.split(), external=True)
session.install(
".", "-C", "setup-args=-Dtransonic-backend=python", "--no-deps"
)
session.install(".", "-C", "setup-args=-Dtransonic-backend=python", "--no-deps")

_test(session, env={"TRANSONIC_BACKEND": "python", "TRANSONIC_NO_REPLACE": "1"})


def _install_fluidfft(session):
# first install fluidfft without Pythran compilation
session.install(
"fluidfft", "--no-deps", env={"FLUIDFFT_TRANSONIC_BACKEND": "python"}
)


time_last = 0


Expand All @@ -66,10 +57,6 @@ def print_times(task: str):
print(f"Session started since {timedelta(seconds=time_now - time_start)}")
time_last = time_now

_install_fluidfft(session)

print_times("installing fluidfft")

command = "pdm sync --clean -G dev -G test -G fft -G mpi --no-self"
session.run_always(*command.split(), external=True)

Expand All @@ -82,14 +69,19 @@ def print_times(task: str):

print_times("installing fluidsim")

short_names = ["fftw", "mpi_with_fftw", "fftwmpi"]
if "GITLAB_CI" in os.environ:
short_names.extend(["pfft", "p3dfft"])
for short_name in short_names:
session.install(f"fluidfft-{short_name}")

_test(session)

print_times("tests")


@nox.session
def doc(session):
_install_fluidfft(session)
command = "pdm sync -G doc -G fft -G test --no-self"
session.run_always(*command.split(), external=True)
session.install(".", "-C", "setup-args=-Dtransonic-backend=python", "--no-deps")
Expand Down
Loading

0 comments on commit b929129

Please sign in to comment.