Dear All
As I read the function setup() in comm_tiled.cpp, I have the following problem. At line 350, you have
memcpy(sendbox[iswap][i],sbox,6*sizeof(double));
But if the noverlap is not 1, the second sbox would make the first one to disappear. Is that because there is only one send box that is needed?
I am quite confused here and hope someone to help me with this problem. Thanks very much!
Best!
Hao
Dear All
As I read the function setup() in comm_tiled.cpp, I have the following
problem. At line 350, you have
memcpy(sendbox[iswap][i],sbox,6*sizeof(double));
But if the noverlap is not 1, the second sbox would make the first one to
disappear. Is that because there is only one send box that is needed?
i don't understand the question. i can only guess that you are
confusing the direction in which memcpy() copies. sbox can be
overwritten without a problem for each loop, as its content is copied
to sendbox.
axel.
Thanks very much! My problem is that there is a loop outside at line 301
for (i = 0; i < noverlap; i++) {
So assume noverlap =2; But memcpy(sendbox[iswap][i],sbox,6*sizeof(double)); only remember the last sbox, in this case the second sbox. That is my problem. Thanks very much!
Really sorry. I made a silly mistake myself. I understand it now. Thanks very much!