You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The semantics of Multiplicity as used in the population control of QMCPACK are such that it can only have a non negative integer value. It's currently a floating point value that is very frequently cast to int. There are several possible reason I can think of, in the past someone thought type safety wasn't useful, as origninally conceived of it could have been float, without any documented proof left behind it was a performance issue someone was trying to save defining an MPI type or having two appropriately typed MPI buffers. At anyrate it should have a type that reflects its semantics.
Describe the solution you'd like
It should be a signed integer type. Additions and subtractions are done to multiplicity, so it should not be an unsigned type. Unsigned types do not enforce positive values they were designed to handle address spaces and later repurposed as "sizes" but there main feature with C++ math operators is to "wrap around" on over and underflow this not a sensible behavior for Multiplicity.
Describe alternatives you've considered
Do nothing...
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
I agree with this. However, besides use in population control, unfortunately multiplicity appears to have been hijacked in CSVMC for other purposes, so there is some disentangling to be done.
For the purposes of walker control, my understanding is that the use of the multiplicity is only to say which walkers are going to be multiplied (i.e. multiplicity=2,3,4...) or killed (multiplicity=0), while satisfying the various minimums/maximums/rate limits. i.e. The multiplicity is a rather short lived property which is only used during the walker population control. Therefore it could be an integer and technically doesn't even need to be kept as long term state.
The semantics of Multiplicity as used in the population control of QMCPACK are such that it can only have a non negative integer value. It's currently a floating point value that is very frequently cast to int. There are several possible reason I can think of, in the past someone thought type safety wasn't useful, as origninally conceived of it could have been float, without any documented proof left behind it was a performance issue someone was trying to save defining an MPI type or having two appropriately typed MPI buffers. At anyrate it should have a type that reflects its semantics.
Describe the solution you'd like
It should be a signed integer type. Additions and subtractions are done to multiplicity, so it should not be an unsigned type. Unsigned types do not enforce positive values they were designed to handle address spaces and later repurposed as "sizes" but there main feature with C++ math operators is to "wrap around" on over and underflow this not a sensible behavior for Multiplicity.
Describe alternatives you've considered
Do nothing...
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: