Fix bug in emcee_hammer for mpi
This is subtle but also easy to understand: When sending a sub-array of an array 'a' via 'a[[start:stop]]' this works as intended. However, on the receiving end doing a 'b[[start:stop]]' to write to a sub part of array 'b' does not work as expected. The reason is that the array access syntax of S-Lang creates a new (possibly temporary) array. On the sender side this is okay as this temporary array is the one that gets send. On the receiver side, however, the temporary array gets set to the new values, but the original array has no knowledge of it and, thus, remains unchanged. Mental note to myself: Despite the MPI module beeing in c, S-Lang array indices are not pointing *inside* an array, but create a new one!
Loading
Please register or sign in to comment