Skip to content
Commit f3aaf2c8 authored by Jakob Stierhof's avatar Jakob Stierhof
Browse files

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!
parent d7d0175f
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment