If someone is deciding whether to use complex datatypes or stick with contiguous ones, they need to look at their own situation. There is no simple answer. The only thing that is fully predictable is that an MPI operation, measured in isolation, will be no slower with contiguous data than with discontiguous.

The question for a particular application is:

in the application context, how does the performance with this discontiguous datatype compare with the performance I get with other solutions?"

The other solutions include anything your application must do to allow it to use contiguous datatypes. (most often, packing & unpacking)

The water gets even more muddy when you consider that each MPI implementation has differences in how it processes discontiguous data and even a single MPI (like OpenMPI) could have different underlying trade offs, depending on the capabilities of the underlying hardware.

It should not matter whether the program is written in C or Fortran. The cost of processing a discontiguous datatype is tied to the layout of the data in memory and both languages can produce equally simple or complex memory layouts.


Dick Treumann - MPI Team
IBM Systems & Technology Group
Dept X2ZA / MS P963 -- 2455 South Road -- Poughkeepsie, NY 12601
Tele (845) 433-7846 Fax (845) 433-8363


Inactive hide details for "Cole, Derek E" ---05/07/2010 08:21:48 AM---I don't have any hard numbers for fortran, but I do for C"Cole, Derek E" ---05/07/2010 08:21:48 AM---I don't have any hard numbers for fortran, but I do for C structures. Using C structures with some o


From:

"Cole, Derek E" <derek.e.cole@lmco.com>

To:

Open MPI Users <users@open-mpi.org>

Date:

05/07/2010 08:21 AM

Subject:

Re: [OMPI users] Fortran derived types

Sent by:

users-bounces@open-mpi.org





I don't have any hard numbers for fortran, but I do for C structures. Using C structures with some other C functionality (pointer functions, etc etc) can yield up to a 3x slowdown at worst, and at best, had a 15% slowdown. I have seen similar results in fortran, but don't have the benchmark results for it. In either language, nothing beats raw data types for performance. Just my .02, I know some out there may not agree.

Derek


-----Original Message-----
From: users-bounces@open-mpi.org [
mailto:users-bounces@open-mpi.org] On Behalf Of Terry Frankcombe
Sent: Thursday, May 06, 2010 12:24 AM
To: Open MPI Users
Subject: Re: [OMPI users] Fortran derived types

Hi Derek

On Wed, 2010-05-05 at 13:05 -0400, Cole, Derek E wrote:
> In general, even in your serial fortran code, you're already taking a
> performance hit using a derived type.

Do you have any numbers to back that up?

Ciao
Terry


_______________________________________________
users mailing list
users@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users
_______________________________________________
users mailing list
users@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users