Skip to content

phlash gpu throws assertion error #12

@percyfal

Description

@percyfal

I'm running phlash on three different datasets (three VCFs) from which I select a number of individuals for sub-population analyses, resulting in 9 datasets. 4 of these run to completion, but 5 fail, most often with the following assertion error:

Traceback (most recent call last):
  File "/crex/proj/naiss2023-6-254/private/users/perun/passer/.pixi/envs/phlash/lib/python3.12/site-packages/jax/_src/callback.py", line 100, in pure_callback_impl
    return tree_util.tree_map(np.asarray, callback(*args))
                                          ^^^^^^^^^^^^^^^
  File "/crex/proj/naiss2023-6-254/private/users/perun/passer/.pixi/envs/phlash/lib/python3.12/site-packages/jax/_src/callback.py", line 77, in __call__
    return tree_util.tree_leaves(self.callback_func(*args, **kwargs))
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/crex/proj/naiss2023-6-254/private/users/perun/opt/phlash/src/phlash/gpu.py", line 409, in __call__
    self._compute_on_gpu(*args)
  File "/crex/proj/naiss2023-6-254/private/users/perun/opt/phlash/src/phlash/gpu.py", line 439, in _compute_on_gpu
    results[i] = gpu_kernel(pp, split_index, grad, barrier)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/crex/proj/naiss2023-6-254/private/users/perun/opt/phlash/src/phlash/gpu.py", line 293, in __call__
    assert np.all(ll < 0)
           ^^^^^^^^^^^^^^
AssertionError
2025-06-10 15:44:48,114; ERROR [jax._src.callback:pure_callback_impl]: jax.pure_callback failed

At first I thought this could be due to some anomaly when subsetting on individuals (e.g., lots of monomorphic sites, sites with only missing data), but I manually reran a population making sure only to include variant sites with zero missing data, and this error still occurs. Are there any requirements on the input data, or are any number of missing data fine?

For comparison, I also ran using phlash=1.0.3, without success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions