Skip to content

ci: run all examples including slow ones#20

Open
corneliusroemer wants to merge 5 commits intofix-makefilefrom
ci-run-all-examples
Open

ci: run all examples including slow ones#20
corneliusroemer wants to merge 5 commits intofix-makefilefrom
ci-run-all-examples

Conversation

@corneliusroemer
Copy link
Copy Markdown
Member

Summary

After fixing the critical memory bug, all 27 examples now complete successfully. This PR enables testing of all examples in CI, including the previously "slow" examples that were timing out.

Changes

  • Remove skip logic for slow examples (benefits_of_sex, genealogies_with_selection, measuring_fixation_probabilities, multi_sample_adaptive, mutation_selection_balance_highd, neutral_LD_highd, speed_highd, speed_lowd)
  • Run all *.py examples serially in CI
  • Simplify test commands (no more case statements)

Why This Works Now

Previously, examples like decay_of_LD_highd.py were failing after 5 generations with >10GB memory usage due to the integer overflow bug in provide_at_least(). With the fix in the base branch (#fix-makefile):

  • Before: Try to allocate 2 billion clones → 100GB+ memory → timeout/kill
  • After: Allocate only what's needed → <1GB memory → completes in seconds

Testing

All 27 examples pass locally:

cd examples && for f in *.py; do MPLBACKEND=Agg python3 "$f" || exit 1; done

✅ All examples complete successfully under 10GB memory limit

Base Branch

This PR is based on fix-makefile which contains:

  • Integer overflow fix in provide_at_least()
  • Memory leak fixes in free_mem()
  • Python 3 compatibility fixes
  • CI improvements (serial execution, native-only builds)

corneliusroemer and others added 5 commits October 14, 2025 20:14
After fixing the critical memory bug in provide_at_least(), all 27
examples now complete successfully under 10GB memory limit, including
the previously "slow" examples that were timing out due to memory issues.

Changes:
- Remove skip logic for slow examples (benefits_of_sex, genealogies_with_selection, etc.)
- Run all *.py examples serially in CI
- All examples now complete in reasonable time with fixed memory usage

Previously slow examples were failing due to the integer overflow bug
that allocated 2 billion clones. With the fix, these examples complete
successfully and can be safely run in CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant