In MPI & Fortran90, which is more efficient? 
Author Message
 In MPI & Fortran90, which is more efficient?

Quote:

> I have several large arrays (dynamically allocated to pointers) of sizes about
> (350, 150). I need to decompose these domains (2D decomposition) and send them
> to different processes. The individual blocks need not be of the same size.

> Obviously, different parts of this array have to go to different processes and
> since it is a multi-dimensional array all the data that needs to go to a
> particular process will not be continguous in memory and MPI_Type_vector needs
> to be used to create a strided datatype for the MPI_Send. This is one way.

> Another way is to associate another pointer to the section of the array that
> needs to be sent. Suppose process 5 needs to get the section
> array(101:150,76:150) then I can associate this section to a pointer "p":

> p => array(101:150,76:150),

> and do MPI_Send(p, 50*75, MPI_DOUBLE_PRECISION, 5, ...) without any use of a
> strided datatype.

> Of these 2 ways of achieving the goal which one is likely to be more
> efficient? The answer might depend on the fortran90 compiler and the MPI
> implementation and may be other factors like cache memory, etc. Which is more
> likely to be faster?

> Thanks
> Anand

Before you worry about which is faster I strongly suggest that you
read the sections of the MPI-2 document on the issues involved in MPI
implementations interacting with Fortran 90 (and 95).

You'll very quickly discover that your second approach will not work !

-- Jim


Etnus Inc.      +44 117 9071438
http://www.*-*-*.com/



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Pypar 1.0 - Simple and efficient MPI binding for Python

2. Pypar 1.0 - Simple and efficient MPI binding for Python

3. Books for efficient Fortran90 programming

4. I am frustrated (*%^&^*&##

5. 64-bit integers & MPI/F90

6. mpi & xlf

7. Compiling C & Fortran90 (and CPLEX)

8. Dynamic Data Exchange (DDE) & Fortran90

9. DDE & DVF (Fortran90)

10. DLL & Fortran90

11. Fortran90 & EQUIVALENCE

12. AM & FM modulation

 

 
Powered by phpBB® Forum Software