-
Notifications
You must be signed in to change notification settings - Fork 6
Remove threading #186
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
Remove threading #186
Changes from all commits
31a849e
d3dab0b
b539370
d2b5e21
e384495
413bf43
271af04
be8c238
1e55eb3
9b5d5e7
d5f97a0
9b05205
a0bfe33
110b18c
4f89c97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ Rimu uses Julia's built-in random number generator, which currently defaults to | |
## Reproducibility | ||
|
||
If you want FCIQMC runs to be reproducible, make sure to seed the RNG with | ||
[Random.seed!](https://docs.julialang.org/en/v1/stdlib/Random/#Random.seed!) and to use [`lomc!`](@ref) in single-threaded mode by passing it the `threading=false` keyword argument. | ||
[Random.seed!](https://docs.julialang.org/en/v1/stdlib/Random/#Random.seed!). | ||
Comment on lines
8
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will be true in the future when threading is fixed, but it won't be with this update? |
||
|
||
MPI-distributed runs can also be made reproducible by seeding the RNG with | ||
[`Rimu.RMPI.mpi_seed!`](@ref). |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,21 +12,9 @@ error exception is thrown. See [`MemoryStrategy`](@ref). | |
`w` is the walker array after fciqmc step, `v` the previous one, `pnorm` the | ||
norm of `v`, and `r` the instantaneously applied noise. | ||
""" | ||
function apply_memory_noise!(w::Union{AbstractArray{T},AbstractDVec{K,T}}, | ||
v, shift, dτ, pnorm, m | ||
) where {K,T<:Real} | ||
function apply_memory_noise!(w, v, shift, dτ, pnorm, m) | ||
apply_memory_noise!(StochasticStyle(w), w, v, real(shift), dτ, real(pnorm), m) | ||
end | ||
# only use real part of the shift and norm if the coefficients are real | ||
|
||
# otherwise, pass on complex shift in generic method | ||
function apply_memory_noise!(w::Union{AbstractArray,AbstractDVec}, args...) | ||
apply_memory_noise!(StochasticStyle(w), w, args...) | ||
end | ||
|
||
function apply_memory_noise!(ws::NTuple, args...) | ||
apply_memory_noise!(StochasticStyle(first(ws)), ws, args...) | ||
end | ||
Comment on lines
-15
to
-29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why these changes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function is now called after |
||
|
||
function apply_memory_noise!(s::StochasticStyle, w, v, shift, dτ, pnorm, m::NoMemory) | ||
return 0.0 # does nothing | ||
|
Uh oh!
There was an error while loading. Please reload this page.