glotzerlab / hoomd-blue

Molecular dynamics and Monte Carlo soft matter simulation on GPUs.
http://glotzerlab.engin.umich.edu/hoomd-blue
BSD 3-Clause "New" or "Revised" License
323 stars 127 forks source link

`hpmc.update.Clusters` produces incorrect results on the ROCm platform. #1605

Closed joaander closed 2 months ago

joaander commented 11 months ago

Description

test_pivot_moves reports an average cluster size of 0 when run on the ROCm backend (tested on OLCF Frontier). The average cluster size should be ~1.02.

Script

pytest -v -x -ra hoomd/hpmc/pytest/test_clusters.py

Input files

No response

Output

=================================== FAILURES ===================================
____________________________ test_pivot_moves[GPU] _____________________________

device = <hoomd.device.GPU object at 0x7ff802d134f0>
simulation_factory = <function simulation_factory.<locals>.make_simulation at 0x7ff6f05ff700>
lattice_snapshot_factory = <function lattice_snapshot_factory.<locals>.make_snapshot at 0x7ff6ebdd7700>

    @pytest.mark.serial
    def test_pivot_moves(device, simulation_factory, lattice_snapshot_factory):
        """Test that Clusters produces finite size clusters."""
        sim = simulation_factory(
            lattice_snapshot_factory(particle_types=['A', 'B'],
                                     dimensions=3,
                                     a=4,
                                     n=7,
                                     r=0.1))

        mc = hoomd.hpmc.integrate.Sphere(default_d=0.1, default_a=0.1)
        mc.shape['A'] = dict(diameter=1.1)
        mc.shape['B'] = dict(diameter=1.3)
        sim.operations.integrator = mc

        cl = hoomd.hpmc.update.Clusters(trigger=hoomd.trigger.Periodic(5),
                                        pivot_move_probability=0.5)
        sim.operations.updaters.append(cl)

        sim.run(10)

        avg = cl.avg_cluster_size
>       assert avg > 0
E       assert 0.0 > 0

Expected output

======================================================================== 1333 passed, 52 skipped in 10.91s ========================================================================

Platform

GPU

Installation method

Compiled from source

HOOMD-blue version

4.1.0

Python version

3.9.13

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] commented 2 months ago

This issue has been automatically closed because it has not had recent activity.