Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] MPI_COMPLEX16
From: Patrick Le Dot (Patrick.Le-Dot_at_[hidden])
Date: 2012-05-25 04:47:09


Jeff Squyres <jsquyres <at> cisco.com> writes:

>
> Sorry for taking so long to respond to this.
>
> Patrick -- I just created https://svn.open-mpi.org/trac/ompi/ticket/3109 to
track this issue. Could
> you attach your patch to that ticket?
>

Attached to ticket 3109 :

Patch for openmpi-1.6.0
Fix missing MPI_COMPLEX8 and MPI_COMPLEX16 types.
Add also MPI_COMPLEX32 even this last one still turned off by configure.

Note for David : if you want to backport the fix on openmpi-1.5.*
ompi/op/op.c should be updated too.

Patrick

-- 
$ hg diff
diff -r 922a81be964b ompi/datatype/ompi_datatype_module.c
--- a/ompi/datatype/ompi_datatype_module.c  Thu May 10 14:03:17 2012 +0000
+++ b/ompi/datatype/ompi_datatype_module.c  Fri May 25 08:45:26 2012 +0200
@@ -467,6 +467,21 @@
     DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_cplex.dt,
OMPI_DATATYPE_COMPLEX, "MPI_COMPLEX",
                                       float, float, OMPI_DATATYPE_MPI_FLOAT,
OMPI_DATATYPE_MPI_FLOAT,
                                       OMPI_DATATYPE_FLAG_DATA_FORTRAN |
OMPI_DATATYPE_FLAG_DATA_FLOAT );
+#if OMPI_HAVE_FORTRAN_COMPLEX8
+    DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_complex8.dt,
OMPI_DATATYPE_COMPLEX8, "MPI_COMPLEX8",
+                                      float, float, OMPI_DATATYPE_MPI_FLOAT,
OMPI_DATATYPE_MPI_FLOAT,
+                                      OMPI_DATATYPE_FLAG_DATA_FORTRAN |
OMPI_DATATYPE_FLAG_DATA_FLOAT );
+#endif  /* OMPI_HAVE_FORTRAN_COMPLEX8 */
+#if OMPI_HAVE_FORTRAN_COMPLEX16
+    DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_complex16.dt,
OMPI_DATATYPE_COMPLEX16, "MPI_COMPLEX16",
+                                      double, double, OMPI_DATATYPE_MPI_DOUBLE,
OMPI_DATATYPE_MPI_DOUBLE,
+                                      OMPI_DATATYPE_FLAG_DATA_FORTRAN |
OMPI_DATATYPE_FLAG_DATA_FLOAT );
+#endif  /* OMPI_HAVE_FORTRAN_COMPLEX16 */
+#if OMPI_HAVE_FORTRAN_COMPLEX32
+    DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_complex32.dt,
OMPI_DATATYPE_COMPLEX32, "MPI_COMPLEX32",
+                                      long double, long double,
OMPI_DATATYPE_MPI_LONG_DOUBLE, OMPI_DATATYPE_MPI_LONG_DOUBLE,
+                                      OMPI_DATATYPE_FLAG_DATA_FORTRAN |
OMPI_DATATYPE_FLAG_DATA_FLOAT );
+#endif  /* OMPI_HAVE_FORTRAN_COMPLEX32 */
     DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_dblcplex.dt,
OMPI_DATATYPE_DOUBLE_COMPLEX, "MPI_DOUBLE_COMPLEX",
                                       double, double, OMPI_DATATYPE_MPI_DOUBLE,
OMPI_DATATYPE_MPI_DOUBLE,
                                       OMPI_DATATYPE_FLAG_DATA_FORTRAN |
OMPI_DATATYPE_FLAG_DATA_FLOAT );