Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itischler
lbmpy
Commits
0330b3ca
Commit
0330b3ca
authored
Feb 04, 2021
by
Markus Holzer
Committed by
Michael Kuron
Feb 04, 2021
Browse files
Bump minimum SymPy version and add Python 3.9 to CI
parent
6374f339
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
0330b3ca
...
...
@@ -36,6 +36,31 @@ tests-and-coverage:
cobertura
:
coverage.xml
junit
:
report.xml
# pipeline with latest python version
latest-python
:
stage
:
test
except
:
variables
:
-
$ENABLE_NIGHTLY_BUILDS
image
:
i10git.cs.fau.de:5005/pycodegen/pycodegen/latest_python
before_script
:
-
pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
script
:
-
env
-
pip list
-
export NUM_CORES=$(nproc --all)
-
mkdir -p ~/.config/matplotlib
-
echo "backend:template" > ~/.config/matplotlib/matplotlibrc
-
mkdir public
-
py.test -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml
tags
:
-
docker
-
AVX
artifacts
:
when
:
always
reports
:
junit
:
report.xml
# Nightly test - runs "long run" jobs only
test-longrun
:
stage
:
test
...
...
@@ -85,15 +110,18 @@ ubuntu:
variables
:
-
$ENABLE_NIGHTLY_BUILDS
image
:
i10git.cs.fau.de:5005/pycodegen/pycodegen/ubuntu
script
:
before_script
:
-
apt-get -y remove python3-sympy
-
ln -s /usr/include/locale.h /usr/include/xlocale.h
-
pip3 install `grep -Eo 'sympy[>=]+[0-9\.]+' setup.py | sed 's/>/=/g'`
-
pip3 install `grep -Eo 'numpy[>=]+[0-9\.]+' setup.py | sed 's/>/=/g'`
-
pip3 install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
script
:
-
export NUM_CORES=$(nproc --all)
-
mkdir -p ~/.config/matplotlib
-
echo "backend:template" > ~/.config/matplotlib/matplotlibrc
-
pip3 install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
-
env
-
pip3 list
-
pytest-3 -v -m "not longrun" --junitxml=report.xml
-
pytest-3 -v
-n $NUM_CORES
-m "not longrun" --junitxml=report.xml
tags
:
-
docker
-
cuda11
...
...
lbmpy_tests/centeredcumulant/test_periodic_pipe_flow.ipynb
View file @
0330b3ca
This diff is collapsed.
Click to expand it.
lbmpy_tests/phasefield/test_numerical_1D_nphase_model.ipynb
View file @
0330b3ca
This diff is collapsed.
Click to expand it.
lbmpy_tests/test_code_hashequivalence.py
View file @
0330b3ca
from
hashlib
import
sha256
from
lbmpy.creationfunctions
import
create_lb_ast
from
pystencils.llvm.llvmjit
import
generate_llvm
def
test_hash_equivalence_llvm
():
import
pytest
pytest
.
importorskip
(
"llvmlite"
)
from
pystencils.llvm.llvmjit
import
generate_llvm
ref_value
=
"6db6ed9e2cbd05edae8fcaeb8168e3178dd578c2681133f3ae9228b23d2be432"
ast
=
create_lb_ast
(
stencil
=
'D3Q19'
,
method
=
'srt'
,
optimization
=
{
'target'
:
'llvm'
})
code
=
generate_llvm
(
ast
)
...
...
lbmpy_tests/test_cumulant_methods.py
View file @
0330b3ca
import
pytest
from
lbmpy.methods
import
create_srt
from
lbmpy.stencils
import
get_stencil
from
lbmpy.methods.creationfunctions
import
create_with_default_polynomial_cumulants
def
test_weights
():
for
stencil_name
in
(
'D2Q9'
,
'D3Q19'
,
'D3Q27'
):
@
pytest
.
mark
.
parametrize
(
'stencil_name'
,
[
'D2Q9'
,
'D3Q19'
,
'D3Q27'
])
def
test_weights
(
stencil_name
):
stencil
=
get_stencil
(
stencil_name
)
cumulant_method
=
create_with_default_polynomial_cumulants
(
stencil
,
[
1
])
moment_method
=
create_srt
(
stencil
,
1
,
cumulant
=
False
,
compressible
=
True
,
maxwellian_moments
=
True
)
...
...
lbmpy_tests/test_gpu_block_size_limiting.py
View file @
0330b3ca
from
lbmpy.creationfunctions
import
create_lb_ast
import
pytest
def
test_gpu_block_size_limiting
():
pytest
.
importorskip
(
"pycuda"
)
too_large
=
2048
*
2048
opt
=
{
'target'
:
'gpu'
,
'gpu_indexing_params'
:
{
'block_size'
:
(
too_large
,
too_large
,
too_large
)}}
ast
=
create_lb_ast
(
stencil
=
'D3Q19'
,
cumulant
=
True
,
relaxation_rate
=
1.8
,
optimization
=
opt
,
...
...
lbmpy_tests/test_sparse_lbm.ipynb
View file @
0330b3ca
This diff is collapsed.
Click to expand it.
setup.py
View file @
0330b3ca
...
...
@@ -70,7 +70,7 @@ setup(name='lbmpy',
author_email
=
'martin.bauer@fau.de'
,
url
=
'https://i10git.cs.fau.de/pycodegen/lbmpy/'
,
packages
=
[
'lbmpy'
]
+
[
'lbmpy.'
+
s
for
s
in
find_packages
(
'lbmpy'
)],
install_requires
=
[
'pystencils'
,
'sympy>=1.
1
'
,
'numpy'
],
install_requires
=
[
'pystencils'
,
'sympy>=1.
2
'
,
'numpy
>=1.11.0
'
],
classifiers
=
[
'Development Status :: 4 - Beta'
,
'Framework :: Jupyter'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment