Re: send array using MPI



Fabian Braennstroem wrote:
Hi,

I try to write a small fortran/mpi program to solve the
poisson eqn. To accomplish that, I have to send a part of
the calculated 2D array to the other processors.

The array is defined in a COMMON file: f(i,j) with i=100 and
j=100.

I want to send the values for j=10 and i=1 to 100; so I
actually send 100 values to the other processors.

My problem is, that I do not know, how I declare the range
of the sending array to the MPI_SEND routine.


CALL MPI_Send(f(1,100),count,MPI_FLOAT,1, 0,MPI_COMM_WORLD, ierr)

'count' should be set to 100, but how can I declare the
range!?

Would be nice, if you have an idea, how I can do that in
fortran77!

Greetings!
Fabian


why do you pass f(1,100)? pass it f(1,10) and count=100. as fortran stores column major, there's no problem. it will start in column 10, row 1 and send off until column 10, row 100.


michael
.



Relevant Pages

  • Re: send array using MPI
    ... I try to write a small fortran/mpi program to solve the ... the calculated 2D array to the other processors. ... My problem is, that I do not know, how I declare the range ... i'm not the mpi guru though, there might be a much better version... ...
    (comp.lang.fortran)
  • Re: send array using MPI
    ... I try to write a small fortran/mpi program to solve the ... To accomplish that, I have to send a part of ... the calculated 2D array to the other processors. ... My problem is, that I do not know, how I declare the range ...
    (comp.lang.fortran)
  • send array using MPI
    ... I try to write a small fortran/mpi program to solve the ... To accomplish that, I have to send a part of ... the calculated 2D array to the other processors. ... My problem is, that I do not know, how I declare the range ...
    (comp.lang.fortran)