diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3a10cc136e37947d7307b05f38720a37a8af1b7..694cf47bdcac8f6eaee541c471b13f03d1ef429b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ tests-and-coverage: - py.test -v -n $NUM_CORES --cov-report html --cov-report term --cov=. -m "not longrun" tags: - docker - - cuda + - cuda11 - AVX artifacts: when: always @@ -43,7 +43,7 @@ test-longrun: - py.test -v -n $NUM_CORES --cov-report html --cov-report term --cov=. tags: - docker - - cuda + - cuda11 - AVX artifacts: paths: @@ -79,7 +79,7 @@ ubuntu: - pytest-3 -v -m "not longrun" tags: - docker - - cuda + - cuda11 minimal-conda: stage: test @@ -124,7 +124,7 @@ pycodegen-integration: - make -j $NUM_CORES tags: - docker - - cuda + - cuda11 - AVX # -------------------- Linter & Documentation -------------------------------------------------------------------------- @@ -140,7 +140,7 @@ flake8-lint: - flake8 lbmpy tags: - docker - - cuda + - cuda11 build-documentation: @@ -153,7 +153,7 @@ build-documentation: - sphinx-build -W -b html doc html_doc tags: - docker - - cuda + - cuda11 artifacts: paths: - html_doc diff --git a/README.md b/README.md index 617a9ce3b4779c883546077b478d019172665064..cd7fce1e2c5f58943c8957d31f57191632575c1b 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ lbmpy ===== [](https://mybinder.org/v2/gh/mabau/lbmpy/master?filepath=doc%2Fnotebooks) -[](http://pycodegen.pages.walberla.net/lbmpy) +[](http://pycodegen.pages.i10git.cs.fau.de/lbmpy) [](https://i10git.cs.fau.de/pycodegen/lbmpy/commits/master) -[](http://pycodegen.pages.walberla.net/lbmpy/coverage_report) +[](http://pycodegen.pages.i10git.cs.fau.de/lbmpy/coverage_report) Run fast fluid simulations based on the lattice Boltzmann method in Python on CPUs and GPUs. @@ -39,7 +39,7 @@ pip install lbmpy[interactive] Without `[interactive]` you get a minimal version with very little dependencies. All options: -- `gpu`: use this if nVidia GPU is available and CUDA is installed +- `gpu`: use this if a NVIDIA GPU is available and CUDA is installed - `opencl`: use this to enable the target `opencl` (execution using OpenCL) - `alltrafos`: pulls in additional dependencies for loop simplification e.g. libisl - `interactive`: installs dependencies to work in Jupyter including image I/O, plotting etc. @@ -53,5 +53,5 @@ pip install lbmpy[interactive,gpu,doc] Documentation ------------- -Read the docs [here](http://pycodegen.pages.walberla.net/lbmpy) and +Read the docs [here](http://pycodegen.pages.i10git.cs.fau.de/lbmpy) and check out the Jupyter notebooks in `doc/notebooks`. diff --git a/conftest.py b/conftest.py index 3ae58d02970293604366736556a8e85aed0e061a..2f4100ef2d97f6dc10b736bdaac96f0367669fe4 100644 --- a/conftest.py +++ b/conftest.py @@ -21,6 +21,12 @@ from lbmpy.phasefield.simplex_projection import simplex_projection_2d # NOQA SCRIPT_FOLDER = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.abspath('lbmpy')) +# the Ubuntu pipeline uses an older version of pytest which uses deprecated functionality. +# This leads to many warinings in the test and coverage pipeline. +pytest_numeric_version = [int(x, 10) for x in pytest.__version__.split('.')] +pytest_numeric_version.reverse() +pytest_version = sum(x * (100 ** i) for i, x in enumerate(pytest_numeric_version)) + def add_path_to_ignore(path): if not os.path.exists(path): @@ -121,7 +127,10 @@ class IPyNbFile(pytest.File): warnings.filterwarnings("ignore", "IPython.core.inputsplitter is deprecated") notebook = nbformat.read(notebook_contents, 4) code, _ = exporter.from_notebook_node(notebook) - yield IPyNbTest(self.name, self, code) + if pytest_version >= 50403: + yield IPyNbTest.from_parent(name=self.name, parent=self, code=code) + else: + yield IPyNbTest(self.name, self, code) def teardown(self): pass @@ -130,4 +139,7 @@ class IPyNbFile(pytest.File): def pytest_collect_file(path, parent): glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"] if any(path.fnmatch(g) for g in glob_exprs): - return IPyNbFile(path, parent) + if pytest_version >= 50403: + return IPyNbFile.from_parent(fspath=path, parent=parent) + else: + return IPyNbFile(path, parent) diff --git a/lbmpy/moments.py b/lbmpy/moments.py index 84c25c4049e3c41543c98231a47850a96b2b8390..13a84ce62c52cff5ac155c96ec703dd20f04d8fa 100644 --- a/lbmpy/moments.py +++ b/lbmpy/moments.py @@ -456,7 +456,7 @@ def extract_monomials(sequence_of_polynomials, dim=3): >>> extract_monomials([x**2 + y**2 + y, y + y**2]) {(0, 2, 0), (0, 1, 0), (2, 0, 0)} >>> extract_monomials([x**2 + y**2 + y, y + y**2], dim=2) - {(0, 1), (2, 0), (0, 2)} + {(0, 1), (0, 2), (2, 0)} """ monomials = set() for polynomial in sequence_of_polynomials: @@ -479,8 +479,8 @@ def monomial_to_polynomial_transformation_matrix(monomials, polynomials): >>> mons = list(extract_monomials(polys, dim=2)) >>> monomial_to_polynomial_transformation_matrix(mons, polys) Matrix([ - [7, 3, 2], - [9, -5, 0]]) + [ 3, 2, 7], + [-5, 0, 9]]) """ dim = len(monomials[0]) diff --git a/lbmpy_tests/test_srt_trt_simplifications.py b/lbmpy_tests/test_srt_trt_simplifications.py index 0d154edab4b016b2510cb04770d7adcd8bc8fdb6..ad0a96247593198ceb2e0db1dd536b5d9f8c2b83 100644 --- a/lbmpy_tests/test_srt_trt_simplifications.py +++ b/lbmpy_tests/test_srt_trt_simplifications.py @@ -38,7 +38,7 @@ def test_simplifications_srt_d2q9_incompressible(): def test_simplifications_srt_d2q9_compressible(): omega = sp.symbols('omega') method = create_srt(get_stencil("D2Q9"), omega, compressible=True, equilibrium_order=2) - check_method(method, [53, 57, 1], [53, 41, 1]) + check_method(method, [53, 58, 1], [53, 42, 1]) def test_simplifications_trt_d2q9_incompressible(): @@ -50,7 +50,7 @@ def test_simplifications_trt_d2q9_incompressible(): def test_simplifications_trt_d2q9_compressible(): o1, o2 = sp.symbols("omega_1 omega_2") method = create_trt(get_stencil("D2Q9"), o1, o2, compressible=True) - check_method(method, [77, 105, 1], [65, 55, 1]) + check_method(method, [77, 106, 1], [65, 56, 1]) def test_simplifications_trt_d3q19_force_incompressible(): @@ -64,4 +64,4 @@ def test_simplifications_trt_d3q19_force_compressible(): o1, o2 = sp.symbols("omega_1 omega_2") force_model = Guo([sp.Rational(1, 3), sp.Rational(1, 2), sp.Rational(1, 5)]) method = create_trt_with_magic_number(get_stencil("D3Q19"), o1, compressible=False, force_model=force_model) - check_method(method, [270, 283, 1], [243, 177, 1]) + check_method(method, [270, 284, 1], [243, 178, 1])