Skip to content
Projects

tree_d_3d.kernels.tests.test_kernels_emulated

The CUDA versions of the Barnes-Hut and FMM kernels against their Python versions.

Each CUDA kernel is compiled as C++ with the emulation stubs of test_cuda_kernels_emulated and run thread by thread, so the kernels are checked on machines without a GPU (the threads run one after another: atomic adds are exact sums, in another order than on the CPU).

Attributes

NameDescription
ORDERNo description.
ROOTNo description.
SOFTENINGNo description.
THETANo description.
TREENo description.
pytestmarkNo description.

Functions

NameDescription
log_treeNo description.
systemNo description.
test_coincident_charges_are_reportedNo description.
test_direct_sumsNo description.
test_fmm_pipelineTraversal, M2L, downward pass and evaluation, each against its Python version.
test_log_moments_and_evaluationNo description.
test_pair_energyNo description.
test_quadtree_buildThe level-by-level build with the CUDA quadrant and scatter kernels.
test_quadtree_moments_and_evaluationNo description.
test_soften_pairsNo description.

ORDERattributemodule attribute#

ORDER = 6

ROOTattributemodule attribute#

ROOT = Quad(0.0, 0.0, 1.0 + 1e-09)

SOFTENINGattributemodule attribute#

SOFTENING = 0.01

THETAattributemodule attribute#

THETA = 0.6

TREEattributemodule attribute#

TREE = {'leaf_capacity': 4, 'max_depth': 20}

pytestmarkattributemodule attribute#

pytestmark = pytest.mark.skipif(COMPILER is None, reason='no C++ compiler')

log_treefunction#

def log_tree(system)

systemfunction#

def system()

test_coincident_charges_are_reportedfunction#

def test_coincident_charges_are_reported(tmp_path, system)

test_direct_sumsfunction#

def test_direct_sums(tmp_path, system, name)

test_fmm_pipelinefunction#

def test_fmm_pipeline(tmp_path, system, log_tree)

Traversal, M2L, downward pass and evaluation, each against its Python version.

test_log_moments_and_evaluationfunction#

def test_log_moments_and_evaluation(tmp_path, system, log_tree)

test_pair_energyfunction#

def test_pair_energy(tmp_path, system)

test_quadtree_buildfunction#

def test_quadtree_build(monkeypatch, system)

The level-by-level build with the CUDA quadrant and scatter kernels.

test_quadtree_moments_and_evaluationfunction#

def test_quadtree_moments_and_evaluation(tmp_path, system)

test_soften_pairsfunction#

def test_soften_pairs(tmp_path, system)