Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Benny's improved interpolation patch #252

Closed
wd15 opened this issue Sep 19, 2014 · 3 comments
Closed

Include Benny's improved interpolation patch #252

wd15 opened this issue Sep 19, 2014 · 3 comments

Comments

@wd15
Copy link
Contributor

@wd15 wd15 commented Sep 19, 2014

Not sure where the patch is. I'm assuming Jon has it.

Imported from trac ticket #348, created by wd15 on 05-25-2011 at 11:38, last modified: 09-01-2011 at 14:57

@wd15
Copy link
Contributor Author

@wd15 wd15 commented Sep 19, 2014

guyer attached nearest2.png on 09-01-2011 at 14:26

@guyer
Copy link
Member

@guyer guyer commented Sep 19, 2014

Replying to [wd15](issue #252):

Not sure where the patch is. I'm assuming Jon has it.

Posted to the mailing list at http://article.gmane.org/gmane.comp.python.fipy/2033

Trac comment by guyer on 08-30-2011 at 14:13

@guyer
Copy link
Member

@guyer guyer commented Sep 19, 2014

Fixed in r4742

Merged Benny's code, generalizing the determination of closest points in numerix.nearest().

It turns out that the chunk size does not benefit from being very big, and can be catastrophic if it's too big (horrendously slow disk thrashing if swap space is available or crashing with Memory Error if it's not).

nearest2.png

108 bytes seems to get most of the benefit without the risk on a variety of architectures. See calculation in trunk/fipy/tools/numerix.py@4742#L470. Note that disk thrashing seems to set in well below the available RAM.

  • (# points) x (# cells) gives (# comparisons)
  • time x (clock speed) gives cycles
  • (# cells) x (chunk size) x dimensions x (bytes / value) gives (bytes / chunk)

Trac comment by guyer on 09-01-2011 at 14:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants