Skip to content

Fix site dedup bug - #513

Merged
jeromekelleher merged 1 commit into
tskit-dev:masterfrom
mcveanlab:dedup-bug
Jun 13, 2018
Merged

jeromekelleher merged 1 commit into
tskit-dev:masterfrom
mcveanlab:dedup-bug

Conversation

@jeromekelleher

Copy link
Copy Markdown
Member

Closes #511.

Depends on #510.

cc @petrelharp. The existing algorithm was missing the last offsets, so wasn't getting the sizes of metadata and ancestral state correctly. More seriously though, the algorithm required memcpys on overlapping memory areas within these buffers. Rather than use memmove (which might have had other subtle consequences) I decided to use a simpler algorithm based on taking a copy of the site table rather than doing it in-place.

Comment thread msprime/cli.py
if population_configurations is not None:
sample_size = None
self._simulator = msprime.simulator_factory(
Ne=0.25,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this warrants an explanatory note, perhaps.

@petrelharp

Copy link
Copy Markdown
Contributor

the algorithm required memcpys on overlapping memory areas within these buffers

Darn it, you're right.

Looks good. Thanks a ton for fixing this.

@jeromekelleher
jeromekelleher merged commit 2f55768 into tskit-dev:master Jun 13, 2018
@jeromekelleher
jeromekelleher deleted the dedup-bug branch June 13, 2018 12:59
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.

2 participants