From b61f940d02f3fd9aafcb79928d7d6607ce4a6665 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Sun, 12 Dec 2021 00:01:07 -0600 Subject: [PATCH] bump Thrust dependency; fix empty_particles to avoid creating zero-size vectors on GPU; correct GPU skip condition in test_permutation_global_repeatable --- PySDM/impl/particle_attributes_factory.py | 2 +- setup.py | 2 +- tests/unit_tests/impl/test_particle_attributes.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PySDM/impl/particle_attributes_factory.py b/PySDM/impl/particle_attributes_factory.py index 2af5e4341..d32b2c1d5 100644 --- a/PySDM/impl/particle_attributes_factory.py +++ b/PySDM/impl/particle_attributes_factory.py @@ -93,5 +93,5 @@ def empty_particles(particles, n_sd) -> ParticleAttributes: return ParticleAttributes( particulator=particles, idx=idx, extensive_attribute_storage=None, extensive_keys={}, - cell_start=np.zeros(0, dtype=np.int64), attributes={} + cell_start=np.zeros(2, dtype=np.int64), attributes={} ) diff --git a/setup.py b/setup.py index a1b1f0779..d86f48862 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ def get_long_description(): use_scm_version=True, setup_requires=['setuptools_scm'], install_requires=[ - 'ThrustRTC==0.3.16', + 'ThrustRTC==0.3.17', 'CURandRTC' + ('==0.1.6' if 'CI' in os.environ else '>=0.1.2'), 'numba' + ('==0.54.0' if 'CI' in os.environ else '>=0.51.2'), 'numpy' + ('==1.20.2' if 'CI' in os.environ else ''), diff --git a/tests/unit_tests/impl/test_particle_attributes.py b/tests/unit_tests/impl/test_particle_attributes.py index b73489b91..59ba736cd 100644 --- a/tests/unit_tests/impl/test_particle_attributes.py +++ b/tests/unit_tests/impl/test_particle_attributes.py @@ -203,7 +203,7 @@ def test_permutation_local(backend_class): @staticmethod # pylint: disable=redefined-outer-name def test_permutation_global_repeatable(backend_class): - if isinstance(backend_class, ThrustRTC): + if backend_class is ThrustRTC: return # TODO #328 n_sd = 800