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

Feature request: ability to defined fixed spins #27

Closed
xfong opened this issue Aug 27, 2014 · 10 comments
Closed

Feature request: ability to defined fixed spins #27

xfong opened this issue Aug 27, 2014 · 10 comments

Comments

@xfong
Copy link

xfong commented Aug 27, 2014

It would be nice to have a switch to enable/disable calculation of torque in specific cells in mumax3.

@barnex
Copy link
Member

barnex commented Aug 29, 2014

Disabling torque in one or more regions does seem feasible. I might write it as an extension. Does
region := 2; ext_disableTorque(region); other_region_as_well := 3; ext_disableTorque(other_region_as_well)
look reasonable to you?

@godsic
Copy link
Contributor

godsic commented Aug 29, 2014

Would it be more reasonable to make 'gamma' region-able (if it is not
yet), so that setting gamma to 0 in some regions freezes corresponding
spins?

-Mykola

On Fri, 29 Aug, 2014 at 5:09 PM, Arne Vansteenkiste
notifications@github.com wrote:

Disabling torque in one or more regions does seem feasible. I might
write it as an extension. Does
region := 2
ext_disableTorque(region)
other_region_as_well := 3
ext_disableTorque(other_region_as_well)

look reasonable to you?


Reply to this email directly or view it on GitHub.

@xfong
Copy link
Author

xfong commented Aug 30, 2014

Making 'gamma' region-able should work too. But mumax3 should also recognize that if 'gamma' is zero for a particular cell, it should just return 'torque' as zero so that small numerical errors are not introduced.

@barnex
Copy link
Member

barnex commented Sep 1, 2014

0 * something is zero, regardless of numerical noise.
Anyway, gamma is used in quite a few places so making it
region-settable will require some coding and extensive testing of, at
least, Landau-Lifshitz, STT and temperature.

On Sat, Aug 30, 2014 at 3:11 PM, xfong notifications@github.com wrote:

Making 'gamma' region-able should work too. But mumax3 should also
recognize that if 'gamma' is zero for a particular cell, it should
just return 'torque' as zero so that small numerical errors are not
introduced.


Reply to this email directly or view it on GitHub.

@xfong
Copy link
Author

xfong commented Sep 6, 2014

As a first step, making gamma region-settable will be good. Later optimizations can be done to speed up the code so that computations are skipped for cells with gamma set as zero.

@barnex
Copy link
Member

barnex commented Sep 6, 2014

There's no such thing as speeding up by skipping cells on a GPU.
On Sep 6, 2014 7:48 PM, "xfong" notifications@github.com wrote:

As a first step, making gamma region-settable will be good. Later
optimizations can be done to speed up the code so that computations are
skipped for cells with gamma set as zero.


Reply to this email directly or view it on GitHub
#27 (comment).

@xfong
Copy link
Author

xfong commented Sep 6, 2014

Oh, I see. But does't that depend on the code? If the warp contains calculations in which "gamma" is zero, it should terminate early (which is what I meant by "skipping cells"). Since the fixed spins are likely to be local in memory, the threads that execute on the data in those memory locations are also likely to be i the same warp, no? So if the code is such that the function returns if gamma is detected to be zero, wouldn't those warps terminate sooner and result in faster execution overall?

@barnex
Copy link
Member

barnex commented Sep 8, 2014

In the special case that the fixed spins perfectly coincide with thread
blocks, the GPU would be doing few cycles less, yes. In the general
case it would do more due to divergent branching. In any case we are
bandwidth limited so that merely reading gamma would slow things down,
regardless of computation.

On Sat, Sep 6, 2014 at 10:03 PM, xfong notifications@github.com wrote:

Oh, I see. But does't that depend on the code? If the warp contains
calculations in which "gamma" is zero, it should terminate early
(which is what I meant by "skipping cells"). Since the fixed spins
are likely to be local in memory, the threads that execute on the
data in those memory locations are also likely to be i the same warp,
no? So if the code is such that the function returns if gamma is
detected to be zero, wouldn't those warps terminate sooner and result
in faster execution overall?

Reply to this email directly or view it on GitHub.

@godsic
Copy link
Contributor

godsic commented Nov 12, 2014

Kelvin, please check out 8946d26.

@barnex
Copy link
Member

barnex commented Dec 20, 2014

Available in 3.6.1

@barnex barnex closed this as completed Dec 20, 2014
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

No branches or pull requests

3 participants