yogevb / a-dda

Automatically exported from code.google.com/p/a-dda
0 stars 0 forks source link

Failure of granule generator on certain MPI implementations #102

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
David de Kanter reported that using command line like:

adda_mpi -lambda 0.49364 -m 1.015 0.0 1.08 0.0 1.02 0.0 -shape coated 0.8 
-granul 0.1 0.1 -size 2.0 -dpl 12

will produce the error

*** An error occurred in MPI_Allreduce: the reduction operation MPI_LAND is not 
defined on the MPI_CHAR datatype

on some particular MPI implementation. 

This happens in function ExchangeFits in comm.c and the failure is strictly 
correct according to MPI 1 standard. However, the only reliable way to do the 
required thing in this standard is to use MPI_SHORT instead wasting a lot of 
memory. 

The good thing is that MPI 2.0 introduces MPI_SIGNED_CHAR, which can be used 
with MPI_LAND operations. So the proper solution is, probably, to upgrade to 
this MPI version (requiring it at compilation).

Original issue reported on code.google.com by yurkin on 12 Jul 2010 at 8:53

GoogleCodeExporter commented 9 years ago
A complete solution is to use MPI_C_BOOL and bool instead of MPI_SIGNED_CHAR 
and char respectively. However, the size of these new datatypes may be larger 
than 1, which again will waste memory (errata to MPI 2.2 standard addressing 
this issue is expected to be published soon, 
http://www.mpi-forum.org/docs/docs.html)

Original comment by yurkin on 12 Jul 2010 at 9:00

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r939.

Original comment by yurkin on 12 Jul 2010 at 9:07