Re: [OMPI users] Missmatch between sent and recieved data

2009-07-27 Thread Alexey Sokolov
Hi, Prasadcse and Jody. Eeeh, the answer was on the top and it's name is my own inattention. Thank you for pointing it out and for your spent time. Gonna be more attentive next time. Alexey. On Mon, 2009-07-27 at 16:25 +0530, Prasadcse Perera wrote: > Hi Alexey, > I tried the same line of

Re: [OMPI users] Missmatch between sent and recieved data

2009-07-27 Thread Prasadcse Perera
Hi Alexey, I tried the same line of codes in my free time and what I could see is that when you perform strcpy the string was copied with '/0' but since you only receive 4 characters it can only receive the 'asdf' but not '/0' which seems a bit strange in the nature. I think this is because the

Re: [OMPI users] Missmatch between sent and recieved data

2009-07-27 Thread jody
Hi Alexey No, strlen() does not include the '\0' - this is what 'man strlen' says: STRLEN(3) Linux Programmer’s Manual STRLEN(3) NAME strlen - calculate the length of a string SYNOPSIS #include size_t strlen(const char *s);

Re: [OMPI users] Missmatch between sent and recieved data

2009-07-27 Thread Alexey Sokolov
Hi Thank you for advising, but my problem disappeared after rebooting as it has never been. I really don't know why it was in this way, but I didn't change anything and now it works correctly. May be it was connected with system update without rebooting after it (I use Fedora 10), don't truly

Re: [OMPI users] Missmatch between sent and recieved data

2009-07-24 Thread Dorian Krause
Hi, you do not send the trailing '0' which is used to determine the stringlength. I assume that chdata[i] has at least length 5 (otherwise you overrun your memory). Replace the "4" by "5" in MPI_Isend and MPI_Recv and everything should work (If I get the problem right). Dorian. Alexey

[OMPI users] Missmatch between sent and recieved data

2009-07-24 Thread Alexey Sokolov
Hi I'm sorry if the answer to my question is very simple, but I'm really confused with this situation. I got a program that now contains 1 master and 1 slave processes. Master process sends few similar chars to the slave process with this: for (unsigned i = 0; i < SomeVariable; i++) {