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

Modifying Maximum Regions #124

Closed
kahlos opened this issue Sep 4, 2017 · 6 comments
Closed

Modifying Maximum Regions #124

kahlos opened this issue Sep 4, 2017 · 6 comments

Comments

@kahlos
Copy link
Contributor

kahlos commented Sep 4, 2017

How viable is it to add a parameter that allows you to modify the maximum number of regions from 256? There would be a tradeoff with memory consumption. But it would be very helpful to increase or decrease this based on the model.

On a cursory look through the code, I didn't see much besides an NREGIONS parameter. Would it be very involved getting this to work? Or is it as easy as changing the size or number bytes storing the region index?

@godsic
Copy link
Contributor

godsic commented Sep 4, 2017

yes, some of the cuda would need some love. go side should be straightforward. @kahlos would you be willing to work on this project?

@kahlos
Copy link
Contributor Author

kahlos commented Sep 5, 2017

Yes I certainly am willing to get this working. Though I could do with a few tips if you know which parts to look at.

Do you think it would work as I'm hoping? Decreased memory with less regions and vice versa. And no other effects besides memory consumption?

@barnex
Copy link
Member

barnex commented Sep 5, 2017 via email

@aleste2
Copy link

aleste2 commented Sep 7, 2017

It can be done, but you have to change a lot of code, as regions are now 8-bit type (limited to 256). Changing to word type (16 bit) all along the code should work.

@kahlos
Copy link
Contributor Author

kahlos commented Sep 7, 2017

Hmm okay, thanks all for the advice! I'll poke around the code when I have some free time and test this.

@JonathanMaes
Copy link
Contributor

Due to the prohibitive performance impact associated with increasing the number of regions, mumax³ will stick to supporting a maximum of 256.
Pull requests whose performance impact can be kept to a minimum are always welcome.

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

No branches or pull requests

5 participants