It is because you are sending a "range" object and there is little bug in both 
procedure.
I will fix it as soon as I may.
Just browse the source code and you will see on your own.
..
octave:3> typeinfo message
ans = sq_string
octave:4> message1 = ones(1,2)
message1 =

   1   1

octave:5> typeinfo(message1)
ans = range
octave:6> message2 = ones(1,2) * 0.5
message2 =

    0.50000    0.50000

octave:7> typeinfo(message2)
ans = range





Thanks
Andrea 

--- Mer 26/5/10, Andrea Bressan <andrea.bres...@unipv.it> ha scritto:

Da: Andrea Bressan <andrea.bres...@unipv.it>
Oggetto: problem with ones and openmpi
A: octave-dev@lists.sourceforge.net
Cc: riccardocorrad...@yahoo.it
Data: Mercoledì 26 maggio 2010, 10:16

Hi all,

I 'm facing an odd behavior using MPI_Send with messages created with
ones. In particular if the message is created with

message=[1 1];

it is successfully delivered, but if it is created with 

message=ones(1,2);

the communication fails. Both MPI_Send and MPI_Recv return MPI_SUCCESS,
but the received vector is
 
[](1x0).

I tested some variations of the aboves with  Octave 3.2.4 and
openmpi_ext 1.0.1. The failing tests give the same result "[](1x0)". 

  message=[1 1]; %works
  message=ones(1,2);% fails
  message=zeros(1,2); %works
  message=[ones(1,2)]; % works
  message=ones(1,2)*0.5;% fails
  message=ones(2,1); % works
  message=ones(2,2); % works
  message=rand(1,2); % works

Can you explain why this happens? 

Andrea Bressan



      
------------------------------------------------------------------------------

_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to