Skip to content

Commit

Permalink
WIP: test with transonic meson backend
Browse files Browse the repository at this point in the history
  • Loading branch information
ogiorgis committed Dec 18, 2023
1 parent 3a1973c commit 04eaf70
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ variables:

tests:
image: fluiddyn/python3-stable:lastest
before-script:
- apt-get install -y mercurial
script:
- pip install -U pip tox --user
- tox -e py39,py39-fft,codecov
28 changes: 14 additions & 14 deletions fluidsim/base/time_stepping/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ python_sources = [
'simple.py',
]

# backend = get_option('deps_backend')
# if backend == 'pythran'
# pythran = find_program('pythran', native: true)
# # run_command(['transonic', '--meson', 'pseudo_spect.py'], check: true)
# # or
# # run_command(['transonic', 'pseudo_spect.py', '-af', '"-march=native -DUSE_XSIMD -Ofast"'])
# # run_command(
# # [
# # 'pythran', '-E', join_paths(meson.current_source_dir(), '__pythran__', 'pseudo_spect.py'),
# # '-o', join_paths(meson.current_source_dir(), '__pythran__', 'pseudo_spect.cpp')
# # ]
# # )
# endif
backend = get_option('deps_backend')
if backend == 'pythran'
pythran = find_program('pythran', native: true)
run_command(['transonic', '--meson', 'pseudo_spect.py'], check: true)
# # or
# run_command(['transonic', 'pseudo_spect.py', '-af', '"-march=native -DUSE_XSIMD -Ofast"'], check: true)
# run_command(
# [
# 'pythran', '-E', join_paths(meson.current_source_dir(), '__pythran__', 'pseudo_spect.py'),
# '-o', join_paths(meson.current_source_dir(), '__pythran__', 'pseudo_spect.cpp')
# ]
# )
endif

py3.install_sources(
python_sources,
pure: false,
subdir: 'fluidsim/base/time_stepping'
)

#subdir('__pythran__')
subdir('__pythran__')
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
[build-system]
# Further build requirements - like pythran and mpi4py - come from setup.py via
# the PEP 517 interface.
requires = [ "meson-python>=0.15.0", "wheel", "numpy", "transonic", "pythran>=0.9.7", "cython", "setuptools"]
requires = [
"meson-python>=0.15.0",
"wheel",
"numpy",
"transonic@hg+https://foss.heptapod.net/fluiddyn/transonic@d169e827c66c",
"pythran>=0.9.7",
"cython",
"setuptools",
]
build-backend = 'mesonpy'

[project]
Expand All @@ -21,7 +29,7 @@ dependencies = [
"fluidsim-core>=0.7.4",
"h5py",
"h5netcdf",
"transonic@hg+https://foss.heptapod.net/fluiddyn/transonic",
"transonic@hg+https://foss.heptapod.net/fluiddyn/transonic@d169e827c66c",
"xarray",
"rich",
"matplotlib>=3.3",
Expand Down

0 comments on commit 04eaf70

Please sign in to comment.