Added padding to predefined handle structures to maintain library version to
version compatibility. This commit was SVN r20627.
Этот коммит содержится в:
родитель
2148220ce4
Коммит
0178b6c45f
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -476,15 +477,15 @@ enum {
|
||||
/*
|
||||
* NULL handles
|
||||
*/
|
||||
#define MPI_GROUP_NULL (&ompi_mpi_group_null)
|
||||
#define MPI_COMM_NULL (&ompi_mpi_comm_null)
|
||||
#define MPI_REQUEST_NULL (&ompi_request_null)
|
||||
#define MPI_OP_NULL (&ompi_mpi_op_null)
|
||||
#define MPI_ERRHANDLER_NULL (&ompi_mpi_errhandler_null)
|
||||
#define MPI_INFO_NULL (&ompi_mpi_info_null)
|
||||
#define MPI_WIN_NULL (&ompi_mpi_win_null)
|
||||
#define MPI_GROUP_NULL (((MPI_Group)&(ompi_mpi_group_null)))
|
||||
#define MPI_COMM_NULL (((MPI_Comm)&(ompi_mpi_comm_null)))
|
||||
#define MPI_REQUEST_NULL (((MPI_Request)&(ompi_request_null)))
|
||||
#define MPI_OP_NULL (((MPI_Op)&(ompi_mpi_op_null)))
|
||||
#define MPI_ERRHANDLER_NULL (((MPI_Errhandler)&(ompi_mpi_errhandler_null)))
|
||||
#define MPI_INFO_NULL (((MPI_Info)&(ompi_mpi_info_null)))
|
||||
#define MPI_WIN_NULL (((MPI_Win)&(ompi_mpi_win_null)))
|
||||
#if OMPI_PROVIDE_MPI_FILE_INTERFACE
|
||||
#define MPI_FILE_NULL (&ompi_mpi_file_null)
|
||||
#define MPI_FILE_NULL (((MPI_File)&(ompi_mpi_file_null)))
|
||||
#endif
|
||||
|
||||
#define MPI_STATUS_IGNORE ((MPI_Status *) 0)
|
||||
@ -596,107 +597,111 @@ OMPI_DECLSPEC int OMPI_C_MPI_WIN_DUP_FN( MPI_Win window, int win_keyval,
|
||||
/*
|
||||
* External variables
|
||||
*/
|
||||
OMPI_DECLSPEC extern struct ompi_communicator_t ompi_mpi_comm_world;
|
||||
OMPI_DECLSPEC extern struct ompi_communicator_t ompi_mpi_comm_self;
|
||||
OMPI_DECLSPEC extern struct ompi_communicator_t ompi_mpi_comm_null;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_communicator_t ompi_mpi_comm_world;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_communicator_t ompi_mpi_comm_self;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_communicator_t ompi_mpi_comm_null;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_group_t ompi_mpi_group_empty;
|
||||
OMPI_DECLSPEC extern struct ompi_group_t ompi_mpi_group_null;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_group_t ompi_mpi_group_empty;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_group_t ompi_mpi_group_null;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_request_t ompi_request_null;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_request_t ompi_request_null;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_null;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_max, ompi_mpi_op_min;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_sum, ompi_mpi_op_prod;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_land, ompi_mpi_op_band;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_lor, ompi_mpi_op_bor;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_lxor, ompi_mpi_op_bxor;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_maxloc, ompi_mpi_op_minloc;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_replace;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_null;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_max, ompi_mpi_op_min;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_sum;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_prod;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_land;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_band;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_lor, ompi_mpi_op_bor;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_lxor;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_bxor;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_maxloc;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_minloc;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_op_t ompi_mpi_op_replace;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_char, ompi_mpi_byte;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_int, ompi_mpi_logic;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_short, ompi_mpi_long;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_float, ompi_mpi_double;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_long_double;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_cplex, ompi_mpi_packed;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_signed_char;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_unsigned_char;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_unsigned_short;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_unsigned, ompi_mpi_datatype_null;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_unsigned_long, ompi_mpi_ldblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_ub, ompi_mpi_lb;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_float_int, ompi_mpi_double_int;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_long_int, ompi_mpi_2int;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_short_int, ompi_mpi_dblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer, ompi_mpi_real;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_dblprec, ompi_mpi_character;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_2real, ompi_mpi_2dblprec;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_2integer, ompi_mpi_longdbl_int;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_wchar, ompi_mpi_long_long_int;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_unsigned_long_long;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_cxx_cplex, ompi_mpi_cxx_dblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_cxx_ldblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_cxx_bool;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_2cplex, ompi_mpi_2dblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_char, ompi_mpi_byte;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_int, ompi_mpi_logic;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_short, ompi_mpi_long;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_float, ompi_mpi_double;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_long_double;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_cplex, ompi_mpi_packed;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_signed_char;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_unsigned_char;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_unsigned_short;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_unsigned, ompi_mpi_datatype_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_unsigned_long, ompi_mpi_ldblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_ub, ompi_mpi_lb;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_float_int, ompi_mpi_double_int;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_long_int, ompi_mpi_2int;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_short_int, ompi_mpi_dblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer, ompi_mpi_real;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_dblprec, ompi_mpi_character;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_2real, ompi_mpi_2dblprec;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_2integer, ompi_mpi_longdbl_int;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_wchar, ompi_mpi_long_long_int;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_unsigned_long_long;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_cxx_cplex, ompi_mpi_cxx_dblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_cxx_ldblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_cxx_bool;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_2cplex, ompi_mpi_2dblcplex;
|
||||
/* other MPI2 datatypes */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL1
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_logical1;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_logical1;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL2
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_logical2;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_logical2;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL4
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_logical4;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_logical4;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL8
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_logical8;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_logical8;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER1
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer1;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer1;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER2
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer2;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer2;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER4
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer4;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer4;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER8
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer8;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer8;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER16
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer16;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer16;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL2
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_real2;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real2;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL4
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_real4;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real4;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL8
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_real8;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real8;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL16
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_real16;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real16;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL4
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_complex8;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex8;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL8
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_complex16;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex16;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL16
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_complex32;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex32;
|
||||
#endif
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_errhandler_t ompi_mpi_errhandler_null;
|
||||
OMPI_DECLSPEC extern struct ompi_errhandler_t ompi_mpi_errors_are_fatal;
|
||||
OMPI_DECLSPEC extern struct ompi_errhandler_t ompi_mpi_errors_return;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_errhandler_t ompi_mpi_errhandler_null;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_errhandler_t ompi_mpi_errors_are_fatal;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_errhandler_t ompi_mpi_errors_return;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_win_t ompi_mpi_win_null;
|
||||
OMPI_DECLSPEC extern struct ompi_file_t ompi_mpi_file_null;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_win_t ompi_mpi_win_null;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_file_t ompi_mpi_file_null;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_info_t ompi_mpi_info_null;
|
||||
OMPI_DECLSPEC extern union ompi_predefined_info_t ompi_mpi_info_null;
|
||||
|
||||
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUS_IGNORE;
|
||||
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;
|
||||
@ -704,117 +709,117 @@ OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;
|
||||
/*
|
||||
* MPI predefined handles
|
||||
*/
|
||||
#define MPI_COMM_WORLD (&ompi_mpi_comm_world)
|
||||
#define MPI_COMM_SELF (&ompi_mpi_comm_self)
|
||||
#define MPI_COMM_WORLD (((MPI_Comm)&(ompi_mpi_comm_world)))
|
||||
#define MPI_COMM_SELF (((MPI_Comm)&(ompi_mpi_comm_self)))
|
||||
|
||||
#define MPI_GROUP_EMPTY (&ompi_mpi_group_empty)
|
||||
#define MPI_GROUP_EMPTY (((MPI_Group)&(ompi_mpi_group_empty)))
|
||||
|
||||
#define MPI_MAX (&ompi_mpi_op_max)
|
||||
#define MPI_MIN (&ompi_mpi_op_min)
|
||||
#define MPI_SUM (&ompi_mpi_op_sum)
|
||||
#define MPI_PROD (&ompi_mpi_op_prod)
|
||||
#define MPI_LAND (&ompi_mpi_op_land)
|
||||
#define MPI_BAND (&ompi_mpi_op_band)
|
||||
#define MPI_LOR (&ompi_mpi_op_lor)
|
||||
#define MPI_BOR (&ompi_mpi_op_bor)
|
||||
#define MPI_LXOR (&ompi_mpi_op_lxor)
|
||||
#define MPI_BXOR (&ompi_mpi_op_bxor)
|
||||
#define MPI_MAXLOC (&ompi_mpi_op_maxloc)
|
||||
#define MPI_MINLOC (&ompi_mpi_op_minloc)
|
||||
#define MPI_REPLACE (&ompi_mpi_op_replace)
|
||||
#define MPI_MAX (((MPI_Op)&(ompi_mpi_op_max)))
|
||||
#define MPI_MIN (((MPI_Op)&(ompi_mpi_op_min)))
|
||||
#define MPI_SUM (((MPI_Op)&(ompi_mpi_op_sum)))
|
||||
#define MPI_PROD (((MPI_Op)&(ompi_mpi_op_prod)))
|
||||
#define MPI_LAND (((MPI_Op)&(ompi_mpi_op_land)))
|
||||
#define MPI_BAND (((MPI_Op)&(ompi_mpi_op_band)))
|
||||
#define MPI_LOR (((MPI_Op)&(ompi_mpi_op_lor)))
|
||||
#define MPI_BOR (((MPI_Op)&(ompi_mpi_op_bor)))
|
||||
#define MPI_LXOR (((MPI_Op)&(ompi_mpi_op_lxor)))
|
||||
#define MPI_BXOR (((MPI_Op)&(ompi_mpi_op_bxor)))
|
||||
#define MPI_MAXLOC (((MPI_Op)&(ompi_mpi_op_maxloc)))
|
||||
#define MPI_MINLOC (((MPI_Op)&(ompi_mpi_op_minloc)))
|
||||
#define MPI_REPLACE (((MPI_Op)&(ompi_mpi_op_replace)))
|
||||
|
||||
/* C datatypes */
|
||||
#define MPI_DATATYPE_NULL (&ompi_mpi_datatype_null)
|
||||
#define MPI_BYTE (&ompi_mpi_byte)
|
||||
#define MPI_PACKED (&ompi_mpi_packed)
|
||||
#define MPI_CHAR (&ompi_mpi_char)
|
||||
#define MPI_SHORT (&ompi_mpi_short)
|
||||
#define MPI_INT (&ompi_mpi_int)
|
||||
#define MPI_LONG (&ompi_mpi_long)
|
||||
#define MPI_FLOAT (&ompi_mpi_float)
|
||||
#define MPI_DOUBLE (&ompi_mpi_double)
|
||||
#define MPI_LONG_DOUBLE (&ompi_mpi_long_double)
|
||||
#define MPI_UNSIGNED_CHAR (&ompi_mpi_unsigned_char)
|
||||
#define MPI_SIGNED_CHAR (&ompi_mpi_signed_char)
|
||||
#define MPI_UNSIGNED_SHORT (&ompi_mpi_unsigned_short)
|
||||
#define MPI_UNSIGNED_LONG (&ompi_mpi_unsigned_long)
|
||||
#define MPI_UNSIGNED (&ompi_mpi_unsigned)
|
||||
#define MPI_FLOAT_INT (&ompi_mpi_float_int)
|
||||
#define MPI_DOUBLE_INT (&ompi_mpi_double_int)
|
||||
#define MPI_LONG_DOUBLE_INT (&ompi_mpi_longdbl_int)
|
||||
#define MPI_LONG_INT (&ompi_mpi_long_int)
|
||||
#define MPI_SHORT_INT (&ompi_mpi_short_int)
|
||||
#define MPI_2INT (&ompi_mpi_2int)
|
||||
#define MPI_UB (&ompi_mpi_ub)
|
||||
#define MPI_LB (&ompi_mpi_lb)
|
||||
#define MPI_WCHAR (&ompi_mpi_wchar)
|
||||
#define MPI_DATATYPE_NULL (((MPI_Datatype)&(ompi_mpi_datatype_null)))
|
||||
#define MPI_BYTE (((MPI_Datatype)&(ompi_mpi_byte)))
|
||||
#define MPI_PACKED (((MPI_Datatype)&(ompi_mpi_packed)))
|
||||
#define MPI_CHAR (((MPI_Datatype)&(ompi_mpi_char)))
|
||||
#define MPI_SHORT (((MPI_Datatype)&(ompi_mpi_short)))
|
||||
#define MPI_INT (((MPI_Datatype)&(ompi_mpi_int)))
|
||||
#define MPI_LONG (((MPI_Datatype)&(ompi_mpi_long)))
|
||||
#define MPI_FLOAT (((MPI_Datatype)&(ompi_mpi_float)))
|
||||
#define MPI_DOUBLE (((MPI_Datatype)&(ompi_mpi_double)))
|
||||
#define MPI_LONG_DOUBLE (((MPI_Datatype)&(ompi_mpi_long_double)))
|
||||
#define MPI_UNSIGNED_CHAR (((MPI_Datatype)&(ompi_mpi_unsigned_char)))
|
||||
#define MPI_SIGNED_CHAR (((MPI_Datatype)&(ompi_mpi_signed_char)))
|
||||
#define MPI_UNSIGNED_SHORT (((MPI_Datatype)&(ompi_mpi_unsigned_short)))
|
||||
#define MPI_UNSIGNED_LONG (((MPI_Datatype)&(ompi_mpi_unsigned_long)))
|
||||
#define MPI_UNSIGNED (((MPI_Datatype)&(ompi_mpi_unsigned)))
|
||||
#define MPI_FLOAT_INT (((MPI_Datatype)&(ompi_mpi_float_int)))
|
||||
#define MPI_DOUBLE_INT (((MPI_Datatype)&(ompi_mpi_double_int)))
|
||||
#define MPI_LONG_DOUBLE_INT (((MPI_Datatype)&(ompi_mpi_longdbl_int)))
|
||||
#define MPI_LONG_INT (((MPI_Datatype)&(ompi_mpi_long_int)))
|
||||
#define MPI_SHORT_INT (((MPI_Datatype)&(ompi_mpi_short_int)))
|
||||
#define MPI_2INT (((MPI_Datatype)&(ompi_mpi_2int)))
|
||||
#define MPI_UB (((MPI_Datatype)&(ompi_mpi_ub)))
|
||||
#define MPI_LB (((MPI_Datatype)&(ompi_mpi_lb)))
|
||||
#define MPI_WCHAR (((MPI_Datatype)&(ompi_mpi_wchar)))
|
||||
#if OMPI_HAVE_LONG_LONG
|
||||
#define MPI_LONG_LONG_INT (&ompi_mpi_long_long_int)
|
||||
#define MPI_LONG_LONG (&ompi_mpi_long_long_int)
|
||||
#define MPI_UNSIGNED_LONG_LONG (&ompi_mpi_unsigned_long_long)
|
||||
#define MPI_LONG_LONG_INT (((MPI_Datatype)&(ompi_mpi_long_long_int)))
|
||||
#define MPI_LONG_LONG (((MPI_Datatype)&(ompi_mpi_long_long_int)))
|
||||
#define MPI_UNSIGNED_LONG_LONG (((MPI_Datatype)&(ompi_mpi_unsigned_long_long)))
|
||||
#endif /* OMPI_HAVE_LONG_LONG */
|
||||
#define MPI_2COMPLEX (&ompi_mpi_2cplex)
|
||||
#define MPI_2DOUBLE_COMPLEX (&ompi_mpi_2dblcplex)
|
||||
#define MPI_2COMPLEX (((MPI_Datatype)&(ompi_mpi_2cplex)))
|
||||
#define MPI_2DOUBLE_COMPLEX (((MPI_Datatype)&(ompi_mpi_2dblcplex)))
|
||||
|
||||
/* Fortran datatype bindings */
|
||||
#define MPI_CHARACTER (&ompi_mpi_character)
|
||||
#define MPI_LOGICAL (&ompi_mpi_logic)
|
||||
#define MPI_CHARACTER (((MPI_Datatype)&(ompi_mpi_character)))
|
||||
#define MPI_LOGICAL (((MPI_Datatype)&(ompi_mpi_logic)))
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL1
|
||||
#define MPI_LOGICAL1 (&ompi_mpi_logical1)
|
||||
#define MPI_LOGICAL1 (((MPI_Datatype)&(ompi_mpi_logical1)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL2
|
||||
#define MPI_LOGICAL2 (&ompi_mpi_logical2)
|
||||
#define MPI_LOGICAL2 (((MPI_Datatype)&(ompi_mpi_logical2)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL4
|
||||
#define MPI_LOGICAL4 (&ompi_mpi_logical4)
|
||||
#define MPI_LOGICAL4 (((MPI_Datatype)&(ompi_mpi_logical4)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL8
|
||||
#define MPI_LOGICAL8 (&ompi_mpi_logical8)
|
||||
#define MPI_LOGICAL8 (((MPI_Datatype)&(ompi_mpi_logical8)))
|
||||
#endif
|
||||
#define MPI_INTEGER (&ompi_mpi_integer)
|
||||
#define MPI_INTEGER (((MPI_Datatype)&(ompi_mpi_integer)))
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER1
|
||||
#define MPI_INTEGER1 (&ompi_mpi_integer1)
|
||||
#define MPI_INTEGER1 (((MPI_Datatype)&(ompi_mpi_integer1)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER2
|
||||
#define MPI_INTEGER2 (&ompi_mpi_integer2)
|
||||
#define MPI_INTEGER2 (((MPI_Datatype)&(ompi_mpi_integer2)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER4
|
||||
#define MPI_INTEGER4 (&ompi_mpi_integer4)
|
||||
#define MPI_INTEGER4 (((MPI_Datatype)&(ompi_mpi_integer4)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER8
|
||||
#define MPI_INTEGER8 (&ompi_mpi_integer8)
|
||||
#define MPI_INTEGER8 (((MPI_Datatype)&(ompi_mpi_integer8)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER16
|
||||
#define MPI_INTEGER16 (&ompi_mpi_integer16)
|
||||
#define MPI_INTEGER16 (((MPI_Datatype)&(ompi_mpi_integer16)))
|
||||
#endif
|
||||
#define MPI_REAL (&ompi_mpi_real)
|
||||
#define MPI_REAL (((MPI_Datatype)&(ompi_mpi_real)))
|
||||
#if OMPI_HAVE_FORTRAN_REAL4
|
||||
#define MPI_REAL4 (&ompi_mpi_real4)
|
||||
#define MPI_REAL4 (((MPI_Datatype)&(ompi_mpi_real4)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL8
|
||||
#define MPI_REAL8 (&ompi_mpi_real8)
|
||||
#define MPI_REAL8 (((MPI_Datatype)&(ompi_mpi_real8)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL16
|
||||
#define MPI_REAL16 (&ompi_mpi_real16)
|
||||
#define MPI_REAL16 (((MPI_Datatype)&(ompi_mpi_real16)))
|
||||
#endif
|
||||
#define MPI_DOUBLE_PRECISION (&ompi_mpi_dblprec)
|
||||
#define MPI_COMPLEX (&ompi_mpi_cplex)
|
||||
#define MPI_DOUBLE_PRECISION (((MPI_Datatype)&(ompi_mpi_dblprec)))
|
||||
#define MPI_COMPLEX (((MPI_Datatype)&(ompi_mpi_cplex)))
|
||||
#if OMPI_HAVE_FORTRAN_REAL4
|
||||
#define MPI_COMPLEX8 (&ompi_mpi_complex8)
|
||||
#define MPI_COMPLEX8 (((MPI_Datatype)&(ompi_mpi_complex8)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL8
|
||||
#define MPI_COMPLEX16 (&ompi_mpi_complex16)
|
||||
#define MPI_COMPLEX16 (((MPI_Datatype)&(ompi_mpi_complex16)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL16
|
||||
#define MPI_COMPLEX32 (&ompi_mpi_complex32)
|
||||
#define MPI_COMPLEX32 (((MPI_Datatype)&(ompi_mpi_complex32)))
|
||||
#endif
|
||||
#define MPI_DOUBLE_COMPLEX (&ompi_mpi_dblcplex)
|
||||
#define MPI_2REAL (&ompi_mpi_2real)
|
||||
#define MPI_2DOUBLE_PRECISION (&ompi_mpi_2dblprec)
|
||||
#define MPI_2INTEGER (&ompi_mpi_2integer)
|
||||
#define MPI_DOUBLE_COMPLEX (((MPI_Datatype)&(ompi_mpi_dblcplex)))
|
||||
#define MPI_2REAL (((MPI_Datatype)&(ompi_mpi_2real)))
|
||||
#define MPI_2DOUBLE_PRECISION (((MPI_Datatype)&(ompi_mpi_2dblprec)))
|
||||
#define MPI_2INTEGER (((MPI_Datatype)&(ompi_mpi_2integer)))
|
||||
|
||||
#define MPI_ERRORS_ARE_FATAL (&ompi_mpi_errors_are_fatal)
|
||||
#define MPI_ERRORS_RETURN (&ompi_mpi_errors_return)
|
||||
#define MPI_ERRORS_ARE_FATAL (((MPI_Errhandler)&(ompi_mpi_errors_are_fatal)))
|
||||
#define MPI_ERRORS_RETURN (((MPI_Errhandler)&(ompi_mpi_errors_return)))
|
||||
|
||||
/* Typeclass definition for MPI_Type_match_size */
|
||||
#define MPI_TYPECLASS_INTEGER 1
|
||||
|
@ -11,6 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2008 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -960,7 +961,7 @@ int ompi_comm_free ( ompi_communicator_t **comm )
|
||||
COMM_NULL. This is according to MPI-2:88-89. */
|
||||
|
||||
if (*comm == ompi_mpi_comm_parent && comm != &ompi_mpi_comm_parent) {
|
||||
ompi_mpi_comm_parent = &ompi_mpi_comm_null;
|
||||
ompi_mpi_comm_parent = &ompi_mpi_comm_null.comm;
|
||||
}
|
||||
|
||||
/* Release the communicator */
|
||||
|
@ -13,6 +13,7 @@
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007 Voltaire All rights reserved.
|
||||
* Copyright (c) 2006-2008 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -26,6 +27,7 @@
|
||||
#include "opal/util/convert.h"
|
||||
#include "orte/types.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "ompi/op/op.h"
|
||||
#include "ompi/proc/proc.h"
|
||||
#include "ompi/constants.h"
|
||||
#include "opal/class/opal_pointer_array.h"
|
||||
@ -497,8 +499,8 @@ static int ompi_comm_allreduce_inter ( int *inbuf, int *outbuf,
|
||||
int *rcounts=NULL, scount=0;
|
||||
int *rdisps=NULL;
|
||||
|
||||
if ( &ompi_mpi_op_sum != op && &ompi_mpi_op_prod != op &&
|
||||
&ompi_mpi_op_max != op && &ompi_mpi_op_min != op ) {
|
||||
if ( &ompi_mpi_op_sum.op != op && &ompi_mpi_op_prod.op != op &&
|
||||
&ompi_mpi_op_max.op != op && &ompi_mpi_op_min.op != op ) {
|
||||
return MPI_ERR_OP;
|
||||
}
|
||||
|
||||
@ -552,22 +554,22 @@ static int ompi_comm_allreduce_inter ( int *inbuf, int *outbuf,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if ( &ompi_mpi_op_max == op ) {
|
||||
if ( &ompi_mpi_op_max.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
if (tmpbuf[i] > outbuf[i]) outbuf[i] = tmpbuf[i];
|
||||
}
|
||||
}
|
||||
else if ( &ompi_mpi_op_min == op ) {
|
||||
else if ( &ompi_mpi_op_min.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
if (tmpbuf[i] < outbuf[i]) outbuf[i] = tmpbuf[i];
|
||||
}
|
||||
}
|
||||
else if ( &ompi_mpi_op_sum == op ) {
|
||||
else if ( &ompi_mpi_op_sum.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
outbuf[i] += tmpbuf[i];
|
||||
}
|
||||
}
|
||||
else if ( &ompi_mpi_op_prod == op ) {
|
||||
else if ( &ompi_mpi_op_prod.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
outbuf[i] *= tmpbuf[i];
|
||||
}
|
||||
@ -620,8 +622,8 @@ static int ompi_comm_allreduce_intra_bridge (int *inbuf, int *outbuf,
|
||||
local_leader = (*((int*)lleader));
|
||||
remote_leader = (*((int*)rleader));
|
||||
|
||||
if ( &ompi_mpi_op_sum != op && &ompi_mpi_op_prod != op &&
|
||||
&ompi_mpi_op_max != op && &ompi_mpi_op_min != op ) {
|
||||
if ( &ompi_mpi_op_sum.op != op && &ompi_mpi_op_prod.op != op &&
|
||||
&ompi_mpi_op_max.op != op && &ompi_mpi_op_min.op != op ) {
|
||||
return MPI_ERR_OP;
|
||||
}
|
||||
|
||||
@ -659,22 +661,22 @@ static int ompi_comm_allreduce_intra_bridge (int *inbuf, int *outbuf,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if ( &ompi_mpi_op_max == op ) {
|
||||
if ( &ompi_mpi_op_max.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
if (tmpbuf[i] > outbuf[i]) outbuf[i] = tmpbuf[i];
|
||||
}
|
||||
}
|
||||
else if ( &ompi_mpi_op_min == op ) {
|
||||
else if ( &ompi_mpi_op_min.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
if (tmpbuf[i] < outbuf[i]) outbuf[i] = tmpbuf[i];
|
||||
}
|
||||
}
|
||||
else if ( &ompi_mpi_op_sum == op ) {
|
||||
else if ( &ompi_mpi_op_sum.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
outbuf[i] += tmpbuf[i];
|
||||
}
|
||||
}
|
||||
else if ( &ompi_mpi_op_prod == op ) {
|
||||
else if ( &ompi_mpi_op_prod.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
outbuf[i] *= tmpbuf[i];
|
||||
}
|
||||
@ -718,8 +720,8 @@ static int ompi_comm_allreduce_intra_oob (int *inbuf, int *outbuf,
|
||||
remote_leader = (orte_process_name_t*)rleader;
|
||||
size_count = count;
|
||||
|
||||
if ( &ompi_mpi_op_sum != op && &ompi_mpi_op_prod != op &&
|
||||
&ompi_mpi_op_max != op && &ompi_mpi_op_min != op ) {
|
||||
if ( &ompi_mpi_op_sum.op != op && &ompi_mpi_op_prod.op != op &&
|
||||
&ompi_mpi_op_max.op != op && &ompi_mpi_op_min.op != op ) {
|
||||
return MPI_ERR_OP;
|
||||
}
|
||||
|
||||
@ -773,22 +775,22 @@ static int ompi_comm_allreduce_intra_oob (int *inbuf, int *outbuf,
|
||||
OBJ_RELEASE(rbuf);
|
||||
count = (int)size_count;
|
||||
|
||||
if ( &ompi_mpi_op_max == op ) {
|
||||
if ( &ompi_mpi_op_max.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
if (tmpbuf[i] > outbuf[i]) outbuf[i] = tmpbuf[i];
|
||||
}
|
||||
}
|
||||
else if ( &ompi_mpi_op_min == op ) {
|
||||
else if ( &ompi_mpi_op_min.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
if (tmpbuf[i] < outbuf[i]) outbuf[i] = tmpbuf[i];
|
||||
}
|
||||
}
|
||||
else if ( &ompi_mpi_op_sum == op ) {
|
||||
else if ( &ompi_mpi_op_sum.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
outbuf[i] += tmpbuf[i];
|
||||
}
|
||||
}
|
||||
else if ( &ompi_mpi_op_prod == op ) {
|
||||
else if ( &ompi_mpi_op_prod.op == op ) {
|
||||
for ( i = 0 ; i < count; i++ ) {
|
||||
outbuf[i] *= tmpbuf[i];
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2007 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -43,9 +44,9 @@
|
||||
*/
|
||||
opal_pointer_array_t ompi_mpi_communicators;
|
||||
|
||||
ompi_communicator_t ompi_mpi_comm_world;
|
||||
ompi_communicator_t ompi_mpi_comm_self;
|
||||
ompi_communicator_t ompi_mpi_comm_null;
|
||||
ompi_predefined_communicator_t ompi_mpi_comm_world;
|
||||
ompi_predefined_communicator_t ompi_mpi_comm_self;
|
||||
ompi_predefined_communicator_t ompi_mpi_comm_null;
|
||||
ompi_communicator_t *ompi_mpi_comm_parent;
|
||||
|
||||
static void ompi_comm_construct(ompi_communicator_t* comm);
|
||||
@ -84,31 +85,31 @@ int ompi_comm_init(void)
|
||||
ompi_set_group_rank(group, ompi_proc_local());
|
||||
ompi_group_increment_proc_count (group);
|
||||
|
||||
ompi_mpi_comm_world.c_contextid = 0;
|
||||
ompi_mpi_comm_world.c_id_start_index = 4;
|
||||
ompi_mpi_comm_world.c_id_available = 4;
|
||||
ompi_mpi_comm_world.c_f_to_c_index = 0;
|
||||
ompi_mpi_comm_world.c_my_rank = group->grp_my_rank;
|
||||
ompi_mpi_comm_world.c_local_group = group;
|
||||
ompi_mpi_comm_world.c_remote_group = group;
|
||||
OBJ_RETAIN(ompi_mpi_comm_world.c_remote_group);
|
||||
ompi_mpi_comm_world.c_cube_dim = opal_cube_dim((int)size);
|
||||
ompi_mpi_comm_world.error_handler = &ompi_mpi_errors_are_fatal;
|
||||
OBJ_RETAIN( &ompi_mpi_errors_are_fatal );
|
||||
OMPI_COMM_SET_PML_ADDED(&ompi_mpi_comm_world);
|
||||
ompi_mpi_comm_world.comm.c_contextid = 0;
|
||||
ompi_mpi_comm_world.comm.c_id_start_index = 4;
|
||||
ompi_mpi_comm_world.comm.c_id_available = 4;
|
||||
ompi_mpi_comm_world.comm.c_f_to_c_index = 0;
|
||||
ompi_mpi_comm_world.comm.c_my_rank = group->grp_my_rank;
|
||||
ompi_mpi_comm_world.comm.c_local_group = group;
|
||||
ompi_mpi_comm_world.comm.c_remote_group = group;
|
||||
OBJ_RETAIN(ompi_mpi_comm_world.comm.c_remote_group);
|
||||
ompi_mpi_comm_world.comm.c_cube_dim = opal_cube_dim((int)size);
|
||||
ompi_mpi_comm_world.comm.error_handler = &ompi_mpi_errors_are_fatal.eh;
|
||||
OBJ_RETAIN( &ompi_mpi_errors_are_fatal.eh );
|
||||
OMPI_COMM_SET_PML_ADDED(&ompi_mpi_comm_world.comm);
|
||||
opal_pointer_array_set_item (&ompi_mpi_communicators, 0, &ompi_mpi_comm_world);
|
||||
|
||||
MEMCHECKER (memset (ompi_mpi_comm_world.c_name, 0, MPI_MAX_OBJECT_NAME));
|
||||
strncpy (ompi_mpi_comm_world.c_name, "MPI_COMM_WORLD",
|
||||
MEMCHECKER (memset (ompi_mpi_comm_world.comm.c_name, 0, MPI_MAX_OBJECT_NAME));
|
||||
strncpy (ompi_mpi_comm_world.comm.c_name, "MPI_COMM_WORLD",
|
||||
strlen("MPI_COMM_WORLD")+1 );
|
||||
ompi_mpi_comm_world.c_flags |= OMPI_COMM_NAMEISSET;
|
||||
ompi_mpi_comm_world.c_flags |= OMPI_COMM_INTRINSIC;
|
||||
ompi_mpi_comm_world.comm.c_flags |= OMPI_COMM_NAMEISSET;
|
||||
ompi_mpi_comm_world.comm.c_flags |= OMPI_COMM_INTRINSIC;
|
||||
|
||||
/* We have to create a hash (although it is legal to leave this
|
||||
filed NULL -- the attribute accessor functions will intepret
|
||||
this as "there are no attributes cached on this object")
|
||||
because MPI_COMM_WORLD has some predefined attributes. */
|
||||
ompi_attr_hash_init(&ompi_mpi_comm_world.c_keyhash);
|
||||
ompi_attr_hash_init(&ompi_mpi_comm_world.comm.c_keyhash);
|
||||
|
||||
/* Setup MPI_COMM_SELF */
|
||||
OBJ_CONSTRUCT(&ompi_mpi_comm_self, ompi_communicator_t);
|
||||
@ -119,54 +120,54 @@ int ompi_comm_init(void)
|
||||
OMPI_GROUP_SET_INTRINSIC (group);
|
||||
OMPI_GROUP_SET_DENSE (group);
|
||||
|
||||
ompi_mpi_comm_self.c_contextid = 1;
|
||||
ompi_mpi_comm_self.c_f_to_c_index = 1;
|
||||
ompi_mpi_comm_self.c_id_start_index = 20;
|
||||
ompi_mpi_comm_self.c_id_available = 20;
|
||||
ompi_mpi_comm_self.c_my_rank = group->grp_my_rank;
|
||||
ompi_mpi_comm_self.c_local_group = group;
|
||||
ompi_mpi_comm_self.c_remote_group = group;
|
||||
OBJ_RETAIN(ompi_mpi_comm_self.c_remote_group);
|
||||
ompi_mpi_comm_self.error_handler = &ompi_mpi_errors_are_fatal;
|
||||
OBJ_RETAIN( &ompi_mpi_errors_are_fatal );
|
||||
OMPI_COMM_SET_PML_ADDED(&ompi_mpi_comm_self);
|
||||
ompi_mpi_comm_self.comm.c_contextid = 1;
|
||||
ompi_mpi_comm_self.comm.c_f_to_c_index = 1;
|
||||
ompi_mpi_comm_self.comm.c_id_start_index = 20;
|
||||
ompi_mpi_comm_self.comm.c_id_available = 20;
|
||||
ompi_mpi_comm_self.comm.c_my_rank = group->grp_my_rank;
|
||||
ompi_mpi_comm_self.comm.c_local_group = group;
|
||||
ompi_mpi_comm_self.comm.c_remote_group = group;
|
||||
OBJ_RETAIN(ompi_mpi_comm_self.comm.c_remote_group);
|
||||
ompi_mpi_comm_self.comm.error_handler = &ompi_mpi_errors_are_fatal.eh;
|
||||
OBJ_RETAIN( &ompi_mpi_errors_are_fatal.eh );
|
||||
OMPI_COMM_SET_PML_ADDED(&ompi_mpi_comm_self.comm);
|
||||
opal_pointer_array_set_item (&ompi_mpi_communicators, 1, &ompi_mpi_comm_self);
|
||||
|
||||
MEMCHECKER (memset (ompi_mpi_comm_self.c_name, 0, MPI_MAX_OBJECT_NAME));
|
||||
strncpy(ompi_mpi_comm_self.c_name,"MPI_COMM_SELF",strlen("MPI_COMM_SELF")+1);
|
||||
ompi_mpi_comm_self.c_flags |= OMPI_COMM_NAMEISSET;
|
||||
ompi_mpi_comm_self.c_flags |= OMPI_COMM_INTRINSIC;
|
||||
MEMCHECKER (memset (ompi_mpi_comm_self.comm.c_name, 0, MPI_MAX_OBJECT_NAME));
|
||||
strncpy(ompi_mpi_comm_self.comm.c_name,"MPI_COMM_SELF",strlen("MPI_COMM_SELF")+1);
|
||||
ompi_mpi_comm_self.comm.c_flags |= OMPI_COMM_NAMEISSET;
|
||||
ompi_mpi_comm_self.comm.c_flags |= OMPI_COMM_INTRINSIC;
|
||||
|
||||
/* We can set MPI_COMM_SELF's keyhash to NULL because it has no
|
||||
predefined attributes. If a user defines an attribute on
|
||||
MPI_COMM_SELF, the keyhash will automatically be created. */
|
||||
ompi_mpi_comm_self.c_keyhash = NULL;
|
||||
ompi_mpi_comm_self.comm.c_keyhash = NULL;
|
||||
|
||||
/* Setup MPI_COMM_NULL */
|
||||
OBJ_CONSTRUCT(&ompi_mpi_comm_null, ompi_communicator_t);
|
||||
ompi_mpi_comm_null.c_local_group = &ompi_mpi_group_null;
|
||||
ompi_mpi_comm_null.c_remote_group = &ompi_mpi_group_null;
|
||||
OBJ_RETAIN(&ompi_mpi_group_null);
|
||||
OBJ_RETAIN(&ompi_mpi_group_null);
|
||||
ompi_mpi_comm_null.comm.c_local_group = &ompi_mpi_group_null.group;
|
||||
ompi_mpi_comm_null.comm.c_remote_group = &ompi_mpi_group_null.group;
|
||||
OBJ_RETAIN(&ompi_mpi_group_null.group);
|
||||
OBJ_RETAIN(&ompi_mpi_group_null.group);
|
||||
|
||||
ompi_mpi_comm_null.c_contextid = 2;
|
||||
ompi_mpi_comm_null.c_f_to_c_index = 2;
|
||||
ompi_mpi_comm_null.c_my_rank = MPI_PROC_NULL;
|
||||
ompi_mpi_comm_null.comm.c_contextid = 2;
|
||||
ompi_mpi_comm_null.comm.c_f_to_c_index = 2;
|
||||
ompi_mpi_comm_null.comm.c_my_rank = MPI_PROC_NULL;
|
||||
|
||||
ompi_mpi_comm_null.error_handler = &ompi_mpi_errors_are_fatal;
|
||||
OBJ_RETAIN( &ompi_mpi_errors_are_fatal );
|
||||
ompi_mpi_comm_null.comm.error_handler = &ompi_mpi_errors_are_fatal.eh;
|
||||
OBJ_RETAIN( &ompi_mpi_errors_are_fatal.eh );
|
||||
opal_pointer_array_set_item (&ompi_mpi_communicators, 2, &ompi_mpi_comm_null);
|
||||
|
||||
MEMCHECKER (memset (ompi_mpi_comm_null.c_name, 0, MPI_MAX_OBJECT_NAME));
|
||||
strncpy(ompi_mpi_comm_null.c_name,"MPI_COMM_NULL",strlen("MPI_COMM_NULL")+1);
|
||||
ompi_mpi_comm_null.c_flags |= OMPI_COMM_NAMEISSET;
|
||||
ompi_mpi_comm_null.c_flags |= OMPI_COMM_INTRINSIC;
|
||||
MEMCHECKER (memset (ompi_mpi_comm_null.comm.c_name, 0, MPI_MAX_OBJECT_NAME));
|
||||
strncpy(ompi_mpi_comm_null.comm.c_name,"MPI_COMM_NULL",strlen("MPI_COMM_NULL")+1);
|
||||
ompi_mpi_comm_null.comm.c_flags |= OMPI_COMM_NAMEISSET;
|
||||
ompi_mpi_comm_null.comm.c_flags |= OMPI_COMM_INTRINSIC;
|
||||
|
||||
/* Initialize the parent communicator to MPI_COMM_NULL */
|
||||
ompi_mpi_comm_parent = &ompi_mpi_comm_null;
|
||||
ompi_mpi_comm_parent = &ompi_mpi_comm_null.comm;
|
||||
OBJ_RETAIN(&ompi_mpi_comm_null);
|
||||
OBJ_RETAIN(&ompi_mpi_group_null);
|
||||
OBJ_RETAIN(&ompi_mpi_errors_are_fatal);
|
||||
OBJ_RETAIN(&ompi_mpi_group_null.group);
|
||||
OBJ_RETAIN(&ompi_mpi_errors_are_fatal.eh);
|
||||
|
||||
/* initialize the comm_reg stuff for multi-threaded comm_cid
|
||||
allocation */
|
||||
@ -216,7 +217,7 @@ int ompi_comm_finalize(void)
|
||||
OBJ_DESTRUCT( &ompi_mpi_comm_world );
|
||||
|
||||
/* Shut down the parent communicator, if it exists */
|
||||
if( ompi_mpi_comm_parent != &ompi_mpi_comm_null ) {
|
||||
if( ompi_mpi_comm_parent != &ompi_mpi_comm_null.comm ) {
|
||||
/* Note that we pass ompi_mpi_comm_parent here
|
||||
(vs. &ompi_mpi_comm_parent) because it is of type
|
||||
(ompi_communicator_t*), *NOT* (ompi_communicator_t). This
|
||||
|
@ -12,6 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2008 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -104,7 +105,7 @@ struct ompi_communicator_t {
|
||||
int c_id_available; /* the currently available Cid for allocation
|
||||
to a child*/
|
||||
int c_id_start_index; /* the starting index of the block of cids
|
||||
allocated to tthis communicator*/
|
||||
allocated to this communicator*/
|
||||
|
||||
ompi_group_t *c_local_group;
|
||||
ompi_group_t *c_remote_group;
|
||||
@ -156,8 +157,79 @@ struct ompi_communicator_t {
|
||||
mca_coll_base_comm_coll_t c_coll;
|
||||
};
|
||||
typedef struct ompi_communicator_t ompi_communicator_t;
|
||||
|
||||
/**
|
||||
* Padded struct to maintain back compatibiltiy.
|
||||
*
|
||||
* The following ompi_predefined_xxx_t structure is used to maintain
|
||||
* backwards binary compatibility for MPI applications compiled
|
||||
* against one version of OMPI library but dynamically linked at
|
||||
* runtime with another. The issue is between versions the actual
|
||||
* structure may change in size (even between debug and optimized
|
||||
* compilation -- the structure contents change, and therefore the
|
||||
* overall size changes).
|
||||
*
|
||||
* This is problematic with predefined handles because the storage of
|
||||
* the structure ends up being located to an application's BSS. This
|
||||
* causes problems because if one version has the predefined as size X
|
||||
* and then the application is dynamically linked with a version that
|
||||
* has a size of Y (where X != Y) then the application will
|
||||
* unintentionally overrun the memory initially allocated for the
|
||||
* structure.
|
||||
*
|
||||
* The solution we are using below creates a parent structure
|
||||
* (ompi_predefined_xxx_t) that contains the base structure
|
||||
* (ompi_xxx_t) followed by a character padding that is the size of
|
||||
* the total size we choose to preallocate for the structure minus the
|
||||
* amount used by the base structure. In this way, we've normalized
|
||||
* the size of each predefined handle across multiple versions and
|
||||
* configurations of Open MPI (e.g., MPI_COMM_WORLD will refer to a
|
||||
* back-end struct that is X bytes long, even if we change the
|
||||
* back-end ompi_communicator_t between version A.B and version C.D in
|
||||
* Open MPI). When we come close to filling up the the padding we can
|
||||
* add a pointer at the back end of the base structure to point to an
|
||||
* extension of the type. Or we can just increase the padding and
|
||||
* break backwards binary compatibility.
|
||||
*
|
||||
* The above method was decided after several failed attempts
|
||||
* described below.
|
||||
*
|
||||
* - Original implementation - suffered that the base structure seemed
|
||||
* to always change in size between Open MPI versions and/or
|
||||
* configurations (e.g., optimized vs. debugging build).
|
||||
*
|
||||
* - Convert all predefined handles to run-time-assigned pointers
|
||||
* (i.e., global variables) - This worked except in cases where an MPI
|
||||
* application wanted to assign the predefined handle value to a
|
||||
* global variable -- we could not guarantee to have the global
|
||||
* variable filled until MPI_INIT was called (recall that MPI
|
||||
* predefined handles must be assignable before MPI_INIT; e.g.,
|
||||
* "MPI_Comm foo = MPI_COMM_WORLD").
|
||||
*
|
||||
* - union of struct and padding - Similar to current implementation
|
||||
* except using a union for the parent. This worked except in cases
|
||||
* where the compilers did not support C99 union static initalizers.
|
||||
* It would have been a pain to convert a bunch of the code to use
|
||||
* non-static initializers (e.g., MPI datatypes).
|
||||
*/
|
||||
|
||||
/* Define for the preallocated size of the predefined handle.
|
||||
* Note that we are using a pointer type as the base memory chunk
|
||||
* size so when the bitness changes the size of the handle changes.
|
||||
* This is done so we don't end up needing a structure that is
|
||||
* incredibly larger than necessary because of the bitness.
|
||||
*/
|
||||
#define PREDEFINED_COMMUNICATOR_PAD (sizeof(void*) * 96)
|
||||
|
||||
struct ompi_predefined_communicator_t {
|
||||
struct ompi_communicator_t comm;
|
||||
char padding[PREDEFINED_COMMUNICATOR_PAD - sizeof(ompi_communicator_t)];
|
||||
};
|
||||
typedef struct ompi_predefined_communicator_t ompi_predefined_communicator_t;
|
||||
|
||||
OMPI_DECLSPEC extern ompi_communicator_t *ompi_mpi_comm_parent;
|
||||
OMPI_DECLSPEC extern ompi_communicator_t ompi_mpi_comm_null;
|
||||
OMPI_DECLSPEC extern ompi_predefined_communicator_t ompi_mpi_comm_null;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -95,15 +96,15 @@ typedef struct dt_type_desc {
|
||||
*/
|
||||
typedef struct ompi_datatype_t {
|
||||
opal_object_t super; /**< basic superclass */
|
||||
uint16_t flags; /**< the flags */
|
||||
uint16_t id; /**< data id, normally the index in the data array. */
|
||||
size_t size; /**< total size in bytes of the memory used by the data if
|
||||
* the data is put on a contiguous buffer */
|
||||
uint32_t align; /**< data should be aligned to */
|
||||
the data is put on a contiguous buffer */
|
||||
ptrdiff_t true_lb;
|
||||
ptrdiff_t true_ub; /**< the true ub of the data without user defined lb and ub */
|
||||
ptrdiff_t lb; /**< lower bound in memory */
|
||||
ptrdiff_t ub; /**< upper bound in memory */
|
||||
uint16_t flags; /**< the flags */
|
||||
uint16_t id; /**< data id, normally the index in the data array. */
|
||||
uint32_t align; /**< data should be aligned to */
|
||||
uint32_t nbElems; /**< total number of elements inside the datatype */
|
||||
uint64_t bdt_used; /**< which basic datatypes are used in the data description */
|
||||
|
||||
@ -124,6 +125,25 @@ typedef struct ompi_datatype_t {
|
||||
|
||||
OMPI_DECLSPEC OBJ_CLASS_DECLARATION( ompi_datatype_t );
|
||||
|
||||
/**
|
||||
* Padded struct to maintain back compatibiltiy.
|
||||
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
|
||||
* for full explanation why we chose the following padding construct for predefines.
|
||||
*/
|
||||
|
||||
/* Using set constant for padding of the DATATYPE handles because the size of
|
||||
* base structure is very close to being the same no matter the bitness.
|
||||
*/
|
||||
#define PREDEFINED_DATATYPE_PAD (512)
|
||||
|
||||
struct ompi_predefined_datatype_t {
|
||||
struct ompi_datatype_t dt;
|
||||
char padding[PREDEFINED_DATATYPE_PAD - sizeof(ompi_datatype_t)];
|
||||
};
|
||||
|
||||
typedef struct ompi_predefined_datatype_t ompi_predefined_datatype_t;
|
||||
|
||||
|
||||
int ompi_ddt_register_params(void);
|
||||
OMPI_DECLSPEC int32_t ompi_ddt_init( void );
|
||||
OMPI_DECLSPEC int32_t ompi_ddt_finalize( void );
|
||||
|
@ -10,6 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -75,7 +76,7 @@ int32_t ompi_ddt_create_contiguous( int count, const ompi_datatype_t* oldType,
|
||||
|
||||
if( 0 == count ) {
|
||||
pdt = ompi_ddt_create( 0 );
|
||||
ompi_ddt_add( pdt, &ompi_mpi_datatype_null, 0, 0, 0 );
|
||||
ompi_ddt_add( pdt, &ompi_mpi_datatype_null.dt, 0, 0, 0 );
|
||||
} else {
|
||||
pdt = ompi_ddt_create( oldType->desc.used + 2 );
|
||||
ompi_ddt_add( pdt, oldType, count, 0, (oldType->ub - oldType->lb) );
|
||||
|
@ -10,6 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -31,7 +32,7 @@ int32_t ompi_ddt_create_indexed( int count, const int* pBlockLength, const int*
|
||||
|
||||
if( 0 == count ) {
|
||||
*newType = ompi_ddt_create( 0 );
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null, 0, 0, 0);
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null.dt, 0, 0, 0);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -73,7 +74,7 @@ int32_t ompi_ddt_create_hindexed( int count, const int* pBlockLength, const MPI_
|
||||
|
||||
if( 0 == count ) {
|
||||
*newType = ompi_ddt_create( 0 );
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null, 0, 0, 0);
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null.dt, 0, 0, 0);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -114,7 +115,7 @@ int32_t ompi_ddt_create_indexed_block( int count, int bLength, const int* pDisp,
|
||||
if( (count == 0) || (bLength == 0) ) {
|
||||
*newType = ompi_ddt_create(1);
|
||||
if( 0 == count )
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null, 0, 0, 0 );
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null.dt, 0, 0, 0 );
|
||||
else
|
||||
ompi_ddt_add( *newType, oldType, 0, pDisp[0] * extent, extent );
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -10,6 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -31,7 +32,7 @@ int32_t ompi_ddt_create_struct( int count, const int* pBlockLength, const MPI_Ai
|
||||
|
||||
if( 0 == count ) {
|
||||
*newType = ompi_ddt_create( 0 );
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null, 0, 0, 0);
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null.dt, 0, 0, 0);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -35,7 +37,7 @@ int32_t ompi_ddt_create_vector( int count, int bLength, int stride,
|
||||
|
||||
if( 0 == count ) {
|
||||
*newType = ompi_ddt_create( 0 );
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null, 0, 0, 0);
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null.dt, 0, 0, 0);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -65,7 +67,7 @@ int32_t ompi_ddt_create_hvector( int count, int bLength, MPI_Aint stride,
|
||||
|
||||
if( 0 == count ) {
|
||||
*newType = ompi_ddt_create( 0 );
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null, 0, 0, 0);
|
||||
ompi_ddt_add( *newType, &ompi_mpi_datatype_null.dt, 0, 0, 0);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -47,5 +48,5 @@ ompi_ddt_match_size( int size, uint16_t datakind, uint16_t datalang )
|
||||
return datatype;
|
||||
}
|
||||
}
|
||||
return &ompi_mpi_datatype_null;
|
||||
return &ompi_mpi_datatype_null.dt;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -53,37 +54,35 @@ int ompi_ddt_dfd = -1;
|
||||
* correct information. This macro should be used for all composed types.
|
||||
*/
|
||||
#define INIT_BASIC_TYPE( TYPE, NAME ) \
|
||||
{ BASEOBJ_DATA, 0/*size*/, 0 /*align*/, 0/*true_lb*/, 0/*true_ub*/, \
|
||||
0/*lb*/, 0/*ub*/, DT_FLAG_PREDEFINED, TYPE, 1, \
|
||||
{ BASEOBJ_DATA, DT_FLAG_PREDEFINED, TYPE, 0/*size*/, \
|
||||
0/*true_lb*/, 0/*true_ub*/, 0/*lb*/, 0/*ub*/, 0 /* align */, 1, \
|
||||
(((uint64_t)1)<<(TYPE)), EMPTY_DATA(NAME) }
|
||||
|
||||
#define INIT_BASIC_DATA( TYPE, ALIGN, NAME, FLAGS ) \
|
||||
{ BASEOBJ_DATA, sizeof(TYPE), ALIGN, 0, sizeof(TYPE), \
|
||||
0, sizeof(TYPE), DT_FLAG_BASIC | (FLAGS), \
|
||||
DT_##NAME, 1, (((uint64_t)1)<<(DT_##NAME)), EMPTY_DATA(NAME) }
|
||||
#define INIT_BASIC_DATA( TYPE, ALIGN, NAME, FLAGS ) \
|
||||
{ BASEOBJ_DATA, DT_FLAG_BASIC | (FLAGS), DT_##NAME, sizeof(TYPE), 0, \
|
||||
sizeof(TYPE), 0, sizeof(TYPE), (ALIGN), \
|
||||
1, (((uint64_t)1)<<(DT_##NAME)), EMPTY_DATA(NAME) }
|
||||
|
||||
#define INIT_BASIC_DATA_WITH_NAME( TYPE, ALIGN, INTERNAL_NAME, NAME, FLAGS ) \
|
||||
{ BASEOBJ_DATA, sizeof(TYPE), ALIGN, 0, sizeof(TYPE), \
|
||||
0, sizeof(TYPE), DT_FLAG_BASIC | (FLAGS), \
|
||||
DT_##INTERNAL_NAME, 1, (((uint64_t)1)<<(DT_##INTERNAL_NAME)), \
|
||||
EMPTY_DATA(NAME) }
|
||||
#define INIT_BASIC_DATA_WITH_NAME( TYPE, ALIGN, INTERNAL_NAME, NAME, FLAGS ) \
|
||||
{ BASEOBJ_DATA, DT_FLAG_BASIC | (FLAGS),DT_##INTERNAL_NAME, sizeof(TYPE), \
|
||||
0, sizeof(TYPE), 0, sizeof(TYPE), (ALIGN), \
|
||||
1, (((uint64_t)1)<<(DT_##INTERNAL_NAME)), EMPTY_DATA(NAME) }
|
||||
|
||||
#define INIT_UNAVAILABLE_DATA( NAME ) \
|
||||
{ BASEOBJ_DATA, 0, 0, 0, 0, 0, 0, DT_FLAG_UNAVAILABLE | DT_FLAG_PREDEFINED, \
|
||||
DT_UNAVAILABLE, 1, 0, EMPTY_DATA( "UNAVAILABLE_" # NAME ) }
|
||||
{ BASEOBJ_DATA, DT_FLAG_UNAVAILABLE | DT_FLAG_PREDEFINED, DT_UNAVAILABLE, 0,\
|
||||
0, 0, 0, 0, 0, 1, 0, EMPTY_DATA( "UNAVAILABLE_" # NAME ) }
|
||||
|
||||
/* The upper bound and the true UB are set to the size of the datatype.
|
||||
* If it's not the case then they should be modified in the initialization
|
||||
* function.
|
||||
*/
|
||||
#if OMPI_WANT_F77_BINDINGS
|
||||
#define INIT_BASIC_FORTRAN_TYPE( TYPE, NAME, SIZE, ALIGN, FLAGS ) \
|
||||
{ BASEOBJ_DATA, SIZE, ALIGN, 0/*true_lb*/, SIZE/*true_ub*/, \
|
||||
0/*lb*/, SIZE/*ub*/, \
|
||||
DT_FLAG_BASIC | DT_FLAG_DATA_FORTRAN | (FLAGS), \
|
||||
(TYPE), 1, (((uint64_t)1)<<(TYPE)), EMPTY_DATA(NAME) }
|
||||
#define INIT_BASIC_FORTRAN_TYPE( TYPE, NAME, SIZE, ALIGN, FLAGS ) \
|
||||
{ BASEOBJ_DATA, DT_FLAG_BASIC | DT_FLAG_DATA_FORTRAN | (FLAGS), \
|
||||
(TYPE), SIZE, 0/*true_lb*/, SIZE/*true_ub*/, 0/*lb*/, SIZE/*ub*/, \
|
||||
(ALIGN), 1, (((uint64_t)1)<<(TYPE)), EMPTY_DATA(NAME) }
|
||||
#else
|
||||
#define INIT_BASIC_FORTRAN_TYPE( TYPE, NAME, SIZE, ALIGN, FLAGS ) \
|
||||
#define INIT_BASIC_FORTRAN_TYPE( TYPE, NAME, SIZE, ALIGN, FLAGS ) \
|
||||
INIT_BASIC_TYPE( TYPE, NAME )
|
||||
#endif /* OMPI_WANT_F77_BINDINGS */
|
||||
|
||||
@ -93,170 +92,169 @@ int ompi_ddt_dfd = -1;
|
||||
*/
|
||||
int32_t ompi_ddt_number_of_predefined_data = 0;
|
||||
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_datatype_null =
|
||||
{ BASEOBJ_DATA, 0, 0, 0, 0,
|
||||
0, 0, DT_FLAG_PREDEFINED, 0, 1,
|
||||
((long long)0), EMPTY_DATA(DATATYPE_NULL) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_datatype_null = {
|
||||
{ BASEOBJ_DATA, DT_FLAG_PREDEFINED, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, ((long long)0), EMPTY_DATA(DATATYPE_NULL) }};
|
||||
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_loop = INIT_BASIC_TYPE( DT_LOOP, LOOP );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_end_loop = INIT_BASIC_TYPE( DT_END_LOOP, END_LOOP );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_ub = INIT_BASIC_TYPE( DT_UB, UB );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_lb = INIT_BASIC_TYPE( DT_LB, LB );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_char = INIT_BASIC_DATA( char, OMPI_ALIGNMENT_CHAR, CHAR, DT_FLAG_DATA_C );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_character = INIT_BASIC_DATA( char, OMPI_ALIGNMENT_CHAR, CHARACTER, DT_FLAG_DATA_FORTRAN );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_unsigned_char = INIT_BASIC_DATA( unsigned char, OMPI_ALIGNMENT_CHAR, UNSIGNED_CHAR, DT_FLAG_DATA_C );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_signed_char = INIT_BASIC_DATA( signed char, OMPI_ALIGNMENT_CHAR, SIGNED_CHAR, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_byte = INIT_BASIC_DATA( unsigned char, OMPI_ALIGNMENT_CHAR, BYTE, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_short = INIT_BASIC_DATA( short, OMPI_ALIGNMENT_SHORT, SHORT, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_unsigned_short = INIT_BASIC_DATA( unsigned short, OMPI_ALIGNMENT_SHORT, UNSIGNED_SHORT, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_int = INIT_BASIC_DATA( int, OMPI_ALIGNMENT_INT, INT, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_unsigned = INIT_BASIC_DATA_WITH_NAME( unsigned int, OMPI_ALIGNMENT_INT, UNSIGNED_INT, UNSIGNED, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_long = INIT_BASIC_DATA( long, OMPI_ALIGNMENT_LONG, LONG, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_unsigned_long = INIT_BASIC_DATA( unsigned long, OMPI_ALIGNMENT_LONG, UNSIGNED_LONG, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_ub = { INIT_BASIC_TYPE( DT_UB, UB) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_lb = { INIT_BASIC_TYPE( DT_LB, LB) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_char = { INIT_BASIC_DATA( char, OMPI_ALIGNMENT_CHAR, CHAR, DT_FLAG_DATA_C ) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_character = { INIT_BASIC_DATA( char, OMPI_ALIGNMENT_CHAR, CHARACTER, DT_FLAG_DATA_FORTRAN) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_unsigned_char = { INIT_BASIC_DATA( unsigned char, OMPI_ALIGNMENT_CHAR, UNSIGNED_CHAR, DT_FLAG_DATA_C) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_signed_char = { INIT_BASIC_DATA( signed char, OMPI_ALIGNMENT_CHAR, SIGNED_CHAR, DT_FLAG_DATA_C | DT_FLAG_DATA_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_byte = { INIT_BASIC_DATA( unsigned char, OMPI_ALIGNMENT_CHAR, BYTE, DT_FLAG_DATA_C | DT_FLAG_DATA_INT ) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_short = { INIT_BASIC_DATA( short, OMPI_ALIGNMENT_SHORT, SHORT, DT_FLAG_DATA_C | DT_FLAG_DATA_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_unsigned_short = { INIT_BASIC_DATA( unsigned short, OMPI_ALIGNMENT_SHORT, UNSIGNED_SHORT, DT_FLAG_DATA_C | DT_FLAG_DATA_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_int = { INIT_BASIC_DATA( int, OMPI_ALIGNMENT_INT, INT, DT_FLAG_DATA_C | DT_FLAG_DATA_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_unsigned = { INIT_BASIC_DATA_WITH_NAME( unsigned int, OMPI_ALIGNMENT_INT, UNSIGNED_INT, UNSIGNED, DT_FLAG_DATA_C | DT_FLAG_DATA_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_long = { INIT_BASIC_DATA( long, OMPI_ALIGNMENT_LONG, LONG, DT_FLAG_DATA_C | DT_FLAG_DATA_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_unsigned_long = { INIT_BASIC_DATA( unsigned long, OMPI_ALIGNMENT_LONG, UNSIGNED_LONG, DT_FLAG_DATA_C | DT_FLAG_DATA_INT) };
|
||||
#if HAVE_LONG_LONG
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_long_long_int = INIT_BASIC_DATA_WITH_NAME( long long, OMPI_ALIGNMENT_LONG_LONG, LONG_LONG_INT, LONG_LONG, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_unsigned_long_long = INIT_BASIC_DATA( unsigned long long, OMPI_ALIGNMENT_LONG_LONG, UNSIGNED_LONG_LONG, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_long_long_int = { INIT_BASIC_DATA_WITH_NAME( long long, OMPI_ALIGNMENT_LONG_LONG, LONG_LONG_INT, LONG_LONG, DT_FLAG_DATA_C | DT_FLAG_DATA_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_unsigned_long_long = { INIT_BASIC_DATA( unsigned long long, OMPI_ALIGNMENT_LONG_LONG, UNSIGNED_LONG_LONG, DT_FLAG_DATA_C | DT_FLAG_DATA_INT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_long_long_int = INIT_UNAVAILABLE_DATA( LONG_LONG_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_unsigned_long_long = INIT_UNAVAILABLE_DATA( UNIGNED_LONG_LONG );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_long_long_int = { INIT_UNAVAILABLE_DATA( LONG_LONG_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_unsigned_long_long = { INIT_UNAVAILABLE_DATA( UNIGNED_LONG_LONG) };
|
||||
#endif /* HAVE_LONG_LONG */
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_float = INIT_BASIC_DATA( float, OMPI_ALIGNMENT_FLOAT, FLOAT, DT_FLAG_DATA_C | DT_FLAG_DATA_FLOAT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_double = INIT_BASIC_DATA( double, OMPI_ALIGNMENT_DOUBLE, DOUBLE, DT_FLAG_DATA_C | DT_FLAG_DATA_FLOAT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_float = { INIT_BASIC_DATA( float, OMPI_ALIGNMENT_FLOAT, FLOAT, DT_FLAG_DATA_C | DT_FLAG_DATA_FLOAT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_double = { INIT_BASIC_DATA( double, OMPI_ALIGNMENT_DOUBLE, DOUBLE, DT_FLAG_DATA_C | DT_FLAG_DATA_FLOAT) };
|
||||
#if HAVE_LONG_DOUBLE
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_long_double = INIT_BASIC_DATA( long double, OMPI_ALIGNMENT_LONG_DOUBLE, LONG_DOUBLE, DT_FLAG_DATA_C | DT_FLAG_DATA_FLOAT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_long_double = { INIT_BASIC_DATA( long double, OMPI_ALIGNMENT_LONG_DOUBLE, LONG_DOUBLE, DT_FLAG_DATA_C | DT_FLAG_DATA_FLOAT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_long_double = INIT_UNAVAILABLE_DATA( LONG_DOUBLE );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_long_double = { INIT_UNAVAILABLE_DATA( LONG_DOUBLE) };
|
||||
#endif /* HAVE_LONG_DOUBLE */
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_packed = INIT_BASIC_DATA( char, OMPI_ALIGNMENT_CHAR, PACKED, 0 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_packed = { INIT_BASIC_DATA( char, OMPI_ALIGNMENT_CHAR, PACKED, 0) };
|
||||
#if OMPI_ALIGNMENT_WCHAR != 0
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_wchar = INIT_BASIC_DATA( wchar_t, OMPI_ALIGNMENT_WCHAR, WCHAR, DT_FLAG_DATA_C );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_wchar = { INIT_BASIC_DATA( wchar_t, OMPI_ALIGNMENT_WCHAR, WCHAR, DT_FLAG_DATA_C) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_wchar = INIT_UNAVAILABLE_DATA( WCHAR );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_wchar = { INIT_UNAVAILABLE_DATA( WCHAR) };
|
||||
#endif /* OMPI_ALIGNMENT_WCHAR */
|
||||
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_cxx_bool = INIT_BASIC_DATA( bool, OMPI_ALIGNMENT_CXX_BOOL, CXX_BOOL, DT_FLAG_DATA_CPP );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_logic = INIT_BASIC_FORTRAN_TYPE( DT_LOGIC, LOGIC, OMPI_SIZEOF_FORTRAN_LOGICAL, OMPI_ALIGNMENT_FORTRAN_LOGICAL, 0 );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer = INIT_BASIC_FORTRAN_TYPE( DT_INTEGER, INTEGER, OMPI_SIZEOF_FORTRAN_INTEGER, OMPI_ALIGNMENT_FORTRAN_INTEGER, DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_real = INIT_BASIC_FORTRAN_TYPE( DT_REAL, REAL, OMPI_SIZEOF_FORTRAN_REAL, OMPI_ALIGNMENT_FORTRAN_REAL, DT_FLAG_DATA_FLOAT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_dblprec = INIT_BASIC_FORTRAN_TYPE( DT_DBLPREC, DOUBLE_PRECISION, OMPI_SIZEOF_FORTRAN_DOUBLE_PRECISION, OMPI_ALIGNMENT_FORTRAN_DOUBLE_PRECISION, DT_FLAG_DATA_FLOAT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_cxx_bool = { INIT_BASIC_DATA( bool, OMPI_ALIGNMENT_CXX_BOOL, CXX_BOOL, DT_FLAG_DATA_CPP) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_logic = { INIT_BASIC_FORTRAN_TYPE( DT_LOGIC, LOGIC, OMPI_SIZEOF_FORTRAN_LOGICAL, OMPI_ALIGNMENT_FORTRAN_LOGICAL, 0) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer = { INIT_BASIC_FORTRAN_TYPE( DT_INTEGER, INTEGER, OMPI_SIZEOF_FORTRAN_INTEGER, OMPI_ALIGNMENT_FORTRAN_INTEGER, DT_FLAG_DATA_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_real = { INIT_BASIC_FORTRAN_TYPE( DT_REAL, REAL, OMPI_SIZEOF_FORTRAN_REAL, OMPI_ALIGNMENT_FORTRAN_REAL, DT_FLAG_DATA_FLOAT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_dblprec = { INIT_BASIC_FORTRAN_TYPE( DT_DBLPREC, DOUBLE_PRECISION, OMPI_SIZEOF_FORTRAN_DOUBLE_PRECISION, OMPI_ALIGNMENT_FORTRAN_DOUBLE_PRECISION, DT_FLAG_DATA_FLOAT) };
|
||||
|
||||
#if HAVE_LONG_DOUBLE
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_ldblcplex = INIT_BASIC_DATA( ompi_complex_long_double_t, OMPI_ALIGNMENT_LONG_DOUBLE, COMPLEX_LONG_DOUBLE, DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_ldblcplex = { INIT_BASIC_DATA( ompi_complex_long_double_t, OMPI_ALIGNMENT_LONG_DOUBLE, COMPLEX_LONG_DOUBLE, DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_ldblcplex = INIT_UNAVAILABLE_DATA( COMPLEX_LONG_DOUBLE );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_ldblcplex = { INIT_UNAVAILABLE_DATA( COMPLEX_LONG_DOUBLE) };
|
||||
#endif /* HAVE_LONG_DOUBLE */
|
||||
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_cplex = INIT_BASIC_DATA( ompi_complex_float_t, OMPI_ALIGNMENT_FLOAT, COMPLEX_FLOAT, DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_dblcplex = INIT_BASIC_DATA( ompi_complex_double_t, OMPI_ALIGNMENT_DOUBLE, COMPLEX_DOUBLE, DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_float_int = INIT_BASIC_TYPE( DT_FLOAT_INT, FLOAT_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_double_int = INIT_BASIC_TYPE( DT_DOUBLE_INT, DOUBLE_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_cplex = { INIT_BASIC_DATA( ompi_complex_float_t, OMPI_ALIGNMENT_FLOAT, COMPLEX_FLOAT, DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_dblcplex = { INIT_BASIC_DATA( ompi_complex_double_t, OMPI_ALIGNMENT_DOUBLE, COMPLEX_DOUBLE, DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_float_int = { INIT_BASIC_TYPE( DT_FLOAT_INT, FLOAT_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_double_int = { INIT_BASIC_TYPE( DT_DOUBLE_INT, DOUBLE_INT) };
|
||||
#if HAVE_LONG_DOUBLE
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_longdbl_int = INIT_BASIC_TYPE( DT_LONG_DOUBLE_INT, LONG_DOUBLE_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_longdbl_int = { INIT_BASIC_TYPE( DT_LONG_DOUBLE_INT, LONG_DOUBLE_INT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_longdbl_int = INIT_UNAVAILABLE_DATA( LONG_DOUBLE_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_longdbl_int = { INIT_UNAVAILABLE_DATA( LONG_DOUBLE_INT) };
|
||||
#endif /* HAVE_LONG_DOUBLE */
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_long_int = INIT_BASIC_TYPE( DT_LONG_INT, LONG_INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_short_int = INIT_BASIC_TYPE( DT_SHORT_INT, SHORT_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_long_int = { INIT_BASIC_TYPE( DT_LONG_INT, LONG_INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_short_int = { INIT_BASIC_TYPE( DT_SHORT_INT, SHORT_INT) };
|
||||
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_2int = INIT_BASIC_TYPE( DT_2INT, 2INT );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_2real = INIT_BASIC_TYPE( DT_2REAL, 2REAL );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_2dblprec = INIT_BASIC_TYPE( DT_2DBLPREC, 2DBLPREC );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_2integer = INIT_BASIC_TYPE( DT_2INTEGER, 2INTEGER );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_2int = { INIT_BASIC_TYPE( DT_2INT, 2INT) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_2real = { INIT_BASIC_TYPE( DT_2REAL, 2REAL) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_2dblprec = { INIT_BASIC_TYPE( DT_2DBLPREC, 2DBLPREC) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_2integer = { INIT_BASIC_TYPE( DT_2INTEGER, 2INTEGER) };
|
||||
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_cxx_cplex = INIT_BASIC_DATA( ompi_complex_float_t, OMPI_ALIGNMENT_FLOAT, COMPLEX_FLOAT, DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_cxx_dblcplex = INIT_BASIC_DATA( ompi_complex_double_t, OMPI_ALIGNMENT_DOUBLE, COMPLEX_DOUBLE, DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_cxx_cplex = { INIT_BASIC_DATA( ompi_complex_float_t, OMPI_ALIGNMENT_FLOAT, COMPLEX_FLOAT, DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_cxx_dblcplex = { INIT_BASIC_DATA( ompi_complex_double_t, OMPI_ALIGNMENT_DOUBLE, COMPLEX_DOUBLE, DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX) };
|
||||
#if HAVE_LONG_DOUBLE
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_cxx_ldblcplex = INIT_BASIC_DATA( ompi_complex_long_double_t, OMPI_ALIGNMENT_LONG_DOUBLE, COMPLEX_LONG_DOUBLE, DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_cxx_ldblcplex = { INIT_BASIC_DATA( ompi_complex_long_double_t, OMPI_ALIGNMENT_LONG_DOUBLE, COMPLEX_LONG_DOUBLE, DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_cxx_ldblcplex = INIT_UNAVAILABLE_DATA( COMPLEX_LONG_DOUBLE );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_cxx_ldblcplex = { INIT_UNAVAILABLE_DATA( COMPLEX_LONG_DOUBLE) };
|
||||
#endif /* HAVE_LONG_DOUBLE */
|
||||
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_2cplex = INIT_BASIC_TYPE( DT_2COMPLEX, 2COMPLEX );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_2dblcplex = INIT_BASIC_TYPE( DT_2DOUBLE_COMPLEX, 2DOUBLE_COMPLEX );
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_unavailable = INIT_UNAVAILABLE_DATA( UNAVAILABLE );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_2cplex = { INIT_BASIC_TYPE( DT_2COMPLEX, 2COMPLEX) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_2dblcplex = { INIT_BASIC_TYPE( DT_2DOUBLE_COMPLEX, 2DOUBLE_COMPLEX) };
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_unavailable = { INIT_UNAVAILABLE_DATA( UNAVAILABLE) };
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL1
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_logical1 = INIT_BASIC_FORTRAN_TYPE( DT_LOGIC, LOGICAL1, OMPI_SIZEOF_FORTRAN_LOGICAL1, OMPI_ALIGNMENT_FORTRAN_LOGICAL1, 0 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_logical1 = { INIT_BASIC_FORTRAN_TYPE( DT_LOGIC, LOGICAL1, OMPI_SIZEOF_FORTRAN_LOGICAL1, OMPI_ALIGNMENT_FORTRAN_LOGICAL1, 0) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_logical1 = INIT_UNAVAILABLE_DATA( LOGICAL1 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_logical1 = { INIT_UNAVAILABLE_DATA( LOGICAL1) };
|
||||
#endif /* OMPI_HAVE_FORTRAN_LOGICAL1 */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL2
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_logical2 = INIT_BASIC_FORTRAN_TYPE( DT_LOGIC, LOGICAL2, OMPI_SIZEOF_FORTRAN_LOGICAL2, OMPI_ALIGNMENT_FORTRAN_LOGICAL2, 0 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_logical2 = { INIT_BASIC_FORTRAN_TYPE( DT_LOGIC, LOGICAL2, OMPI_SIZEOF_FORTRAN_LOGICAL2, OMPI_ALIGNMENT_FORTRAN_LOGICAL2, 0) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_logical2 = INIT_UNAVAILABLE_DATA( LOGICAL2 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_logical2 = { INIT_UNAVAILABLE_DATA( LOGICAL2) };
|
||||
#endif /* OMPI_HAVE_FORTRAN_LOGICAL2 */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL4
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_logical4 = INIT_BASIC_FORTRAN_TYPE( DT_LOGIC, LOGICAL4, OMPI_SIZEOF_FORTRAN_LOGICAL4, OMPI_ALIGNMENT_FORTRAN_LOGICAL4, 0 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_logical4 = { INIT_BASIC_FORTRAN_TYPE( DT_LOGIC, LOGICAL4, OMPI_SIZEOF_FORTRAN_LOGICAL4, OMPI_ALIGNMENT_FORTRAN_LOGICAL4, 0) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_logical4 = INIT_UNAVAILABLE_DATA( LOGICAL4 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_logical4 = { INIT_UNAVAILABLE_DATA( LOGICAL4) };
|
||||
#endif /* OMPI_HAVE_FORTRAN_LOGICAL4 */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL8
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_logical8 = INIT_BASIC_FORTRAN_TYPE( DT_LOGIC, LOGICAL8, OMPI_SIZEOF_FORTRAN_LOGICAL8, OMPI_ALIGNMENT_FORTRAN_LOGICAL8, 0 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_logical8 = { INIT_BASIC_FORTRAN_TYPE( DT_LOGIC, LOGICAL8, OMPI_SIZEOF_FORTRAN_LOGICAL8, OMPI_ALIGNMENT_FORTRAN_LOGICAL8, 0) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_logical8 = INIT_UNAVAILABLE_DATA( LOGICAL8 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_logical8 = { INIT_UNAVAILABLE_DATA( LOGICAL8) };
|
||||
#endif /* OMPI_HAVE_FORTRAN_LOGICAL8 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_REAL2
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_real2 = INIT_BASIC_FORTRAN_TYPE( DT_FLOAT, REAL2, OMPI_SIZEOF_FORTRAN_REAL2, OMPI_ALIGNMENT_FORTRAN_REAL2, DT_FLAG_DATA_FLOAT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_real2 = { INIT_BASIC_FORTRAN_TYPE( DT_FLOAT, REAL2, OMPI_SIZEOF_FORTRAN_REAL2, OMPI_ALIGNMENT_FORTRAN_REAL2, DT_FLAG_DATA_FLOAT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_real2 = INIT_UNAVAILABLE_DATA( REAL2 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_real2 = { INIT_UNAVAILABLE_DATA( REAL2) };
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL4
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_real4 = INIT_BASIC_FORTRAN_TYPE( DT_FLOAT, REAL4, OMPI_SIZEOF_FORTRAN_REAL4, OMPI_ALIGNMENT_FORTRAN_REAL4, DT_FLAG_DATA_FLOAT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_real4 = { INIT_BASIC_FORTRAN_TYPE( DT_FLOAT, REAL4, OMPI_SIZEOF_FORTRAN_REAL4, OMPI_ALIGNMENT_FORTRAN_REAL4, DT_FLAG_DATA_FLOAT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_real4 = INIT_UNAVAILABLE_DATA( REAL4 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_real4 = { INIT_UNAVAILABLE_DATA( REAL4) };
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL8
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_real8 = INIT_BASIC_FORTRAN_TYPE( DT_DOUBLE, REAL8, OMPI_SIZEOF_FORTRAN_REAL8, OMPI_ALIGNMENT_FORTRAN_REAL8, DT_FLAG_DATA_FLOAT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_real8 = { INIT_BASIC_FORTRAN_TYPE( DT_DOUBLE, REAL8, OMPI_SIZEOF_FORTRAN_REAL8, OMPI_ALIGNMENT_FORTRAN_REAL8, DT_FLAG_DATA_FLOAT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_real8 = INIT_UNAVAILABLE_DATA( REAL8 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_real8 = { INIT_UNAVAILABLE_DATA( REAL8) };
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL16 && OMPI_REAL16_MATCHES_C
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_real16 = INIT_BASIC_FORTRAN_TYPE( DT_LONG_DOUBLE, REAL16, OMPI_SIZEOF_FORTRAN_REAL16, OMPI_ALIGNMENT_FORTRAN_REAL16, DT_FLAG_DATA_FLOAT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_real16 = { INIT_BASIC_FORTRAN_TYPE( DT_LONG_DOUBLE, REAL16, OMPI_SIZEOF_FORTRAN_REAL16, OMPI_ALIGNMENT_FORTRAN_REAL16, DT_FLAG_DATA_FLOAT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_real16 = INIT_UNAVAILABLE_DATA( REAL16 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_real16 = { INIT_UNAVAILABLE_DATA( REAL16) };
|
||||
#endif
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER1
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer1 = INIT_BASIC_FORTRAN_TYPE( DT_CHAR, INTEGER1, OMPI_SIZEOF_FORTRAN_INTEGER1, OMPI_ALIGNMENT_FORTRAN_INTEGER1, DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer1 = { INIT_BASIC_FORTRAN_TYPE( DT_CHAR, INTEGER1, OMPI_SIZEOF_FORTRAN_INTEGER1, OMPI_ALIGNMENT_FORTRAN_INTEGER1, DT_FLAG_DATA_INT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer1 = INIT_UNAVAILABLE_DATA( INTEGER1 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer1 = { INIT_UNAVAILABLE_DATA( INTEGER1) };
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER2
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer2 = INIT_BASIC_FORTRAN_TYPE( DT_SHORT, INTEGER2, OMPI_SIZEOF_FORTRAN_INTEGER2, OMPI_ALIGNMENT_FORTRAN_INTEGER2, DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer2 = { INIT_BASIC_FORTRAN_TYPE( DT_SHORT, INTEGER2, OMPI_SIZEOF_FORTRAN_INTEGER2, OMPI_ALIGNMENT_FORTRAN_INTEGER2, DT_FLAG_DATA_INT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer2 = INIT_UNAVAILABLE_DATA( INTEGER2 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer2 = { INIT_UNAVAILABLE_DATA( INTEGER2) };
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER4
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer4 = INIT_BASIC_FORTRAN_TYPE( DT_INT, INTEGER4, OMPI_SIZEOF_FORTRAN_INTEGER4, OMPI_ALIGNMENT_FORTRAN_INTEGER4, DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer4 = { INIT_BASIC_FORTRAN_TYPE( DT_INT, INTEGER4, OMPI_SIZEOF_FORTRAN_INTEGER4, OMPI_ALIGNMENT_FORTRAN_INTEGER4, DT_FLAG_DATA_INT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer4 = INIT_UNAVAILABLE_DATA( INTEGER4 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer4 = { INIT_UNAVAILABLE_DATA( INTEGER4) };
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER8
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer8 = INIT_BASIC_FORTRAN_TYPE( DT_LONG_LONG_INT, INTEGER8, OMPI_SIZEOF_FORTRAN_INTEGER8, OMPI_ALIGNMENT_FORTRAN_INTEGER8, DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer8 = { INIT_BASIC_FORTRAN_TYPE( DT_LONG_LONG_INT, INTEGER8, OMPI_SIZEOF_FORTRAN_INTEGER8, OMPI_ALIGNMENT_FORTRAN_INTEGER8, DT_FLAG_DATA_INT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer8 = INIT_UNAVAILABLE_DATA( INTEGER8 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer8 = { INIT_UNAVAILABLE_DATA( INTEGER8) };
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER16
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer16 = INIT_BASIC_FORTRAN_TYPE( DT_LONG_LONG_INT, INTEGER16, OMPI_SIZEOF_FORTRAN_INTEGER16, OMPI_ALIGNMENT_FORTRAN_INTEGER16, DT_FLAG_DATA_INT );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer16 = { INIT_BASIC_FORTRAN_TYPE( DT_LONG_LONG_INT, INTEGER16, OMPI_SIZEOF_FORTRAN_INTEGER16, OMPI_ALIGNMENT_FORTRAN_INTEGER16, DT_FLAG_DATA_INT) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_integer16 = INIT_UNAVAILABLE_DATA( INTEGER16 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_integer16 = { INIT_UNAVAILABLE_DATA( INTEGER16) };
|
||||
#endif
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_REAL4 && OMPI_HAVE_FORTRAN_COMPLEX8
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_complex8 = INIT_BASIC_FORTRAN_TYPE( DT_COMPLEX_FLOAT, COMPLEX8, OMPI_SIZEOF_FORTRAN_COMPLEX, OMPI_ALIGNMENT_FORTRAN_REAL, DT_FLAG_DATA_COMPLEX );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_complex8 = { INIT_BASIC_FORTRAN_TYPE( DT_COMPLEX_FLOAT, COMPLEX8, OMPI_SIZEOF_FORTRAN_COMPLEX, OMPI_ALIGNMENT_FORTRAN_REAL, DT_FLAG_DATA_COMPLEX) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_complex8 = INIT_UNAVAILABLE_DATA( COMPLEX8 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_complex8 = { INIT_UNAVAILABLE_DATA( COMPLEX8) };
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL8 && OMPI_HAVE_FORTRAN_COMPLEX16
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_complex16 = INIT_BASIC_FORTRAN_TYPE( DT_COMPLEX_DOUBLE, COMPLEX16, OMPI_SIZEOF_FORTRAN_COMPLEX16, OMPI_ALIGNMENT_FORTRAN_COMPLEX16, DT_FLAG_DATA_COMPLEX );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_complex16 = { INIT_BASIC_FORTRAN_TYPE( DT_COMPLEX_DOUBLE, COMPLEX16, OMPI_SIZEOF_FORTRAN_COMPLEX16, OMPI_ALIGNMENT_FORTRAN_COMPLEX16, DT_FLAG_DATA_COMPLEX) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_complex16 = INIT_UNAVAILABLE_DATA( COMPLEX16 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_complex16 = { INIT_UNAVAILABLE_DATA( COMPLEX16) };
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL16 && OMPI_HAVE_FORTRAN_COMPLEX32 && OMPI_REAL16_MATCHES_C
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_complex32 = INIT_BASIC_FORTRAN_TYPE( DT_COMPLEX_LONG_DOUBLE, COMPLEX32, OMPI_SIZEOF_FORTRAN_COMPLEX32, OMPI_ALIGNMENT_FORTRAN_COMPLEX32, DT_FLAG_DATA_COMPLEX );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_complex32 = { INIT_BASIC_FORTRAN_TYPE( DT_COMPLEX_LONG_DOUBLE, COMPLEX32, OMPI_SIZEOF_FORTRAN_COMPLEX32, OMPI_ALIGNMENT_FORTRAN_COMPLEX32, DT_FLAG_DATA_COMPLEX) };
|
||||
#else
|
||||
OMPI_DECLSPEC ompi_datatype_t ompi_mpi_complex32 = INIT_UNAVAILABLE_DATA( COMPLEX32 );
|
||||
OMPI_DECLSPEC ompi_predefined_datatype_t ompi_mpi_complex32 = { INIT_UNAVAILABLE_DATA( COMPLEX32) };
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -266,46 +264,46 @@ OMPI_DECLSPEC ompi_datatype_t ompi_mpi_complex32 = INIT_UNAVAILABLE_DATA( COMPLE
|
||||
const ompi_datatype_t* ompi_ddt_basicDatatypes[DT_MAX_PREDEFINED] = {
|
||||
&ompi_mpi_loop,
|
||||
&ompi_mpi_end_loop,
|
||||
&ompi_mpi_lb,
|
||||
&ompi_mpi_ub,
|
||||
&ompi_mpi_char,
|
||||
&ompi_mpi_character,
|
||||
&ompi_mpi_unsigned_char,
|
||||
&ompi_mpi_signed_char,
|
||||
&ompi_mpi_byte,
|
||||
&ompi_mpi_short,
|
||||
&ompi_mpi_unsigned_short,
|
||||
&ompi_mpi_int,
|
||||
&ompi_mpi_unsigned,
|
||||
&ompi_mpi_long,
|
||||
&ompi_mpi_unsigned_long,
|
||||
&ompi_mpi_long_long_int,
|
||||
&ompi_mpi_unsigned_long_long,
|
||||
&ompi_mpi_float,
|
||||
&ompi_mpi_double,
|
||||
&ompi_mpi_long_double,
|
||||
&ompi_mpi_packed,
|
||||
&ompi_mpi_wchar,
|
||||
&ompi_mpi_cxx_bool,
|
||||
&ompi_mpi_logic,
|
||||
&ompi_mpi_integer,
|
||||
&ompi_mpi_real,
|
||||
&ompi_mpi_dblprec,
|
||||
&ompi_mpi_cplex,
|
||||
&ompi_mpi_dblcplex,
|
||||
&ompi_mpi_ldblcplex,
|
||||
&ompi_mpi_2int,
|
||||
&ompi_mpi_2integer,
|
||||
&ompi_mpi_2real,
|
||||
&ompi_mpi_2dblprec,
|
||||
&ompi_mpi_2cplex,
|
||||
&ompi_mpi_2dblcplex,
|
||||
&ompi_mpi_float_int,
|
||||
&ompi_mpi_double_int,
|
||||
&ompi_mpi_longdbl_int,
|
||||
&ompi_mpi_long_int,
|
||||
&ompi_mpi_short_int,
|
||||
&ompi_mpi_unavailable
|
||||
&ompi_mpi_lb.dt,
|
||||
&ompi_mpi_ub.dt,
|
||||
&ompi_mpi_char.dt,
|
||||
&ompi_mpi_character.dt,
|
||||
&ompi_mpi_unsigned_char.dt,
|
||||
&ompi_mpi_signed_char.dt,
|
||||
&ompi_mpi_byte.dt,
|
||||
&ompi_mpi_short.dt,
|
||||
&ompi_mpi_unsigned_short.dt,
|
||||
&ompi_mpi_int.dt,
|
||||
&ompi_mpi_unsigned.dt,
|
||||
&ompi_mpi_long.dt,
|
||||
&ompi_mpi_unsigned_long.dt,
|
||||
&ompi_mpi_long_long_int.dt,
|
||||
&ompi_mpi_unsigned_long_long.dt,
|
||||
&ompi_mpi_float.dt,
|
||||
&ompi_mpi_double.dt,
|
||||
&ompi_mpi_long_double.dt,
|
||||
&ompi_mpi_packed.dt,
|
||||
&ompi_mpi_wchar.dt,
|
||||
&ompi_mpi_cxx_bool.dt,
|
||||
&ompi_mpi_logic.dt,
|
||||
&ompi_mpi_integer.dt,
|
||||
&ompi_mpi_real.dt,
|
||||
&ompi_mpi_dblprec.dt,
|
||||
&ompi_mpi_cplex.dt,
|
||||
&ompi_mpi_dblcplex.dt,
|
||||
&ompi_mpi_ldblcplex.dt,
|
||||
&ompi_mpi_2int.dt,
|
||||
&ompi_mpi_2integer.dt,
|
||||
&ompi_mpi_2real.dt,
|
||||
&ompi_mpi_2dblprec.dt,
|
||||
&ompi_mpi_2cplex.dt,
|
||||
&ompi_mpi_2dblcplex.dt,
|
||||
&ompi_mpi_float_int.dt,
|
||||
&ompi_mpi_double_int.dt,
|
||||
&ompi_mpi_longdbl_int.dt,
|
||||
&ompi_mpi_long_int.dt,
|
||||
&ompi_mpi_short_int.dt,
|
||||
&ompi_mpi_unavailable.dt
|
||||
};
|
||||
|
||||
opal_pointer_array_t ompi_datatype_f_to_c_table;
|
||||
@ -314,14 +312,14 @@ size_t ompi_ddt_local_sizes[DT_MAX_PREDEFINED];
|
||||
|
||||
#define COPY_DATA_DESC( PDST, PSRC ) \
|
||||
do { \
|
||||
(PDST)->flags = (PSRC)->flags; \
|
||||
(PDST)->id = (PSRC)->id; \
|
||||
(PDST)->size = (PSRC)->size; \
|
||||
(PDST)->true_lb = (PSRC)->true_lb; \
|
||||
(PDST)->true_ub = (PSRC)->true_ub; \
|
||||
(PDST)->align = (PSRC)->align; \
|
||||
(PDST)->lb = (PSRC)->lb; \
|
||||
(PDST)->ub = (PSRC)->ub; \
|
||||
(PDST)->flags = (PSRC)->flags; \
|
||||
(PDST)->id = (PSRC)->id; \
|
||||
(PDST)->align = (PSRC)->align; \
|
||||
(PDST)->nbElems = (PSRC)->nbElems; \
|
||||
(PDST)->bdt_used = (PSRC)->bdt_used; \
|
||||
if( NULL != (PDST)->desc.desc ) \
|
||||
@ -467,41 +465,41 @@ int32_t ompi_ddt_init( void )
|
||||
*/
|
||||
|
||||
/* the 2 complex datatypes (float and double) */
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_cplex, DT_COMPLEX_FLOAT, "MPI_COMPLEX",
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_cplex.dt, DT_COMPLEX_FLOAT, "MPI_COMPLEX",
|
||||
float, float, DT_FLOAT, DT_FLOAT,
|
||||
DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT );
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_dblcplex, DT_COMPLEX_DOUBLE, "MPI_DOUBLE_COMPLEX",
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_dblcplex.dt, DT_COMPLEX_DOUBLE, "MPI_DOUBLE_COMPLEX",
|
||||
double, double, DT_DOUBLE, DT_DOUBLE,
|
||||
DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT );
|
||||
#if HAVE_LONG_DOUBLE
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_ldblcplex, DT_COMPLEX_LONG_DOUBLE, "MPI_LONG_DOUBLE_COMPLEX",
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_ldblcplex.dt, DT_COMPLEX_LONG_DOUBLE, "MPI_LONG_DOUBLE_COMPLEX",
|
||||
long double, long double, DT_LONG_DOUBLE, DT_LONG_DOUBLE,
|
||||
DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT );
|
||||
#endif /* HAVE_LONG_DOUBLE */
|
||||
|
||||
/* Now the predefined MPI2 datatypes (they should last forever!) */
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_float_int, DT_FLOAT_INT, "MPI_FLOAT_INT",
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_float_int.dt, DT_FLOAT_INT, "MPI_FLOAT_INT",
|
||||
float, int, DT_FLOAT, DT_INT, DT_FLAG_DATA_C );
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_double_int, DT_DOUBLE_INT, "MPI_DOUBLE_INT",
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_double_int.dt, DT_DOUBLE_INT, "MPI_DOUBLE_INT",
|
||||
double, int, DT_DOUBLE, DT_INT, DT_FLAG_DATA_C );
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_long_int, DT_LONG_INT, "MPI_LONG_INT",
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_long_int.dt, DT_LONG_INT, "MPI_LONG_INT",
|
||||
long, int, DT_LONG, DT_INT, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_short_int, DT_SHORT_INT, "MPI_SHORT_INT",
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_short_int.dt, DT_SHORT_INT, "MPI_SHORT_INT",
|
||||
short, int, DT_SHORT, DT_INT, DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_longdbl_int, DT_LONG_DOUBLE_INT, "MPI_LONG_DOUBLE_INT",
|
||||
DECLARE_MPI2_COMPOSED_STRUCT_DDT( &ompi_mpi_longdbl_int.dt, DT_LONG_DOUBLE_INT, "MPI_LONG_DOUBLE_INT",
|
||||
long double, int, DT_LONG_DOUBLE, DT_INT, DT_FLAG_DATA_C );
|
||||
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2int, DT_2INT, "MPI_2INT", DT_INT,
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2int.dt, DT_2INT, "MPI_2INT", DT_INT,
|
||||
DT_FLAG_DATA_C | DT_FLAG_DATA_INT );
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2integer, DT_2INTEGER, "MPI_2INTEGER", DT_INT,
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2integer.dt, DT_2INTEGER, "MPI_2INTEGER", DT_INT,
|
||||
DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT);
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2real, DT_2REAL, "MPI_2REAL", DT_FLOAT,
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2real.dt, DT_2REAL, "MPI_2REAL", DT_FLOAT,
|
||||
DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT );
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2dblprec, DT_2DBLPREC, "MPI_2DOUBLE_PRECISION", DT_DOUBLE,
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2dblprec.dt, DT_2DBLPREC, "MPI_2DOUBLE_PRECISION", DT_DOUBLE,
|
||||
DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT );
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2cplex, DT_2COMPLEX, "MPI_2COMPLEX", DT_COMPLEX_FLOAT,
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2cplex.dt, DT_2COMPLEX, "MPI_2COMPLEX", DT_COMPLEX_FLOAT,
|
||||
DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT);
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2dblcplex, DT_2DOUBLE_COMPLEX, "MPI_2DOUBLE_COMPLEX",
|
||||
DECLARE_MPI2_COMPOSED_BLOCK_DDT( &ompi_mpi_2dblcplex.dt, DT_2DOUBLE_COMPLEX, "MPI_2DOUBLE_COMPLEX",
|
||||
DT_COMPLEX_DOUBLE, DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT );
|
||||
|
||||
for( i = 0; i < DT_MAX_PREDEFINED; ++i ) {
|
||||
@ -512,206 +510,206 @@ int32_t ompi_ddt_init( void )
|
||||
the synonym types */
|
||||
|
||||
/* C++ complex types */
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_cxx_cplex, "MPI_CXX_COMPLEX", &ompi_mpi_cplex );
|
||||
ompi_mpi_cxx_cplex.flags |= DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX;
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_cxx_dblcplex, "MPI_CXX_DOUBLE_COMPLEX", &ompi_mpi_dblcplex );
|
||||
ompi_mpi_cxx_dblcplex.flags |= DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX;
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_cxx_cplex.dt, "MPI_CXX_COMPLEX", &ompi_mpi_cplex.dt );
|
||||
ompi_mpi_cxx_cplex.dt.flags |= DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX;
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_cxx_dblcplex.dt, "MPI_CXX_DOUBLE_COMPLEX", &ompi_mpi_dblcplex.dt );
|
||||
ompi_mpi_cxx_dblcplex.dt.flags |= DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX;
|
||||
#if HAVE_LONG_DOUBLE
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_cxx_ldblcplex, "MPI_CXX_LONG_DOUBLE_COMPLEX", &ompi_mpi_ldblcplex );
|
||||
ompi_mpi_cxx_ldblcplex.flags |= DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX;
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_cxx_ldblcplex.dt, "MPI_CXX_LONG_DOUBLE_COMPLEX", &ompi_mpi_ldblcplex.dt );
|
||||
ompi_mpi_cxx_ldblcplex.dt.flags |= DT_FLAG_DATA_CPP | DT_FLAG_DATA_COMPLEX;
|
||||
#endif /* HAVE_LONG_DOUBLE */
|
||||
|
||||
/* Optional Fortran LOGICAL types */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL1
|
||||
#if (OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_CHAR)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical1, "MPI_LOGICAL1", &ompi_mpi_char );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical1.dt, "MPI_LOGICAL1", &ompi_mpi_char.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_SHORT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical1, "MPI_LOGICAL1", &ompi_mpi_short );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical1.dt, "MPI_LOGICAL1", &ompi_mpi_short.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_INT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical1, "MPI_LOGICAL1", &ompi_mpi_int );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical1.dt, "MPI_LOGICAL1", &ompi_mpi_int.dt );
|
||||
#else
|
||||
# warning "No proper C type found for LOGICAL1"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical1, "MPI_LOGICAL1", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical1.dt, "MPI_LOGICAL1", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_logical1.flags |= DT_FLAG_DATA_FORTRAN;
|
||||
ompi_mpi_logical1.dt.flags |= DT_FLAG_DATA_FORTRAN;
|
||||
#endif /* OMPI_HAVE_FORTRAN_LOGICAL1 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL2
|
||||
#if (OMPI_SIZEOF_FORTRAN_LOGICAL2 == SIZEOF_SHORT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical2, "MPI_LOGICAL2", &ompi_mpi_short );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical2.dt, "MPI_LOGICAL2", &ompi_mpi_short.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_LOGICAL2 == SIZEOF_INT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical2, "MPI_LOGICAL2", &ompi_mpi_int );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical2.dt, "MPI_LOGICAL2", &ompi_mpi_int.dt );
|
||||
#else
|
||||
# warning "No proper C type found for LOGICAL2"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical2, "MPI_LOGICAL2", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical2.dt, "MPI_LOGICAL2", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_logical2.flags |= DT_FLAG_DATA_FORTRAN;
|
||||
ompi_mpi_logical2.dt.flags |= DT_FLAG_DATA_FORTRAN;
|
||||
#endif /* OMPI_HAVE_FORTRAN_LOGICAL2 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL4
|
||||
#if (OMPI_SIZEOF_FORTRAN_LOGICAL4 == SIZEOF_INT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical4, "MPI_LOGICAL4", &ompi_mpi_int );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical4.dt, "MPI_LOGICAL4", &ompi_mpi_int.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_LOGICAL4 == SIZEOF_LONG)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical4, "MPI_LOGICAL4", &ompi_mpi_long );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical4.dt, "MPI_LOGICAL4", &ompi_mpi_long.dt );
|
||||
#else
|
||||
# warning "No proper C type found for LOGICAL4"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical4, "MPI_LOGICAL4", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical4.dt, "MPI_LOGICAL4", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_logical4.flags |= DT_FLAG_DATA_FORTRAN;
|
||||
ompi_mpi_logical4.dt.flags |= DT_FLAG_DATA_FORTRAN;
|
||||
#endif /* OMPI_HAVE_FORTRAN_LOGICAL4 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL8
|
||||
#if (OMPI_SIZEOF_FORTRAN_LOGICAL8 == SIZEOF_LONG)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical8, "MPI_LOGICAL8", &ompi_mpi_long );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical8.dt, "MPI_LOGICAL8", &ompi_mpi_long.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_LOGICAL8 == SIZEOF_LONG_LONG)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical8, "MPI_LOGICAL8", &ompi_mpi_long_long_int );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical8.dt, "MPI_LOGICAL8", &ompi_mpi_long_long_int.dt );
|
||||
#else
|
||||
# warning "No proper C type found for LOGICAL8"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical8, "MPI_LOGICAL8", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_logical8.dt, "MPI_LOGICAL8", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_logical8.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
ompi_mpi_logical8.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
#endif /* OMPI_HAVE_FORTRAN_INTEGER8 */
|
||||
|
||||
/* Optional Fortran REAL types */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_REAL2
|
||||
#if (OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_FLOAT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real2, "MPI_REAL2", &ompi_mpi_float );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real2.dt, "MPI_REAL2", &ompi_mpi_float.dt );
|
||||
#else
|
||||
# warning "No proper C type found for REAL2"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real2, "MPI_REAL2", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real2.dt, "MPI_REAL2", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_real2.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT;
|
||||
ompi_mpi_real2.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT;
|
||||
#endif /* OMPI_HAVE_FORTRAN_REAL2 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_REAL4
|
||||
#if (OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_FLOAT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real4, "MPI_REAL4", &ompi_mpi_float );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real4.dt, "MPI_REAL4", &ompi_mpi_float.dt );
|
||||
#else
|
||||
# warning "No proper C type found for REAL4"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real4, "MPI_REAL4", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real4.dt, "MPI_REAL4", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_real4.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT;
|
||||
ompi_mpi_real4.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT;
|
||||
#endif /* OMPI_HAVE_FORTRAN_REAL4 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_REAL8
|
||||
#if (OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_FLOAT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real8, "MPI_REAL8", &ompi_mpi_float );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real8.dt, "MPI_REAL8", &ompi_mpi_float.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_DOUBLE)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real8, "MPI_REAL8", &ompi_mpi_double );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real8.dt, "MPI_REAL8", &ompi_mpi_double.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_LONG_DOUBLE)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real8, "MPI_REAL8", &ompi_mpi_long_double );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real8.dt, "MPI_REAL8", &ompi_mpi_long_double.dt );
|
||||
#else
|
||||
# warning "No proper C type found for REAL8"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real8, "MPI_REAL8", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real8.dt, "MPI_REAL8", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_real8.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT;
|
||||
ompi_mpi_real8.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT;
|
||||
#endif /* OMPI_HAVE_FORTRAN_REAL8 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_REAL16
|
||||
#if (OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_LONG_DOUBLE)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real16, "MPI_REAL16", &ompi_mpi_long_double );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real16.dt, "MPI_REAL16", &ompi_mpi_long_double.dt );
|
||||
#else
|
||||
# warning "No proper C type found for REAL16"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real16, "MPI_REAL16", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_real16.dt, "MPI_REAL16", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_real16.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT;
|
||||
ompi_mpi_real16.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_FLOAT;
|
||||
#endif /* OMPI_HAVE_FORTRAN_REAL16 */
|
||||
|
||||
/* Optional Fortran INTEGER types */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER1
|
||||
#if (OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_CHAR)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer1, "MPI_INTEGER1", &ompi_mpi_char );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer1.dt, "MPI_INTEGER1", &ompi_mpi_char.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_SHORT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer1, "MPI_INTEGER1", &ompi_mpi_short );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer1.dt, "MPI_INTEGER1", &ompi_mpi_short.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_INT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer1, "MPI_INTEGER1", &ompi_mpi_int );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer1.dt, "MPI_INTEGER1", &ompi_mpi_int.dt );
|
||||
#else
|
||||
# warning "No proper C type found for INTEGER1"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer1, "MPI_INTEGER1", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer1.dt, "MPI_INTEGER1", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_integer1.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
ompi_mpi_integer1.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
#endif /* OMPI_HAVE_FORTRAN_INTEGER1 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER2
|
||||
#if (OMPI_SIZEOF_FORTRAN_INTEGER2 == SIZEOF_SHORT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer2, "MPI_INTEGER2", &ompi_mpi_short );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer2.dt, "MPI_INTEGER2", &ompi_mpi_short.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_INTEGER2 == SIZEOF_INT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer2, "MPI_INTEGER2", &ompi_mpi_int );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer2.dt, "MPI_INTEGER2", &ompi_mpi_int.dt );
|
||||
#else
|
||||
# warning "No proper C type found for INTEGER2"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer2, "MPI_INTEGER2", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer2.dt, "MPI_INTEGER2", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_integer2.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
ompi_mpi_integer2.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
#endif /* OMPI_HAVE_FORTRAN_INTEGER2 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER4
|
||||
#if (OMPI_SIZEOF_FORTRAN_INTEGER4 == SIZEOF_INT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer4, "MPI_INTEGER4", &ompi_mpi_int );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer4.dt, "MPI_INTEGER4", &ompi_mpi_int.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_INTEGER4 == SIZEOF_LONG)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer4, "MPI_INTEGER4", &ompi_mpi_long );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer4.dt, "MPI_INTEGER4", &ompi_mpi_long.dt );
|
||||
#else
|
||||
# warning "No proper C type found for INTEGER4"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer4, "MPI_INTEGER4", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer4.dt, "MPI_INTEGER4", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_integer4.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
ompi_mpi_integer4.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
#endif /* OMPI_HAVE_FORTRAN_INTEGER4 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER8
|
||||
#if (OMPI_SIZEOF_FORTRAN_INTEGER8 == SIZEOF_LONG)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer8, "MPI_INTEGER8", &ompi_mpi_long );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer8.dt, "MPI_INTEGER8", &ompi_mpi_long.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_INTEGER8 == SIZEOF_LONG_LONG)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer8, "MPI_INTEGER8", &ompi_mpi_long_long_int );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer8.dt, "MPI_INTEGER8", &ompi_mpi_long_long_int.dt );
|
||||
#else
|
||||
# warning "No proper C type found for INTEGER8"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer8, "MPI_INTEGER8", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer8.dt, "MPI_INTEGER8", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_integer8.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
ompi_mpi_integer8.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
#endif /* OMPI_HAVE_FORTRAN_INTEGER8 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER16
|
||||
#if (OMPI_SIZEOF_FORTRAN_INTEGER16 == SIZEOF_LONG_LONG)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer16, "MPI_INTEGER16", &ompi_mpi_long_long_int );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer16.dt, "MPI_INTEGER16", &ompi_mpi_long_long_int.dt );
|
||||
#else
|
||||
# warning "No proper C type found for INTEGER16"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer16, "MPI_INTEGER16", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_integer16.dt, "MPI_INTEGER16", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_integer16.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
ompi_mpi_integer16.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_INT;
|
||||
#endif /* OMPI_HAVE_FORTRAN_INTEGER16 */
|
||||
|
||||
/* Optional Fortran COMPLEX types */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_COMPLEX8
|
||||
#if (OMPI_SIZEOF_FORTRAN_COMPLEX8 == 2*SIZEOF_FLOAT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex8, "MPI_COMPLEX8", &ompi_mpi_cplex );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex8.dt, "MPI_COMPLEX8", &ompi_mpi_cplex.dt );
|
||||
#else
|
||||
# warning "No proper C type found for COMPLEX8"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex8, "MPI_COMPLEX8", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex8.dt, "MPI_COMPLEX8", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_complex8.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX;
|
||||
ompi_mpi_complex8.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX;
|
||||
#endif /* OMPI_HAVE_FORTRAN_COMPLEX8 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_COMPLEX16
|
||||
#if (OMPI_SIZEOF_FORTRAN_COMPLEX16 == 2*SIZEOF_FLOAT)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex16, "MPI_COMPLEX16", &ompi_mpi_cplex );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex16.dt, "MPI_COMPLEX16", &ompi_mpi_cplex.dt );
|
||||
#elif (OMPI_SIZEOF_FORTRAN_COMPLEX16 == 2*SIZEOF_DOUBLE)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex16, "MPI_COMPLEX16", &ompi_mpi_dblcplex );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex16.dt, "MPI_COMPLEX16", &ompi_mpi_dblcplex.dt );
|
||||
#else
|
||||
# warning "No proper C type found for COMPLEX16"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex16, "MPI_COMPLEX16", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex16.dt, "MPI_COMPLEX16", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_complex16.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX;
|
||||
ompi_mpi_complex16.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX;
|
||||
#endif /* OMPI_HAVE_FORTRAN_COMPLEX16 */
|
||||
|
||||
#if OMPI_HAVE_FORTRAN_COMPLEX32
|
||||
#if OMPI_REAL16_MATCHES_C && (OMPI_SIZEOF_FORTRAN_COMPLEX32 == 2*SIZEOF_LONG_DOUBLE)
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex32, "MPI_COMPLEX32", &ompi_mpi_ldblcplex );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex32.dt, "MPI_COMPLEX32", &ompi_mpi_ldblcplex.dt );
|
||||
#else
|
||||
# warning "No proper C type found for COMPLEX32"
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex32, "MPI_COMPLEX32", &ompi_mpi_unavailable );
|
||||
DECLARE_MPI_SYNONYM_DDT( &ompi_mpi_complex32.dt, "MPI_COMPLEX32", &ompi_mpi_unavailable.dt );
|
||||
#endif
|
||||
ompi_mpi_complex32.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX;
|
||||
ompi_mpi_complex32.dt.flags |= DT_FLAG_DATA_FORTRAN | DT_FLAG_DATA_COMPLEX;
|
||||
#endif /* OMPI_HAVE_FORTRAN_COMPLEX32 */
|
||||
|
||||
/* Start to populate the f2c index translation table */
|
||||
@ -726,10 +724,10 @@ int32_t ompi_ddt_init( void )
|
||||
|
||||
#define MOOG(name) \
|
||||
{ \
|
||||
ompi_mpi_##name.d_f_to_c_index = \
|
||||
ompi_mpi_##name.dt.d_f_to_c_index = \
|
||||
opal_pointer_array_add(&ompi_datatype_f_to_c_table, &ompi_mpi_##name); \
|
||||
if( ompi_ddt_number_of_predefined_data < (ompi_mpi_##name).d_f_to_c_index ) \
|
||||
ompi_ddt_number_of_predefined_data = (ompi_mpi_##name).d_f_to_c_index; \
|
||||
if( ompi_ddt_number_of_predefined_data < (ompi_mpi_##name).dt.d_f_to_c_index ) \
|
||||
ompi_ddt_number_of_predefined_data = (ompi_mpi_##name).dt.d_f_to_c_index; \
|
||||
}
|
||||
|
||||
/*
|
||||
@ -803,7 +801,7 @@ int32_t ompi_ddt_init( void )
|
||||
MOOG(cxx_dblcplex);
|
||||
MOOG(cxx_ldblcplex);
|
||||
|
||||
for( i = 0; i < ompi_mpi_cxx_ldblcplex.d_f_to_c_index; i++ ) {
|
||||
for( i = 0; i < ompi_mpi_cxx_ldblcplex.dt.d_f_to_c_index; i++ ) {
|
||||
ompi_datatype_t* datatype = (ompi_datatype_t*)opal_pointer_array_get_item(&ompi_datatype_f_to_c_table, i );
|
||||
|
||||
if( (datatype->ub - datatype->lb) == (ptrdiff_t)datatype->size ) {
|
||||
|
@ -11,6 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -48,10 +49,10 @@ OBJ_CLASS_INSTANCE(ompi_errhandler_t, opal_object_t, ompi_errhandler_construct,
|
||||
ompi_errhandler_destruct);
|
||||
|
||||
|
||||
ompi_errhandler_t ompi_mpi_errhandler_null;
|
||||
ompi_errhandler_t ompi_mpi_errors_are_fatal;
|
||||
ompi_errhandler_t ompi_mpi_errors_return;
|
||||
ompi_errhandler_t ompi_mpi_errors_throw_exceptions;
|
||||
ompi_predefined_errhandler_t ompi_mpi_errhandler_null;
|
||||
ompi_predefined_errhandler_t ompi_mpi_errors_are_fatal;
|
||||
ompi_predefined_errhandler_t ompi_mpi_errors_return;
|
||||
ompi_predefined_errhandler_t ompi_mpi_errors_throw_exceptions;
|
||||
|
||||
/*
|
||||
* Local state to know when the three intrinsics have been freed; see
|
||||
@ -77,41 +78,41 @@ int ompi_errhandler_init(void)
|
||||
}
|
||||
|
||||
/* Initialize the predefined error handlers */
|
||||
OBJ_CONSTRUCT( &ompi_mpi_errhandler_null, ompi_errhandler_t );
|
||||
if( ompi_mpi_errhandler_null.eh_f_to_c_index != OMPI_ERRHANDLER_NULL_FORTRAN )
|
||||
OBJ_CONSTRUCT( &ompi_mpi_errhandler_null.eh, ompi_errhandler_t );
|
||||
if( ompi_mpi_errhandler_null.eh.eh_f_to_c_index != OMPI_ERRHANDLER_NULL_FORTRAN )
|
||||
return OMPI_ERROR;
|
||||
ompi_mpi_errhandler_null.eh_mpi_object_type = OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
||||
ompi_mpi_errhandler_null.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
||||
ompi_mpi_errhandler_null.eh_comm_fn = NULL;
|
||||
ompi_mpi_errhandler_null.eh_file_fn = NULL;
|
||||
ompi_mpi_errhandler_null.eh_win_fn = NULL ;
|
||||
ompi_mpi_errhandler_null.eh_fort_fn = NULL;
|
||||
strncpy (ompi_mpi_errhandler_null.eh_name, "MPI_ERRHANDLER_NULL",
|
||||
ompi_mpi_errhandler_null.eh.eh_mpi_object_type = OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
||||
ompi_mpi_errhandler_null.eh.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
||||
ompi_mpi_errhandler_null.eh.eh_comm_fn = NULL;
|
||||
ompi_mpi_errhandler_null.eh.eh_file_fn = NULL;
|
||||
ompi_mpi_errhandler_null.eh.eh_win_fn = NULL ;
|
||||
ompi_mpi_errhandler_null.eh.eh_fort_fn = NULL;
|
||||
strncpy (ompi_mpi_errhandler_null.eh.eh_name, "MPI_ERRHANDLER_NULL",
|
||||
strlen("MPI_ERRHANDLER_NULL")+1 );
|
||||
|
||||
|
||||
OBJ_CONSTRUCT( &ompi_mpi_errors_are_fatal, ompi_errhandler_t );
|
||||
if( ompi_mpi_errors_are_fatal.eh_f_to_c_index != OMPI_ERRORS_ARE_FATAL_FORTRAN )
|
||||
OBJ_CONSTRUCT( &ompi_mpi_errors_are_fatal.eh, ompi_errhandler_t );
|
||||
if( ompi_mpi_errors_are_fatal.eh.eh_f_to_c_index != OMPI_ERRORS_ARE_FATAL_FORTRAN )
|
||||
return OMPI_ERROR;
|
||||
ompi_mpi_errors_are_fatal.eh_mpi_object_type = OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
||||
ompi_mpi_errors_are_fatal.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
||||
ompi_mpi_errors_are_fatal.eh_comm_fn = ompi_mpi_errors_are_fatal_comm_handler;
|
||||
ompi_mpi_errors_are_fatal.eh_file_fn = ompi_mpi_errors_are_fatal_file_handler;
|
||||
ompi_mpi_errors_are_fatal.eh_win_fn = ompi_mpi_errors_are_fatal_win_handler ;
|
||||
ompi_mpi_errors_are_fatal.eh_fort_fn = NULL;
|
||||
strncpy (ompi_mpi_errors_are_fatal.eh_name, "MPI_ERRORS_ARE_FATAL",
|
||||
ompi_mpi_errors_are_fatal.eh.eh_mpi_object_type = OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
||||
ompi_mpi_errors_are_fatal.eh.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
||||
ompi_mpi_errors_are_fatal.eh.eh_comm_fn = ompi_mpi_errors_are_fatal_comm_handler;
|
||||
ompi_mpi_errors_are_fatal.eh.eh_file_fn = ompi_mpi_errors_are_fatal_file_handler;
|
||||
ompi_mpi_errors_are_fatal.eh.eh_win_fn = ompi_mpi_errors_are_fatal_win_handler ;
|
||||
ompi_mpi_errors_are_fatal.eh.eh_fort_fn = NULL;
|
||||
strncpy (ompi_mpi_errors_are_fatal.eh.eh_name, "MPI_ERRORS_ARE_FATAL",
|
||||
strlen("MPI_ERRORS_ARE_FATAL")+1 );
|
||||
|
||||
OBJ_CONSTRUCT( &ompi_mpi_errors_return, ompi_errhandler_t );
|
||||
if( ompi_mpi_errors_return.eh_f_to_c_index != OMPI_ERRORS_RETURN_FORTRAN )
|
||||
OBJ_CONSTRUCT( &ompi_mpi_errors_return.eh, ompi_errhandler_t );
|
||||
if( ompi_mpi_errors_return.eh.eh_f_to_c_index != OMPI_ERRORS_RETURN_FORTRAN )
|
||||
return OMPI_ERROR;
|
||||
ompi_mpi_errors_return.eh_mpi_object_type = OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
||||
ompi_mpi_errors_return.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
||||
ompi_mpi_errors_return.eh_comm_fn = ompi_mpi_errors_return_comm_handler;
|
||||
ompi_mpi_errors_return.eh_file_fn = ompi_mpi_errors_return_file_handler;
|
||||
ompi_mpi_errors_return.eh_win_fn = ompi_mpi_errors_return_win_handler;
|
||||
ompi_mpi_errors_return.eh_fort_fn = NULL;
|
||||
strncpy (ompi_mpi_errors_return.eh_name, "MPI_ERRORS_RETURN",
|
||||
ompi_mpi_errors_return.eh.eh_mpi_object_type = OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
||||
ompi_mpi_errors_return.eh.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
||||
ompi_mpi_errors_return.eh.eh_comm_fn = ompi_mpi_errors_return_comm_handler;
|
||||
ompi_mpi_errors_return.eh.eh_file_fn = ompi_mpi_errors_return_file_handler;
|
||||
ompi_mpi_errors_return.eh.eh_win_fn = ompi_mpi_errors_return_win_handler;
|
||||
ompi_mpi_errors_return.eh.eh_fort_fn = NULL;
|
||||
strncpy (ompi_mpi_errors_return.eh.eh_name, "MPI_ERRORS_RETURN",
|
||||
strlen("MPI_ERRORS_RETURN")+1 );
|
||||
|
||||
/* If we're going to use C++, functions will be fixed up during
|
||||
@ -119,19 +120,18 @@ int ompi_errhandler_init(void)
|
||||
the dispatch function is in C (although in libmpi_cxx); the
|
||||
conversion from C handles to C++ handles happens in that dispatch
|
||||
function -- not the errhandler_invoke.c stuff here in libmpi. */
|
||||
OBJ_CONSTRUCT( &ompi_mpi_errors_throw_exceptions, ompi_errhandler_t );
|
||||
ompi_mpi_errors_throw_exceptions.eh_mpi_object_type =
|
||||
OBJ_CONSTRUCT( &ompi_mpi_errors_throw_exceptions.eh, ompi_errhandler_t );
|
||||
ompi_mpi_errors_throw_exceptions.eh.eh_mpi_object_type =
|
||||
OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
||||
ompi_mpi_errors_throw_exceptions.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
||||
ompi_mpi_errors_throw_exceptions.eh_comm_fn =
|
||||
ompi_mpi_errors_throw_exceptions.eh.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
||||
ompi_mpi_errors_throw_exceptions.eh.eh_comm_fn =
|
||||
ompi_mpi_errors_are_fatal_comm_handler;
|
||||
ompi_mpi_errors_throw_exceptions.eh_file_fn =
|
||||
ompi_mpi_errors_throw_exceptions.eh.eh_file_fn =
|
||||
ompi_mpi_errors_are_fatal_file_handler;
|
||||
ompi_mpi_errors_throw_exceptions.eh_win_fn =
|
||||
ompi_mpi_errors_throw_exceptions.eh.eh_win_fn =
|
||||
ompi_mpi_errors_are_fatal_win_handler ;
|
||||
ompi_mpi_errors_throw_exceptions.eh_fort_fn = NULL;
|
||||
strncpy (ompi_mpi_errors_throw_exceptions.eh_name,
|
||||
"MPI_ERRORS_THROW_EXCEPTIONS",
|
||||
ompi_mpi_errors_throw_exceptions.eh.eh_fort_fn = NULL;
|
||||
strncpy (ompi_mpi_errors_throw_exceptions.eh.eh_name, "MPI_ERRORS_THROW_EXCEPTIONS",
|
||||
strlen("MPI_ERRORS_THROW_EXCEPTIONS")+1 );
|
||||
|
||||
/* All done */
|
||||
@ -154,16 +154,16 @@ int ompi_errhandler_finalize(void)
|
||||
freed. */
|
||||
|
||||
while (!null_freed) {
|
||||
OBJ_DESTRUCT(&ompi_mpi_errhandler_null);
|
||||
OBJ_DESTRUCT(&ompi_mpi_errhandler_null.eh);
|
||||
}
|
||||
while (!fatal_freed) {
|
||||
OBJ_DESTRUCT(&ompi_mpi_errors_are_fatal);
|
||||
OBJ_DESTRUCT(&ompi_mpi_errors_are_fatal.eh);
|
||||
}
|
||||
while (!return_freed) {
|
||||
OBJ_DESTRUCT(&ompi_mpi_errors_return);
|
||||
OBJ_DESTRUCT(&ompi_mpi_errors_return.eh);
|
||||
}
|
||||
while (!throw_freed) {
|
||||
OBJ_DESTRUCT(&ompi_mpi_errors_throw_exceptions);
|
||||
OBJ_DESTRUCT(&ompi_mpi_errors_throw_exceptions.eh);
|
||||
}
|
||||
|
||||
/* JMS Add stuff here checking for unreleased errorhandlers,
|
||||
@ -281,13 +281,13 @@ static void ompi_errhandler_destruct(ompi_errhandler_t *errhandler)
|
||||
/* Reset the static state if we're releasing one of the
|
||||
intrinsics */
|
||||
|
||||
if (&ompi_mpi_errhandler_null == errhandler) {
|
||||
if (&ompi_mpi_errhandler_null.eh == errhandler) {
|
||||
null_freed = true;
|
||||
} else if (&ompi_mpi_errors_are_fatal == errhandler) {
|
||||
} else if (&ompi_mpi_errors_are_fatal.eh == errhandler) {
|
||||
fatal_freed = true;
|
||||
} else if (&ompi_mpi_errors_return == errhandler) {
|
||||
} else if (&ompi_mpi_errors_return.eh == errhandler) {
|
||||
return_freed = true;
|
||||
} else if (&ompi_mpi_errors_throw_exceptions == errhandler) {
|
||||
} else if (&ompi_mpi_errors_throw_exceptions.eh == errhandler) {
|
||||
throw_freed = true;
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -127,27 +127,41 @@ struct ompi_errhandler_t {
|
||||
};
|
||||
typedef struct ompi_errhandler_t ompi_errhandler_t;
|
||||
|
||||
/**
|
||||
* Padded struct to maintain back compatibiltiy.
|
||||
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
|
||||
* for full explanation why we chose the following padding construct for predefines.
|
||||
*/
|
||||
#define PREDEFINED_ERRHANDLER_PAD 1024
|
||||
|
||||
struct ompi_predefined_errhandler_t {
|
||||
struct ompi_errhandler_t eh;
|
||||
char padding[PREDEFINED_ERRHANDLER_PAD - sizeof(ompi_errhandler_t)];
|
||||
};
|
||||
|
||||
typedef struct ompi_predefined_errhandler_t ompi_predefined_errhandler_t;
|
||||
|
||||
|
||||
/**
|
||||
* Global variable for MPI_ERRHANDLER_NULL
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_errhandler_t ompi_mpi_errhandler_null;
|
||||
OMPI_DECLSPEC extern ompi_predefined_errhandler_t ompi_mpi_errhandler_null;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_ERRORS_ARE_FATAL
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_errhandler_t ompi_mpi_errors_are_fatal;
|
||||
OMPI_DECLSPEC extern ompi_predefined_errhandler_t ompi_mpi_errors_are_fatal;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_ERRORS_RETURN
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_errhandler_t ompi_mpi_errors_return;
|
||||
OMPI_DECLSPEC extern ompi_predefined_errhandler_t ompi_mpi_errors_return;
|
||||
|
||||
/**
|
||||
* Global variable for MPI::ERRORS_THROW_EXCEPTIONS. Will abort if
|
||||
* MPI_INIT wasn't called as MPI::INIT
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_errhandler_t ompi_mpi_errors_throw_exceptions;
|
||||
OMPI_DECLSPEC extern ompi_predefined_errhandler_t ompi_mpi_errors_throw_exceptions;
|
||||
|
||||
/**
|
||||
* Table for Fortran <-> C errhandler handle conversion
|
||||
|
@ -11,6 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -292,7 +293,7 @@ static void backend_fatal(char *type, struct ompi_communicator_t *comm,
|
||||
/* Should we do something more intelligent than just using
|
||||
COMM_SELF? */
|
||||
if (comm == NULL) {
|
||||
comm = &ompi_mpi_comm_self;
|
||||
comm = &ompi_mpi_comm_self.comm;
|
||||
}
|
||||
|
||||
if (NULL != error_code) {
|
||||
|
@ -10,7 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +20,7 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "ompi/file/file.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/util/output.h"
|
||||
@ -35,7 +36,7 @@ opal_pointer_array_t ompi_file_f_to_c_table;
|
||||
/*
|
||||
* MPI_FILE_NULL
|
||||
*/
|
||||
ompi_file_t ompi_mpi_file_null;
|
||||
ompi_predefined_file_t ompi_mpi_file_null;
|
||||
|
||||
|
||||
/*
|
||||
@ -70,12 +71,12 @@ int ompi_file_init(void)
|
||||
/* Setup MPI_FILE_NULL. Note that it will have the default error
|
||||
handler of MPI_ERRORS_RETURN, per MPI-2:9.7 (p265). */
|
||||
|
||||
OBJ_CONSTRUCT(&ompi_mpi_file_null, ompi_file_t);
|
||||
ompi_mpi_file_null.f_comm = &ompi_mpi_comm_null;
|
||||
OBJ_RETAIN(ompi_mpi_file_null.f_comm);
|
||||
ompi_mpi_file_null.f_f_to_c_index = 0;
|
||||
OBJ_CONSTRUCT(&ompi_mpi_file_null.file, ompi_file_t);
|
||||
ompi_mpi_file_null.file.f_comm = &ompi_mpi_comm_null.comm;
|
||||
OBJ_RETAIN(ompi_mpi_file_null.file.f_comm);
|
||||
ompi_mpi_file_null.file.f_f_to_c_index = 0;
|
||||
opal_pointer_array_set_item(&ompi_file_f_to_c_table, 0,
|
||||
&ompi_mpi_file_null);
|
||||
&ompi_mpi_file_null.file);
|
||||
|
||||
/* All done */
|
||||
|
||||
@ -145,7 +146,7 @@ int ompi_file_close(ompi_file_t **file)
|
||||
mca_io_base_component_del(&((*file)->f_io_selected_component));
|
||||
mca_io_base_request_return(*file);
|
||||
OBJ_RELEASE(*file);
|
||||
*file = &ompi_mpi_file_null;
|
||||
*file = &ompi_mpi_file_null.file;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -164,7 +165,7 @@ int ompi_file_finalize(void)
|
||||
report on it. Plus, it's statically allocated, so we don't want
|
||||
to call OBJ_RELEASE on it. */
|
||||
|
||||
OBJ_DESTRUCT(&ompi_mpi_file_null);
|
||||
OBJ_DESTRUCT(&ompi_mpi_file_null.file);
|
||||
opal_pointer_array_set_item(&ompi_file_f_to_c_table, 0, NULL);
|
||||
|
||||
/* Iterate through all the file handles and destroy them. Note
|
||||
@ -239,10 +240,10 @@ static void file_constructor(ompi_file_t *file)
|
||||
MPI_FILE_NULL). */
|
||||
|
||||
file->errhandler_type = OMPI_ERRHANDLER_TYPE_FILE;
|
||||
if (file != &ompi_mpi_file_null) {
|
||||
file->error_handler = ompi_mpi_file_null.error_handler;
|
||||
if (file != &ompi_mpi_file_null.file) {
|
||||
file->error_handler = ompi_mpi_file_null.file.error_handler;
|
||||
} else {
|
||||
file->error_handler = &ompi_mpi_errors_return;
|
||||
file->error_handler = &ompi_mpi_errors_return.eh;
|
||||
}
|
||||
OBJ_RETAIN(file->error_handler);
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -96,11 +97,23 @@ struct ompi_file_t {
|
||||
*/
|
||||
typedef struct ompi_file_t ompi_file_t;
|
||||
|
||||
/**
|
||||
* Padded struct to maintain back compatibiltiy.
|
||||
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
|
||||
* for full explanation why we chose the following padding construct for predefines.
|
||||
*/
|
||||
#define PREDEFINED_FILE_PAD (sizeof(void*) * 192)
|
||||
|
||||
struct ompi_predefined_file_t {
|
||||
struct ompi_file_t file;
|
||||
char padding[PREDEFINED_FILE_PAD - sizeof(ompi_file_t)];
|
||||
};
|
||||
typedef struct ompi_predefined_file_t ompi_predefined_file_t;
|
||||
|
||||
/**
|
||||
* Back-end instances for MPI_FILE_NULL
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_file_t ompi_mpi_file_null;
|
||||
OMPI_DECLSPEC extern ompi_predefined_file_t ompi_mpi_file_null;
|
||||
|
||||
|
||||
/**
|
||||
@ -193,7 +206,7 @@ int ompi_file_finalize(void);
|
||||
static inline bool ompi_file_invalid(ompi_file_t *file)
|
||||
{
|
||||
return (NULL == file ||
|
||||
&ompi_mpi_file_null == file ||
|
||||
&ompi_mpi_file_null.file == file ||
|
||||
0 != (file->f_flags & OMPI_FILE_ISCLOSED));
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2007 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -96,6 +97,19 @@ struct ompi_group_t {
|
||||
typedef struct ompi_group_t ompi_group_t;
|
||||
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_group_t);
|
||||
|
||||
/**
|
||||
* Padded struct to maintain back compatibiltiy.
|
||||
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
|
||||
* for full explanation why we chose the following padding construct for predefines.
|
||||
*/
|
||||
#define PREDEFINED_GROUP_PAD (sizeof(void*) * 32)
|
||||
|
||||
struct ompi_predefined_group_t {
|
||||
struct ompi_group_t group;
|
||||
char padding[PREDEFINED_GROUP_PAD - sizeof(ompi_group_t)];
|
||||
};
|
||||
|
||||
typedef struct ompi_predefined_group_t ompi_predefined_group_t;
|
||||
|
||||
/* Some definitions for the flags */
|
||||
#define OMPI_GROUP_ISFREED 0x00000001
|
||||
@ -122,11 +136,12 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_group_t);
|
||||
* Table for Fortran <-> C group handle conversion
|
||||
*/
|
||||
OMPI_DECLSPEC extern struct opal_pointer_array_t ompi_group_f_to_c_table;
|
||||
OMPI_DECLSPEC extern ompi_group_t ompi_mpi_group_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_group_t ompi_mpi_group_null;
|
||||
|
||||
|
||||
/*
|
||||
* function prototypes
|
||||
* function prototype
|
||||
s
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2007 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -41,8 +42,8 @@ opal_pointer_array_t ompi_group_f_to_c_table;
|
||||
/*
|
||||
* Predefined group objects
|
||||
*/
|
||||
ompi_group_t ompi_mpi_group_empty;
|
||||
ompi_group_t ompi_mpi_group_null;
|
||||
ompi_predefined_group_t ompi_mpi_group_empty;
|
||||
ompi_predefined_group_t ompi_mpi_group_null;
|
||||
|
||||
|
||||
/*
|
||||
@ -313,19 +314,19 @@ int ompi_group_init(void)
|
||||
|
||||
/* add MPI_GROUP_NULL to table */
|
||||
OBJ_CONSTRUCT(&ompi_mpi_group_null, ompi_group_t);
|
||||
ompi_mpi_group_null.grp_proc_count = 0;
|
||||
ompi_mpi_group_null.grp_my_rank = MPI_PROC_NULL;
|
||||
ompi_mpi_group_null.grp_proc_pointers = NULL;
|
||||
ompi_mpi_group_null.grp_flags |= OMPI_GROUP_DENSE;
|
||||
ompi_mpi_group_null.grp_flags |= OMPI_GROUP_INTRINSIC;
|
||||
ompi_mpi_group_null.group.grp_proc_count = 0;
|
||||
ompi_mpi_group_null.group.grp_my_rank = MPI_PROC_NULL;
|
||||
ompi_mpi_group_null.group.grp_proc_pointers = NULL;
|
||||
ompi_mpi_group_null.group.grp_flags |= OMPI_GROUP_DENSE;
|
||||
ompi_mpi_group_null.group.grp_flags |= OMPI_GROUP_INTRINSIC;
|
||||
|
||||
/* add MPI_GROUP_EMPTRY to table */
|
||||
OBJ_CONSTRUCT(&ompi_mpi_group_empty, ompi_group_t);
|
||||
ompi_mpi_group_empty.grp_proc_count = 0;
|
||||
ompi_mpi_group_empty.grp_my_rank = MPI_UNDEFINED;
|
||||
ompi_mpi_group_empty.grp_proc_pointers = NULL;
|
||||
ompi_mpi_group_empty.grp_flags |= OMPI_GROUP_DENSE;
|
||||
ompi_mpi_group_empty.grp_flags |= OMPI_GROUP_INTRINSIC;
|
||||
ompi_mpi_group_empty.group.grp_proc_count = 0;
|
||||
ompi_mpi_group_empty.group.grp_my_rank = MPI_UNDEFINED;
|
||||
ompi_mpi_group_empty.group.grp_proc_pointers = NULL;
|
||||
ompi_mpi_group_empty.group.grp_flags |= OMPI_GROUP_DENSE;
|
||||
ompi_mpi_group_empty.group.grp_flags |= OMPI_GROUP_INTRINSIC;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -336,10 +337,10 @@ int ompi_group_init(void)
|
||||
*/
|
||||
int ompi_group_finalize(void)
|
||||
{
|
||||
ompi_mpi_group_null.grp_flags = 0;
|
||||
ompi_mpi_group_null.group.grp_flags = 0;
|
||||
OBJ_DESTRUCT(&ompi_mpi_group_null);
|
||||
|
||||
ompi_mpi_group_null.grp_flags = 0;
|
||||
ompi_mpi_group_null.group.grp_flags = 0;
|
||||
OBJ_DESTRUCT(&ompi_mpi_group_empty);
|
||||
|
||||
OBJ_DESTRUCT(&ompi_group_f_to_c_table);
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -480,15 +480,15 @@ enum {
|
||||
/*
|
||||
* NULL handles
|
||||
*/
|
||||
#define MPI_GROUP_NULL (&ompi_mpi_group_null)
|
||||
#define MPI_COMM_NULL (&ompi_mpi_comm_null)
|
||||
#define MPI_REQUEST_NULL (&ompi_request_null)
|
||||
#define MPI_OP_NULL (&ompi_mpi_op_null)
|
||||
#define MPI_ERRHANDLER_NULL (&ompi_mpi_errhandler_null)
|
||||
#define MPI_INFO_NULL (&ompi_mpi_info_null)
|
||||
#define MPI_WIN_NULL (&ompi_mpi_win_null)
|
||||
#define MPI_GROUP_NULL (((MPI_Group)&(ompi_mpi_group_null)))
|
||||
#define MPI_COMM_NULL (((MPI_Comm)&(ompi_mpi_comm_null)))
|
||||
#define MPI_REQUEST_NULL (((MPI_Request)&(ompi_request_null)))
|
||||
#define MPI_OP_NULL (((MPI_Op)&(ompi_mpi_op_null)))
|
||||
#define MPI_ERRHANDLER_NULL (((MPI_Errhandler)&(ompi_mpi_errhandler_null)))
|
||||
#define MPI_INFO_NULL (((MPI_Info)&(ompi_mpi_info_null)))
|
||||
#define MPI_WIN_NULL (((MPI_Win)&(ompi_mpi_win_null)))
|
||||
#if OMPI_PROVIDE_MPI_FILE_INTERFACE
|
||||
#define MPI_FILE_NULL (&ompi_mpi_file_null)
|
||||
#define MPI_FILE_NULL (((MPI_File)&(ompi_mpi_file_null)))
|
||||
#endif
|
||||
|
||||
#define MPI_STATUS_IGNORE ((MPI_Status *) 0)
|
||||
@ -596,111 +596,119 @@ OMPI_DECLSPEC int OMPI_C_MPI_WIN_DUP_FN( MPI_Win window, int win_keyval,
|
||||
void* attribute_val_out,
|
||||
int* flag );
|
||||
|
||||
|
||||
/*
|
||||
* External variables
|
||||
*
|
||||
* The below externs use the ompi_predefined_xxx_t structures to maintain
|
||||
* back compatibility between MPI library versions.
|
||||
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
|
||||
* for full explanation why we chose to use the ompi_predefined_xxx_t structure.
|
||||
*/
|
||||
OMPI_DECLSPEC extern struct ompi_communicator_t ompi_mpi_comm_world;
|
||||
OMPI_DECLSPEC extern struct ompi_communicator_t ompi_mpi_comm_self;
|
||||
OMPI_DECLSPEC extern struct ompi_communicator_t ompi_mpi_comm_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_communicator_t ompi_mpi_comm_world;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_communicator_t ompi_mpi_comm_self;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_communicator_t ompi_mpi_comm_null;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_group_t ompi_mpi_group_empty;
|
||||
OMPI_DECLSPEC extern struct ompi_group_t ompi_mpi_group_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_group_t ompi_mpi_group_empty;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_group_t ompi_mpi_group_null;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_request_t ompi_request_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_request_t ompi_request_null;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_null;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_max, ompi_mpi_op_min;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_sum, ompi_mpi_op_prod;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_land, ompi_mpi_op_band;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_lor, ompi_mpi_op_bor;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_lxor, ompi_mpi_op_bxor;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_maxloc, ompi_mpi_op_minloc;
|
||||
OMPI_DECLSPEC extern struct ompi_op_t ompi_mpi_op_replace;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_max, ompi_mpi_op_min;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_sum;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_prod;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_land;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_band;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_lor, ompi_mpi_op_bor;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_lxor;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_bxor;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_maxloc;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_minloc;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_replace;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_char, ompi_mpi_byte;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_int, ompi_mpi_logic;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_short, ompi_mpi_long;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_float, ompi_mpi_double;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_long_double;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_cplex, ompi_mpi_packed;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_signed_char;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_unsigned_char;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_unsigned_short;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_unsigned, ompi_mpi_datatype_null;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_unsigned_long, ompi_mpi_ldblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_ub, ompi_mpi_lb;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_float_int, ompi_mpi_double_int;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_long_int, ompi_mpi_2int;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_short_int, ompi_mpi_dblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer, ompi_mpi_real;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_dblprec, ompi_mpi_character;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_2real, ompi_mpi_2dblprec;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_2integer, ompi_mpi_longdbl_int;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_wchar, ompi_mpi_long_long_int;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_unsigned_long_long;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_cxx_cplex, ompi_mpi_cxx_dblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_cxx_ldblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_cxx_bool;
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_2cplex, ompi_mpi_2dblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_char, ompi_mpi_byte;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_int, ompi_mpi_logic;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_short, ompi_mpi_long;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_float, ompi_mpi_double;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_long_double;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_cplex, ompi_mpi_packed;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_signed_char;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_unsigned_char;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_unsigned_short;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_unsigned, ompi_mpi_datatype_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_unsigned_long, ompi_mpi_ldblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_ub, ompi_mpi_lb;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_float_int, ompi_mpi_double_int;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_long_int, ompi_mpi_2int;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_short_int, ompi_mpi_dblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer, ompi_mpi_real;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_dblprec, ompi_mpi_character;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_2real, ompi_mpi_2dblprec;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_2integer, ompi_mpi_longdbl_int;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_wchar, ompi_mpi_long_long_int;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_unsigned_long_long;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_cxx_cplex, ompi_mpi_cxx_dblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_cxx_ldblcplex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_cxx_bool;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_2cplex, ompi_mpi_2dblcplex;
|
||||
/* other MPI2 datatypes */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL1
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_logical1;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_logical1;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL2
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_logical2;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_logical2;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL4
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_logical4;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_logical4;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL8
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_logical8;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_logical8;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER1
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer1;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer1;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER2
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer2;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer2;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER4
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer4;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer4;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER8
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer8;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer8;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER16
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer16;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_integer16;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL2
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_real2;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real2;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL4
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_real4;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real4;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL8
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_real8;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real8;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL16
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_real16;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real16;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL4
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_complex8;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex8;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL8
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_complex16;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex16;
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL16
|
||||
OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_complex32;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex32;
|
||||
#endif
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_errhandler_t ompi_mpi_errhandler_null;
|
||||
OMPI_DECLSPEC extern struct ompi_errhandler_t ompi_mpi_errors_are_fatal;
|
||||
OMPI_DECLSPEC extern struct ompi_errhandler_t ompi_mpi_errors_return;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_errhandler_t ompi_mpi_errhandler_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_errhandler_t ompi_mpi_errors_are_fatal;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_errhandler_t ompi_mpi_errors_return;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_win_t ompi_mpi_win_null;
|
||||
OMPI_DECLSPEC extern struct ompi_file_t ompi_mpi_file_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_win_t ompi_mpi_win_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_file_t ompi_mpi_file_null;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_info_t ompi_mpi_info_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_info_t ompi_mpi_info_null;
|
||||
|
||||
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUS_IGNORE;
|
||||
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;
|
||||
@ -708,117 +716,117 @@ OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;
|
||||
/*
|
||||
* MPI predefined handles
|
||||
*/
|
||||
#define MPI_COMM_WORLD (&ompi_mpi_comm_world)
|
||||
#define MPI_COMM_SELF (&ompi_mpi_comm_self)
|
||||
#define MPI_COMM_WORLD (((MPI_Comm)&(ompi_mpi_comm_world)))
|
||||
#define MPI_COMM_SELF (((MPI_Comm)&(ompi_mpi_comm_self)))
|
||||
|
||||
#define MPI_GROUP_EMPTY (&ompi_mpi_group_empty)
|
||||
#define MPI_GROUP_EMPTY (((MPI_Group)&(ompi_mpi_group_empty)))
|
||||
|
||||
#define MPI_MAX (&ompi_mpi_op_max)
|
||||
#define MPI_MIN (&ompi_mpi_op_min)
|
||||
#define MPI_SUM (&ompi_mpi_op_sum)
|
||||
#define MPI_PROD (&ompi_mpi_op_prod)
|
||||
#define MPI_LAND (&ompi_mpi_op_land)
|
||||
#define MPI_BAND (&ompi_mpi_op_band)
|
||||
#define MPI_LOR (&ompi_mpi_op_lor)
|
||||
#define MPI_BOR (&ompi_mpi_op_bor)
|
||||
#define MPI_LXOR (&ompi_mpi_op_lxor)
|
||||
#define MPI_BXOR (&ompi_mpi_op_bxor)
|
||||
#define MPI_MAXLOC (&ompi_mpi_op_maxloc)
|
||||
#define MPI_MINLOC (&ompi_mpi_op_minloc)
|
||||
#define MPI_REPLACE (&ompi_mpi_op_replace)
|
||||
#define MPI_MAX (((MPI_Op)&(ompi_mpi_op_max)))
|
||||
#define MPI_MIN (((MPI_Op)&(ompi_mpi_op_min)))
|
||||
#define MPI_SUM (((MPI_Op)&(ompi_mpi_op_sum)))
|
||||
#define MPI_PROD (((MPI_Op)&(ompi_mpi_op_prod)))
|
||||
#define MPI_LAND (((MPI_Op)&(ompi_mpi_op_land)))
|
||||
#define MPI_BAND (((MPI_Op)&(ompi_mpi_op_band)))
|
||||
#define MPI_LOR (((MPI_Op)&(ompi_mpi_op_lor)))
|
||||
#define MPI_BOR (((MPI_Op)&(ompi_mpi_op_bor)))
|
||||
#define MPI_LXOR (((MPI_Op)&(ompi_mpi_op_lxor)))
|
||||
#define MPI_BXOR (((MPI_Op)&(ompi_mpi_op_bxor)))
|
||||
#define MPI_MAXLOC (((MPI_Op)&(ompi_mpi_op_maxloc)))
|
||||
#define MPI_MINLOC (((MPI_Op)&(ompi_mpi_op_minloc)))
|
||||
#define MPI_REPLACE (((MPI_Op)&(ompi_mpi_op_replace)))
|
||||
|
||||
/* C datatypes */
|
||||
#define MPI_DATATYPE_NULL (&ompi_mpi_datatype_null)
|
||||
#define MPI_BYTE (&ompi_mpi_byte)
|
||||
#define MPI_PACKED (&ompi_mpi_packed)
|
||||
#define MPI_CHAR (&ompi_mpi_char)
|
||||
#define MPI_SHORT (&ompi_mpi_short)
|
||||
#define MPI_INT (&ompi_mpi_int)
|
||||
#define MPI_LONG (&ompi_mpi_long)
|
||||
#define MPI_FLOAT (&ompi_mpi_float)
|
||||
#define MPI_DOUBLE (&ompi_mpi_double)
|
||||
#define MPI_LONG_DOUBLE (&ompi_mpi_long_double)
|
||||
#define MPI_UNSIGNED_CHAR (&ompi_mpi_unsigned_char)
|
||||
#define MPI_SIGNED_CHAR (&ompi_mpi_signed_char)
|
||||
#define MPI_UNSIGNED_SHORT (&ompi_mpi_unsigned_short)
|
||||
#define MPI_UNSIGNED_LONG (&ompi_mpi_unsigned_long)
|
||||
#define MPI_UNSIGNED (&ompi_mpi_unsigned)
|
||||
#define MPI_FLOAT_INT (&ompi_mpi_float_int)
|
||||
#define MPI_DOUBLE_INT (&ompi_mpi_double_int)
|
||||
#define MPI_LONG_DOUBLE_INT (&ompi_mpi_longdbl_int)
|
||||
#define MPI_LONG_INT (&ompi_mpi_long_int)
|
||||
#define MPI_SHORT_INT (&ompi_mpi_short_int)
|
||||
#define MPI_2INT (&ompi_mpi_2int)
|
||||
#define MPI_UB (&ompi_mpi_ub)
|
||||
#define MPI_LB (&ompi_mpi_lb)
|
||||
#define MPI_WCHAR (&ompi_mpi_wchar)
|
||||
#define MPI_DATATYPE_NULL (((MPI_Datatype)&(ompi_mpi_datatype_null)))
|
||||
#define MPI_BYTE (((MPI_Datatype)&(ompi_mpi_byte)))
|
||||
#define MPI_PACKED (((MPI_Datatype)&(ompi_mpi_packed)))
|
||||
#define MPI_CHAR (((MPI_Datatype)&(ompi_mpi_char)))
|
||||
#define MPI_SHORT (((MPI_Datatype)&(ompi_mpi_short)))
|
||||
#define MPI_INT (((MPI_Datatype)&(ompi_mpi_int)))
|
||||
#define MPI_LONG (((MPI_Datatype)&(ompi_mpi_long)))
|
||||
#define MPI_FLOAT (((MPI_Datatype)&(ompi_mpi_float)))
|
||||
#define MPI_DOUBLE (((MPI_Datatype)&(ompi_mpi_double)))
|
||||
#define MPI_LONG_DOUBLE (((MPI_Datatype)&(ompi_mpi_long_double)))
|
||||
#define MPI_UNSIGNED_CHAR (((MPI_Datatype)&(ompi_mpi_unsigned_char)))
|
||||
#define MPI_SIGNED_CHAR (((MPI_Datatype)&(ompi_mpi_signed_char)))
|
||||
#define MPI_UNSIGNED_SHORT (((MPI_Datatype)&(ompi_mpi_unsigned_short)))
|
||||
#define MPI_UNSIGNED_LONG (((MPI_Datatype)&(ompi_mpi_unsigned_long)))
|
||||
#define MPI_UNSIGNED (((MPI_Datatype)&(ompi_mpi_unsigned)))
|
||||
#define MPI_FLOAT_INT (((MPI_Datatype)&(ompi_mpi_float_int)))
|
||||
#define MPI_DOUBLE_INT (((MPI_Datatype)&(ompi_mpi_double_int)))
|
||||
#define MPI_LONG_DOUBLE_INT (((MPI_Datatype)&(ompi_mpi_longdbl_int)))
|
||||
#define MPI_LONG_INT (((MPI_Datatype)&(ompi_mpi_long_int)))
|
||||
#define MPI_SHORT_INT (((MPI_Datatype)&(ompi_mpi_short_int)))
|
||||
#define MPI_2INT (((MPI_Datatype)&(ompi_mpi_2int)))
|
||||
#define MPI_UB (((MPI_Datatype)&(ompi_mpi_ub)))
|
||||
#define MPI_LB (((MPI_Datatype)&(ompi_mpi_lb)))
|
||||
#define MPI_WCHAR (((MPI_Datatype)&(ompi_mpi_wchar)))
|
||||
#if OMPI_HAVE_LONG_LONG
|
||||
#define MPI_LONG_LONG_INT (&ompi_mpi_long_long_int)
|
||||
#define MPI_LONG_LONG (&ompi_mpi_long_long_int)
|
||||
#define MPI_UNSIGNED_LONG_LONG (&ompi_mpi_unsigned_long_long)
|
||||
#define MPI_LONG_LONG_INT (((MPI_Datatype)&(ompi_mpi_long_long_int)))
|
||||
#define MPI_LONG_LONG (((MPI_Datatype)&(ompi_mpi_long_long_int)))
|
||||
#define MPI_UNSIGNED_LONG_LONG (((MPI_Datatype)&(ompi_mpi_unsigned_long_long)))
|
||||
#endif /* OMPI_HAVE_LONG_LONG */
|
||||
#define MPI_2COMPLEX (&ompi_mpi_2cplex)
|
||||
#define MPI_2DOUBLE_COMPLEX (&ompi_mpi_2dblcplex)
|
||||
#define MPI_2COMPLEX (((MPI_Datatype)&(ompi_mpi_2cplex)))
|
||||
#define MPI_2DOUBLE_COMPLEX (((MPI_Datatype)&(ompi_mpi_2dblcplex)))
|
||||
|
||||
/* Fortran datatype bindings */
|
||||
#define MPI_CHARACTER (&ompi_mpi_character)
|
||||
#define MPI_LOGICAL (&ompi_mpi_logic)
|
||||
#define MPI_CHARACTER (((MPI_Datatype)&(ompi_mpi_character)))
|
||||
#define MPI_LOGICAL (((MPI_Datatype)&(ompi_mpi_logic)))
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL1
|
||||
#define MPI_LOGICAL1 (&ompi_mpi_logical1)
|
||||
#define MPI_LOGICAL1 (((MPI_Datatype)&(ompi_mpi_logical1)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL2
|
||||
#define MPI_LOGICAL2 (&ompi_mpi_logical2)
|
||||
#define MPI_LOGICAL2 (((MPI_Datatype)&(ompi_mpi_logical2)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL4
|
||||
#define MPI_LOGICAL4 (&ompi_mpi_logical4)
|
||||
#define MPI_LOGICAL4 (((MPI_Datatype)&(ompi_mpi_logical4)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL8
|
||||
#define MPI_LOGICAL8 (&ompi_mpi_logical8)
|
||||
#define MPI_LOGICAL8 (((MPI_Datatype)&(ompi_mpi_logical8)))
|
||||
#endif
|
||||
#define MPI_INTEGER (&ompi_mpi_integer)
|
||||
#define MPI_INTEGER (((MPI_Datatype)&(ompi_mpi_integer)))
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER1
|
||||
#define MPI_INTEGER1 (&ompi_mpi_integer1)
|
||||
#define MPI_INTEGER1 (((MPI_Datatype)&(ompi_mpi_integer1)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER2
|
||||
#define MPI_INTEGER2 (&ompi_mpi_integer2)
|
||||
#define MPI_INTEGER2 (((MPI_Datatype)&(ompi_mpi_integer2)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER4
|
||||
#define MPI_INTEGER4 (&ompi_mpi_integer4)
|
||||
#define MPI_INTEGER4 (((MPI_Datatype)&(ompi_mpi_integer4)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER8
|
||||
#define MPI_INTEGER8 (&ompi_mpi_integer8)
|
||||
#define MPI_INTEGER8 (((MPI_Datatype)&(ompi_mpi_integer8)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER16
|
||||
#define MPI_INTEGER16 (&ompi_mpi_integer16)
|
||||
#define MPI_INTEGER16 (((MPI_Datatype)&(ompi_mpi_integer16)))
|
||||
#endif
|
||||
#define MPI_REAL (&ompi_mpi_real)
|
||||
#define MPI_REAL (((MPI_Datatype)&(ompi_mpi_real)))
|
||||
#if OMPI_HAVE_FORTRAN_REAL4
|
||||
#define MPI_REAL4 (&ompi_mpi_real4)
|
||||
#define MPI_REAL4 (((MPI_Datatype)&(ompi_mpi_real4)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL8
|
||||
#define MPI_REAL8 (&ompi_mpi_real8)
|
||||
#define MPI_REAL8 (((MPI_Datatype)&(ompi_mpi_real8)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL16
|
||||
#define MPI_REAL16 (&ompi_mpi_real16)
|
||||
#define MPI_REAL16 (((MPI_Datatype)&(ompi_mpi_real16)))
|
||||
#endif
|
||||
#define MPI_DOUBLE_PRECISION (&ompi_mpi_dblprec)
|
||||
#define MPI_COMPLEX (&ompi_mpi_cplex)
|
||||
#define MPI_DOUBLE_PRECISION (((MPI_Datatype)&(ompi_mpi_dblprec)))
|
||||
#define MPI_COMPLEX (((MPI_Datatype)&(ompi_mpi_cplex)))
|
||||
#if OMPI_HAVE_FORTRAN_REAL4
|
||||
#define MPI_COMPLEX8 (&ompi_mpi_complex8)
|
||||
#define MPI_COMPLEX8 (((MPI_Datatype)&(ompi_mpi_complex8)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL8
|
||||
#define MPI_COMPLEX16 (&ompi_mpi_complex16)
|
||||
#define MPI_COMPLEX16 (((MPI_Datatype)&(ompi_mpi_complex16)))
|
||||
#endif
|
||||
#if OMPI_HAVE_FORTRAN_REAL16
|
||||
#define MPI_COMPLEX32 (&ompi_mpi_complex32)
|
||||
#define MPI_COMPLEX32 (((MPI_Datatype)&(ompi_mpi_complex32)))
|
||||
#endif
|
||||
#define MPI_DOUBLE_COMPLEX (&ompi_mpi_dblcplex)
|
||||
#define MPI_2REAL (&ompi_mpi_2real)
|
||||
#define MPI_2DOUBLE_PRECISION (&ompi_mpi_2dblprec)
|
||||
#define MPI_2INTEGER (&ompi_mpi_2integer)
|
||||
#define MPI_DOUBLE_COMPLEX (((MPI_Datatype)&(ompi_mpi_dblcplex)))
|
||||
#define MPI_2REAL (((MPI_Datatype)&(ompi_mpi_2real)))
|
||||
#define MPI_2DOUBLE_PRECISION (((MPI_Datatype)&(ompi_mpi_2dblprec)))
|
||||
#define MPI_2INTEGER (((MPI_Datatype)&(ompi_mpi_2integer)))
|
||||
|
||||
#define MPI_ERRORS_ARE_FATAL (&ompi_mpi_errors_are_fatal)
|
||||
#define MPI_ERRORS_RETURN (&ompi_mpi_errors_return)
|
||||
#define MPI_ERRORS_ARE_FATAL (((MPI_Errhandler)&(ompi_mpi_errors_are_fatal)))
|
||||
#define MPI_ERRORS_RETURN (((MPI_Errhandler)&(ompi_mpi_errors_return)))
|
||||
|
||||
/* Typeclass definition for MPI_Type_match_size */
|
||||
#define MPI_TYPECLASS_INTEGER 1
|
||||
@ -992,7 +1000,7 @@ OMPI_DECLSPEC int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset,
|
||||
OMPI_DECLSPEC int MPI_File_read_shared(MPI_File fh, void *buf, int count,
|
||||
MPI_Datatype datatype, MPI_Status *status);
|
||||
OMPI_DECLSPEC int MPI_File_write_shared(MPI_File fh, void *buf, int count,
|
||||
MPI_Datatype datatype, MPI_Status *status);
|
||||
MPI_Datatype datatype, MPI_Status *status);
|
||||
OMPI_DECLSPEC int MPI_File_iread_shared(MPI_File fh, void *buf, int count,
|
||||
MPI_Datatype datatype, MPI_Request *request);
|
||||
OMPI_DECLSPEC int MPI_File_iwrite_shared(MPI_File fh, void *buf, int count,
|
||||
|
@ -11,6 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -39,7 +40,7 @@
|
||||
/*
|
||||
* Global variables
|
||||
*/
|
||||
ompi_info_t ompi_mpi_info_null;
|
||||
ompi_predefined_info_t ompi_mpi_info_null;
|
||||
|
||||
|
||||
/*
|
||||
@ -89,8 +90,8 @@ int ompi_info_init(void)
|
||||
|
||||
/* Create MPI_INFO_NULL */
|
||||
|
||||
OBJ_CONSTRUCT(&ompi_mpi_info_null, ompi_info_t);
|
||||
ompi_mpi_info_null.i_f_to_c_index = 0;
|
||||
OBJ_CONSTRUCT(&ompi_mpi_info_null.info, ompi_info_t);
|
||||
ompi_mpi_info_null.info.i_f_to_c_index = 0;
|
||||
|
||||
/* All done */
|
||||
|
||||
@ -348,7 +349,7 @@ int ompi_info_finalize(void)
|
||||
leak report on it. Plus, it's statically allocated, so we
|
||||
don't want to call OBJ_RELEASE on it. */
|
||||
|
||||
OBJ_DESTRUCT(&ompi_mpi_info_null);
|
||||
OBJ_DESTRUCT(&ompi_mpi_info_null.info);
|
||||
opal_pointer_array_set_item(&ompi_info_f_to_c_table, 0, NULL);
|
||||
|
||||
/* Go through the f2c table and see if anything is left. Free them
|
||||
|
@ -11,6 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -52,6 +53,20 @@ struct ompi_info_t {
|
||||
*/
|
||||
typedef struct ompi_info_t ompi_info_t;
|
||||
|
||||
/**
|
||||
* Padded struct to maintain back compatibiltiy.
|
||||
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
|
||||
* for full explanation why we chose the following padding construct for predefines.
|
||||
*/
|
||||
#define PREDEFINED_INFO_PAD (sizeof(void*) * 32)
|
||||
|
||||
struct ompi_predefined_info_t {
|
||||
struct ompi_info_t info;
|
||||
char padding[PREDEFINED_INFO_PAD - sizeof(ompi_info_t)];
|
||||
};
|
||||
typedef struct ompi_predefined_info_t ompi_predefined_info_t;
|
||||
|
||||
|
||||
/**
|
||||
* \internal
|
||||
*
|
||||
@ -81,7 +96,7 @@ extern opal_pointer_array_t ompi_info_f_to_c_table;
|
||||
/**
|
||||
* Global instance for MPI_INFO_NULL
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_info_t ompi_mpi_info_null;
|
||||
OMPI_DECLSPEC extern ompi_predefined_info_t ompi_mpi_info_null;
|
||||
|
||||
/**
|
||||
* \internal
|
||||
|
@ -261,7 +261,7 @@ tuned_module_enable(mca_coll_base_module_t *module,
|
||||
}
|
||||
|
||||
|
||||
if (&ompi_mpi_comm_world==comm) {
|
||||
if (&ompi_mpi_comm_world.comm==comm) {
|
||||
if (ompi_coll_tuned_use_dynamic_rules) {
|
||||
OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:module_init MCW & Dynamic"));
|
||||
if (ompi_coll_tuned_dynamic_rules_filename) {
|
||||
|
@ -11,6 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2008 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -42,6 +43,7 @@
|
||||
#include "orte/runtime/orte_wait.h"
|
||||
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "ompi/group/group.h"
|
||||
#include "ompi/proc/proc.h"
|
||||
#include "ompi/mca/pml/pml.h"
|
||||
#include "ompi/info/info.h"
|
||||
@ -931,11 +933,11 @@ static int dyn_init(void)
|
||||
* objects
|
||||
*/
|
||||
|
||||
oldcomm = &ompi_mpi_comm_null;
|
||||
oldcomm = &ompi_mpi_comm_null.comm;
|
||||
OBJ_RELEASE(oldcomm);
|
||||
group = &ompi_mpi_group_null;
|
||||
group = &ompi_mpi_group_null.group;
|
||||
OBJ_RELEASE(group);
|
||||
errhandler = &ompi_mpi_errors_are_fatal;
|
||||
errhandler = &ompi_mpi_errors_are_fatal.eh;
|
||||
OBJ_RELEASE(errhandler);
|
||||
|
||||
/* Set name for debugging purposes */
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -125,7 +126,7 @@ void *mca_mpool_base_alloc(size_t size, ompi_info_t *info)
|
||||
mpool_tree_item->num_bytes = size;
|
||||
mpool_tree_item->count = 0;
|
||||
|
||||
if(&ompi_mpi_info_null == info)
|
||||
if(&ompi_mpi_info_null.info == info)
|
||||
{
|
||||
for(item = opal_list_get_first(&mca_mpool_base_modules);
|
||||
item != opal_list_get_end(&mca_mpool_base_modules);
|
||||
|
@ -9,6 +9,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -187,7 +188,7 @@ ompi_osc_base_process_op(void *outbuf,
|
||||
int count,
|
||||
ompi_op_t *op)
|
||||
{
|
||||
if (op == &ompi_mpi_op_replace) {
|
||||
if (op == &ompi_mpi_op_replace.op) {
|
||||
return OMPI_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -28,6 +28,7 @@
|
||||
#include "opal/sys/atomic.h"
|
||||
#include "ompi/mca/pml/pml.h"
|
||||
#include "ompi/datatype/datatype.h"
|
||||
#include "ompi/op/op.h"
|
||||
#include "ompi/mca/osc/base/base.h"
|
||||
#include "ompi/mca/osc/base/osc_base_obj_convert.h"
|
||||
#include "ompi/memchecker.h"
|
||||
@ -660,7 +661,7 @@ ompi_osc_pt2pt_sendreq_recv_accum_long_cb(ompi_osc_pt2pt_mpireq_t *mpireq)
|
||||
/* lock the window for accumulates */
|
||||
OPAL_THREAD_LOCK(&longreq->req_module->p2p_acc_lock);
|
||||
|
||||
if (longreq->req_op == &ompi_mpi_op_replace) {
|
||||
if (longreq->req_op == &ompi_mpi_op_replace.op) {
|
||||
ompi_convertor_t convertor;
|
||||
struct iovec iov;
|
||||
uint32_t iov_count = 1;
|
||||
@ -750,7 +751,7 @@ ompi_osc_pt2pt_sendreq_recv_accum(ompi_osc_pt2pt_module_t *module,
|
||||
/* lock the window for accumulates */
|
||||
OPAL_THREAD_LOCK(&module->p2p_acc_lock);
|
||||
|
||||
if (op == &ompi_mpi_op_replace) {
|
||||
if (op == &ompi_mpi_op_replace.op) {
|
||||
ompi_convertor_t convertor;
|
||||
struct iovec iov;
|
||||
uint32_t iov_count = 1;
|
||||
|
@ -9,6 +9,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -33,6 +34,7 @@
|
||||
#include "ompi/mca/osc/base/base.h"
|
||||
#include "ompi/mca/osc/base/osc_base_obj_convert.h"
|
||||
#include "ompi/datatype/datatype.h"
|
||||
#include "ompi/op/op.h"
|
||||
#include "ompi/memchecker.h"
|
||||
|
||||
static inline int32_t
|
||||
@ -918,7 +920,7 @@ ompi_osc_rdma_sendreq_recv_accum_long_cb(ompi_osc_rdma_longreq_t *longreq)
|
||||
/* lock the window for accumulates */
|
||||
OPAL_THREAD_LOCK(&longreq->req_module->m_acc_lock);
|
||||
|
||||
if (longreq->req_op == &ompi_mpi_op_replace) {
|
||||
if (longreq->req_op == &ompi_mpi_op_replace.op) {
|
||||
ompi_convertor_t convertor;
|
||||
struct iovec iov;
|
||||
uint32_t iov_count = 1;
|
||||
@ -1008,7 +1010,7 @@ ompi_osc_rdma_sendreq_recv_accum(ompi_osc_rdma_module_t *module,
|
||||
/* lock the window for accumulates */
|
||||
OPAL_THREAD_LOCK(&module->m_acc_lock);
|
||||
|
||||
if (op == &ompi_mpi_op_replace) {
|
||||
if (op == &ompi_mpi_op_replace.op) {
|
||||
ompi_convertor_t convertor;
|
||||
struct iovec iov;
|
||||
uint32_t iov_count = 1;
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -33,7 +34,7 @@ int mca_pml_dr_iprobe(int src,
|
||||
recvreq.req_recv.req_base.req_ompi.req_type = OMPI_REQUEST_PML;
|
||||
recvreq.req_recv.req_base.req_type = MCA_PML_REQUEST_IPROBE;
|
||||
|
||||
MCA_PML_DR_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char, src, tag, comm, true);
|
||||
MCA_PML_DR_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char.dt, src, tag, comm, true);
|
||||
MCA_PML_DR_RECV_REQUEST_START(&recvreq);
|
||||
|
||||
if( recvreq.req_recv.req_base.req_ompi.req_complete == true ) {
|
||||
@ -61,7 +62,7 @@ int mca_pml_dr_probe(int src,
|
||||
recvreq.req_recv.req_base.req_ompi.req_type = OMPI_REQUEST_PML;
|
||||
recvreq.req_recv.req_base.req_type = MCA_PML_REQUEST_PROBE;
|
||||
|
||||
MCA_PML_DR_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char, src, tag, comm, true);
|
||||
MCA_PML_DR_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char.dt, src, tag, comm, true);
|
||||
MCA_PML_DR_RECV_REQUEST_START(&recvreq);
|
||||
|
||||
ompi_request_wait_completion(&recvreq.req_recv.req_base.req_ompi);
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -33,7 +34,7 @@ int mca_pml_ob1_iprobe(int src,
|
||||
recvreq.req_recv.req_base.req_ompi.req_type = OMPI_REQUEST_PML;
|
||||
recvreq.req_recv.req_base.req_type = MCA_PML_REQUEST_IPROBE;
|
||||
|
||||
MCA_PML_OB1_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char, src, tag, comm, true);
|
||||
MCA_PML_OB1_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char.dt, src, tag, comm, true);
|
||||
MCA_PML_OB1_RECV_REQUEST_START(&recvreq);
|
||||
|
||||
if( recvreq.req_recv.req_base.req_ompi.req_complete == true ) {
|
||||
@ -61,7 +62,7 @@ int mca_pml_ob1_probe(int src,
|
||||
recvreq.req_recv.req_base.req_ompi.req_type = OMPI_REQUEST_PML;
|
||||
recvreq.req_recv.req_base.req_type = MCA_PML_REQUEST_PROBE;
|
||||
|
||||
MCA_PML_OB1_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char, src, tag, comm, true);
|
||||
MCA_PML_OB1_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char.dt, src, tag, comm, true);
|
||||
MCA_PML_OB1_RECV_REQUEST_START(&recvreq);
|
||||
|
||||
ompi_request_wait_completion(&recvreq.req_recv.req_base.req_ompi);
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystmes, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -17,7 +18,6 @@
|
||||
*/
|
||||
#include "ompi_config.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ompi/mpi/c/bindings.h"
|
||||
#include "ompi/win/win.h"
|
||||
#include "ompi/mca/osc/osc.h"
|
||||
@ -81,7 +81,7 @@ int MPI_Accumulate(void *origin_addr, int origin_count, MPI_Datatype origin_data
|
||||
for other reduction operators, we don't require such
|
||||
behaivor, as checking for it is expensive here and we don't
|
||||
care in implementation.. */
|
||||
if (op != &ompi_mpi_op_replace) {
|
||||
if (op != &ompi_mpi_op_replace.op) {
|
||||
ompi_datatype_t *op_check_dt, *origin_check_dt;
|
||||
char *msg;
|
||||
|
||||
@ -169,7 +169,7 @@ int MPI_Accumulate(void *origin_addr, int origin_count, MPI_Datatype origin_data
|
||||
for other reduction operators, we don't require such
|
||||
behaivor, as checking for it is expensive here and we don't
|
||||
care in implementation.. */
|
||||
if (op != &ompi_mpi_op_replace) {
|
||||
if (op != &ompi_mpi_op_replace.op) {
|
||||
ompi_datatype_t *op_check_dt;
|
||||
char *msg;
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -108,7 +109,7 @@ int MPI_Type_create_darray(int size,
|
||||
/* Don't just return MPI_DATATYPE_NULL as that can't be
|
||||
MPI_TYPE_FREE()ed, and that seems bad */
|
||||
*newtype = ompi_ddt_create(0);
|
||||
ompi_ddt_add(*newtype, &ompi_mpi_datatype_null, 0, 0, 0);
|
||||
ompi_ddt_add(*newtype, &ompi_mpi_datatype_null.dt, 0, 0, 0);
|
||||
OPAL_CR_EXIT_LIBRARY();
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -69,12 +69,12 @@ int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype)
|
||||
* cache.
|
||||
*/
|
||||
|
||||
if( (LDBL_DIG < p) || (LDBL_MAX_10_EXP < r) ) *newtype = &ompi_mpi_datatype_null;
|
||||
else if( (DBL_DIG < p) || (DBL_MAX_10_EXP < r) ) *newtype = &ompi_mpi_ldblcplex;
|
||||
else if( (FLT_DIG < p) || (FLT_MAX_10_EXP < r) ) *newtype = &ompi_mpi_dblcplex;
|
||||
else *newtype = &ompi_mpi_cplex;
|
||||
if( (LDBL_DIG < p) || (LDBL_MAX_10_EXP < r) ) *newtype = &ompi_mpi_datatype_null.dt;
|
||||
else if( (DBL_DIG < p) || (DBL_MAX_10_EXP < r) ) *newtype = &ompi_mpi_ldblcplex.dt;
|
||||
else if( (FLT_DIG < p) || (FLT_MAX_10_EXP < r) ) *newtype = &ompi_mpi_dblcplex.dt;
|
||||
else *newtype = &ompi_mpi_cplex.dt;
|
||||
|
||||
if( *newtype != &ompi_mpi_datatype_null ) {
|
||||
if( *newtype != &ompi_mpi_datatype_null.dt ) {
|
||||
ompi_datatype_t* datatype;
|
||||
int* a_i[2];
|
||||
int rc;
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -56,26 +56,26 @@ int MPI_Type_create_f90_integer(int r, MPI_Datatype *newtype)
|
||||
* cache.
|
||||
*/
|
||||
|
||||
if (r > 38) *newtype = &ompi_mpi_datatype_null;
|
||||
if (r > 38) *newtype = &ompi_mpi_datatype_null.dt;
|
||||
#if OMPI_HAVE_F90_INTEGER16
|
||||
else if (r > 18) *newtype = &ompi_mpi_long_long_int;
|
||||
else if (r > 18) *newtype = &ompi_mpi_long_long_int.dt;
|
||||
#else
|
||||
else if (r > 18) *newtype = &ompi_mpi_datatype_null;
|
||||
else if (r > 18) *newtype = &ompi_mpi_datatype_null.dt;
|
||||
#endif /* OMPI_HAVE_F90_INTEGER16 */
|
||||
#if SIZEOF_LONG > SIZEOF_INT
|
||||
else if (r > 9) *newtype = &ompi_mpi_long;
|
||||
else if (r > 9) *newtype = &ompi_mpi_long.dt;
|
||||
#else
|
||||
#if SIZEOF_LONG_LONG > SIZEOF_INT
|
||||
else if (r > 9) *newtype = &ompi_mpi_long_long_int;
|
||||
else if (r > 9) *newtype = &ompi_mpi_long_long_int.dt;
|
||||
#else
|
||||
else if (r > 9) *newtype = &ompi_mpi_datatype_null;
|
||||
else if (r > 9) *newtype = &ompi_mpi_datatype_null.dt;
|
||||
#endif /* SIZEOF_LONG_LONG > SIZEOF_INT */
|
||||
#endif /* SIZEOF_LONG > SIZEOF_INT */
|
||||
else if (r > 4) *newtype = &ompi_mpi_int;
|
||||
else if (r > 2) *newtype = &ompi_mpi_short;
|
||||
else *newtype = &ompi_mpi_byte;
|
||||
else if (r > 4) *newtype = &ompi_mpi_int.dt;
|
||||
else if (r > 2) *newtype = &ompi_mpi_short.dt;
|
||||
else *newtype = &ompi_mpi_byte.dt;
|
||||
|
||||
if( *newtype != &ompi_mpi_datatype_null ) {
|
||||
if( *newtype != &ompi_mpi_datatype_null.dt ) {
|
||||
ompi_datatype_t* datatype;
|
||||
int* a_i[1];
|
||||
int rc;
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -70,12 +70,12 @@ int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype)
|
||||
* cache.
|
||||
*/
|
||||
|
||||
if( (LDBL_DIG < p) || (LDBL_MAX_10_EXP < r) ) *newtype = &ompi_mpi_datatype_null;
|
||||
else if( (DBL_DIG < p) || (DBL_MAX_10_EXP < r) ) *newtype = &ompi_mpi_long_double;
|
||||
else if( (FLT_DIG < p) || (FLT_MAX_10_EXP < r) ) *newtype = &ompi_mpi_double;
|
||||
else *newtype = &ompi_mpi_float;
|
||||
if( (LDBL_DIG < p) || (LDBL_MAX_10_EXP < r) ) *newtype = &ompi_mpi_datatype_null.dt;
|
||||
else if( (DBL_DIG < p) || (DBL_MAX_10_EXP < r) ) *newtype = &ompi_mpi_long_double.dt;
|
||||
else if( (FLT_DIG < p) || (FLT_MAX_10_EXP < r) ) *newtype = &ompi_mpi_double.dt;
|
||||
else *newtype = &ompi_mpi_float.dt;
|
||||
|
||||
if( *newtype != &ompi_mpi_datatype_null ) {
|
||||
if( *newtype != &ompi_mpi_datatype_null.dt ) {
|
||||
ompi_datatype_t* datatype;
|
||||
int* a_i[2];
|
||||
int rc;
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -77,7 +78,7 @@ int MPI_Type_create_subarray(int ndims,
|
||||
/* If the ndims is zero then return the NULL datatype */
|
||||
if( ndims < 2 ) {
|
||||
if( 0 == ndims ) {
|
||||
*newtype = &ompi_mpi_datatype_null;
|
||||
*newtype = &ompi_mpi_datatype_null.dt;
|
||||
OPAL_CR_EXIT_LIBRARY();
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -51,11 +52,11 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *type)
|
||||
*type = (MPI_Datatype)ompi_ddt_match_size( size, DT_FLAG_DATA_COMPLEX, DT_FLAG_DATA_FORTRAN );
|
||||
break;
|
||||
default:
|
||||
*type = &ompi_mpi_datatype_null;
|
||||
*type = &ompi_mpi_datatype_null.dt;
|
||||
}
|
||||
|
||||
OPAL_CR_EXIT_LIBRARY();
|
||||
if( *type != &ompi_mpi_datatype_null ) {
|
||||
if( *type != &ompi_mpi_datatype_null.dt ) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
// Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
// All rights reserved.
|
||||
// Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
|
||||
// Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
// $COPYRIGHT$
|
||||
//
|
||||
// Additional copyrights may follow
|
||||
@ -78,13 +79,13 @@ void ompi_mpi_cxx_win_throw_excptn_fctn(MPI_Win *, int *errcode, ...)
|
||||
void
|
||||
MPI::InitializeIntercepts()
|
||||
{
|
||||
ompi_mpi_errors_throw_exceptions.eh_comm_fn =
|
||||
ompi_mpi_errors_throw_exceptions.eh.eh_comm_fn =
|
||||
ompi_mpi_cxx_comm_throw_excptn_fctn;
|
||||
#if OMPI_PROVIDE_MPI_FILE_INTERFACE
|
||||
ompi_mpi_errors_throw_exceptions.eh_file_fn =
|
||||
ompi_mpi_errors_throw_exceptions.eh.eh_file_fn =
|
||||
ompi_mpi_cxx_file_throw_excptn_fctn;
|
||||
#endif
|
||||
ompi_mpi_errors_throw_exceptions.eh_win_fn =
|
||||
ompi_mpi_errors_throw_exceptions.eh.eh_win_fn =
|
||||
ompi_mpi_cxx_win_throw_excptn_fctn;
|
||||
}
|
||||
|
||||
|
@ -46,9 +46,9 @@ void* const BOTTOM = (void*) MPI_BOTTOM;
|
||||
void* const IN_PLACE = (void*) MPI_IN_PLACE;
|
||||
|
||||
// error-handling specifiers
|
||||
const Errhandler ERRORS_ARE_FATAL(&ompi_mpi_errors_are_fatal);
|
||||
const Errhandler ERRORS_RETURN(&ompi_mpi_errors_return);
|
||||
const Errhandler ERRORS_THROW_EXCEPTIONS(&ompi_mpi_errors_throw_exceptions);
|
||||
const Errhandler ERRORS_ARE_FATAL((MPI_Errhandler)&(ompi_mpi_errors_are_fatal));
|
||||
const Errhandler ERRORS_RETURN((MPI_Errhandler)&(ompi_mpi_errors_return));
|
||||
const Errhandler ERRORS_THROW_EXCEPTIONS((MPI_Errhandler)&(ompi_mpi_errors_throw_exceptions));
|
||||
|
||||
// elementary datatypes
|
||||
const Datatype CHAR(MPI_CHAR);
|
||||
@ -77,25 +77,25 @@ const Datatype LONG_DOUBLE_INT(MPI_LONG_DOUBLE);
|
||||
|
||||
#if OMPI_WANT_F77_BINDINGS
|
||||
// elementary datatype (Fortran)
|
||||
const Datatype REAL(&ompi_mpi_real);
|
||||
const Datatype INTEGER(&ompi_mpi_integer);
|
||||
const Datatype DOUBLE_PRECISION(&ompi_mpi_dblprec);
|
||||
const Datatype F_COMPLEX(&ompi_mpi_cplex);
|
||||
const Datatype LOGICAL(&ompi_mpi_logic);
|
||||
const Datatype CHARACTER(&ompi_mpi_character);
|
||||
const Datatype REAL((MPI_Datatype)&(ompi_mpi_real));
|
||||
const Datatype INTEGER((MPI_Datatype)&(ompi_mpi_integer));
|
||||
const Datatype DOUBLE_PRECISION((MPI_Datatype)&(ompi_mpi_dblprec));
|
||||
const Datatype F_COMPLEX((MPI_Datatype)&(ompi_mpi_cplex));
|
||||
const Datatype LOGICAL((MPI_Datatype)&(ompi_mpi_logic));
|
||||
const Datatype CHARACTER((MPI_Datatype)&(ompi_mpi_character));
|
||||
|
||||
// datatype for reduction functions (Fortran)
|
||||
const Datatype TWOREAL(&ompi_mpi_2real);
|
||||
const Datatype TWODOUBLE_PRECISION(&ompi_mpi_2dblprec);
|
||||
const Datatype TWOINTEGER(&ompi_mpi_2integer);
|
||||
const Datatype TWOREAL((MPI_Datatype)&(ompi_mpi_2real));
|
||||
const Datatype TWODOUBLE_PRECISION((MPI_Datatype)&(ompi_mpi_2dblprec));
|
||||
const Datatype TWOINTEGER((MPI_Datatype)&(ompi_mpi_2integer));
|
||||
|
||||
// optional datatypes (Fortran)
|
||||
const Datatype INTEGER2(&ompi_mpi_integer);
|
||||
const Datatype REAL2(&ompi_mpi_real);
|
||||
const Datatype INTEGER1(&ompi_mpi_char);
|
||||
const Datatype INTEGER4(&ompi_mpi_short);
|
||||
const Datatype REAL4(&ompi_mpi_real);
|
||||
const Datatype REAL8(&ompi_mpi_double);
|
||||
const Datatype INTEGER2((MPI_Datatype)&(ompi_mpi_integer));
|
||||
const Datatype REAL2((MPI_Datatype)&(ompi_mpi_real));
|
||||
const Datatype INTEGER1((MPI_Datatype)&(ompi_mpi_char));
|
||||
const Datatype INTEGER4((MPI_Datatype)&(ompi_mpi_short));
|
||||
const Datatype REAL4((MPI_Datatype)&(ompi_mpi_real));
|
||||
const Datatype REAL8((MPI_Datatype)&(ompi_mpi_double));
|
||||
|
||||
#endif // OMPI_WANT_f77_BINDINGS
|
||||
|
||||
@ -104,10 +104,10 @@ const Datatype UNSIGNED_LONG_LONG(MPI_UNSIGNED_LONG_LONG);
|
||||
const Datatype LONG_LONG(MPI_LONG_LONG);
|
||||
|
||||
// c++ types
|
||||
const Datatype BOOL(&ompi_mpi_cxx_bool);
|
||||
const Datatype COMPLEX(&ompi_mpi_cxx_cplex);
|
||||
const Datatype DOUBLE_COMPLEX(&ompi_mpi_cxx_dblcplex);
|
||||
const Datatype LONG_DOUBLE_COMPLEX(&ompi_mpi_cxx_ldblcplex);
|
||||
const Datatype BOOL((MPI_Datatype)&(ompi_mpi_cxx_bool));
|
||||
const Datatype COMPLEX((MPI_Datatype)&(ompi_mpi_cxx_cplex));
|
||||
const Datatype DOUBLE_COMPLEX((MPI_Datatype)&(ompi_mpi_cxx_dblcplex));
|
||||
const Datatype LONG_DOUBLE_COMPLEX((MPI_Datatype)&(ompi_mpi_cxx_ldblcplex));
|
||||
|
||||
// reserved communicators
|
||||
Intracomm COMM_WORLD(MPI_COMM_WORLD);
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -87,10 +88,10 @@ void mpi_type_match_size_f(MPI_Fint *typeclass, MPI_Fint *size, MPI_Fint *type,
|
||||
c_type = (MPI_Datatype)ompi_ddt_match_size( c_size, DT_FLAG_DATA_COMPLEX, DT_FLAG_DATA_FORTRAN );
|
||||
break;
|
||||
default:
|
||||
c_type = &ompi_mpi_datatype_null;
|
||||
c_type = &ompi_mpi_datatype_null.dt;
|
||||
}
|
||||
*type = MPI_Type_c2f( c_type );
|
||||
if ( c_type != &ompi_mpi_datatype_null ) {
|
||||
if ( c_type != &ompi_mpi_datatype_null.dt ) {
|
||||
*ierr = OMPI_INT_2_FINT( MPI_SUCCESS );
|
||||
} else {
|
||||
*ierr = OMPI_INT_2_FINT( MPI_ERR_ARG );
|
||||
|
57
ompi/op/op.c
57
ompi/op/op.c
@ -11,6 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -57,20 +58,20 @@ OBJ_CLASS_INSTANCE(ompi_op_t, opal_object_t,
|
||||
/*
|
||||
* Intrinsic MPI_Op objects
|
||||
*/
|
||||
ompi_op_t ompi_mpi_op_null;
|
||||
ompi_op_t ompi_mpi_op_max;
|
||||
ompi_op_t ompi_mpi_op_min;
|
||||
ompi_op_t ompi_mpi_op_sum;
|
||||
ompi_op_t ompi_mpi_op_prod;
|
||||
ompi_op_t ompi_mpi_op_land;
|
||||
ompi_op_t ompi_mpi_op_band;
|
||||
ompi_op_t ompi_mpi_op_lor;
|
||||
ompi_op_t ompi_mpi_op_bor;
|
||||
ompi_op_t ompi_mpi_op_lxor;
|
||||
ompi_op_t ompi_mpi_op_bxor;
|
||||
ompi_op_t ompi_mpi_op_maxloc;
|
||||
ompi_op_t ompi_mpi_op_minloc;
|
||||
ompi_op_t ompi_mpi_op_replace;
|
||||
ompi_predefined_op_t ompi_mpi_op_null;
|
||||
ompi_predefined_op_t ompi_mpi_op_max;
|
||||
ompi_predefined_op_t ompi_mpi_op_min;
|
||||
ompi_predefined_op_t ompi_mpi_op_sum;
|
||||
ompi_predefined_op_t ompi_mpi_op_prod;
|
||||
ompi_predefined_op_t ompi_mpi_op_land;
|
||||
ompi_predefined_op_t ompi_mpi_op_band;
|
||||
ompi_predefined_op_t ompi_mpi_op_lor;
|
||||
ompi_predefined_op_t ompi_mpi_op_bor;
|
||||
ompi_predefined_op_t ompi_mpi_op_lxor;
|
||||
ompi_predefined_op_t ompi_mpi_op_bxor;
|
||||
ompi_predefined_op_t ompi_mpi_op_maxloc;
|
||||
ompi_predefined_op_t ompi_mpi_op_minloc;
|
||||
ompi_predefined_op_t ompi_mpi_op_replace;
|
||||
|
||||
/*
|
||||
* Map from ddt->id to position in op function pointer array
|
||||
@ -139,46 +140,46 @@ int ompi_op_init(void)
|
||||
/* Create the intrinsic ops */
|
||||
|
||||
if (OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_null, OMPI_OP_BASE_FORTRAN_NULL,
|
||||
add_intrinsic(&ompi_mpi_op_null.op, OMPI_OP_BASE_FORTRAN_NULL,
|
||||
FLAGS, "MPI_OP_NULL") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_max, OMPI_OP_BASE_FORTRAN_MAX,
|
||||
add_intrinsic(&ompi_mpi_op_max.op, OMPI_OP_BASE_FORTRAN_MAX,
|
||||
FLAGS, "MPI_OP_MAX") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_min, OMPI_OP_BASE_FORTRAN_MIN,
|
||||
add_intrinsic(&ompi_mpi_op_min.op, OMPI_OP_BASE_FORTRAN_MIN,
|
||||
FLAGS, "MPI_OP_MIN") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_sum, OMPI_OP_BASE_FORTRAN_SUM,
|
||||
add_intrinsic(&ompi_mpi_op_sum.op, OMPI_OP_BASE_FORTRAN_SUM,
|
||||
FLAGS_NO_FLOAT, "MPI_OP_SUM") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_prod, OMPI_OP_BASE_FORTRAN_PROD,
|
||||
add_intrinsic(&ompi_mpi_op_prod.op, OMPI_OP_BASE_FORTRAN_PROD,
|
||||
FLAGS_NO_FLOAT, "MPI_OP_PROD") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_land, OMPI_OP_BASE_FORTRAN_LAND,
|
||||
add_intrinsic(&ompi_mpi_op_land.op, OMPI_OP_BASE_FORTRAN_LAND,
|
||||
FLAGS, "MPI_OP_LAND") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_band, OMPI_OP_BASE_FORTRAN_BAND,
|
||||
add_intrinsic(&ompi_mpi_op_band.op, OMPI_OP_BASE_FORTRAN_BAND,
|
||||
FLAGS, "MPI_OP_BAND") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_lor, OMPI_OP_BASE_FORTRAN_LOR,
|
||||
add_intrinsic(&ompi_mpi_op_lor.op, OMPI_OP_BASE_FORTRAN_LOR,
|
||||
FLAGS, "MPI_OP_LOR") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_bor, OMPI_OP_BASE_FORTRAN_BOR,
|
||||
add_intrinsic(&ompi_mpi_op_bor.op, OMPI_OP_BASE_FORTRAN_BOR,
|
||||
FLAGS, "MPI_OP_BOR") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_lxor, OMPI_OP_BASE_FORTRAN_LXOR,
|
||||
add_intrinsic(&ompi_mpi_op_lxor.op, OMPI_OP_BASE_FORTRAN_LXOR,
|
||||
FLAGS, "MPI_OP_LXOR") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_bxor, OMPI_OP_BASE_FORTRAN_BXOR,
|
||||
add_intrinsic(&ompi_mpi_op_bxor.op, OMPI_OP_BASE_FORTRAN_BXOR,
|
||||
FLAGS, "MPI_OP_BXOR") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_maxloc, OMPI_OP_BASE_FORTRAN_MAXLOC,
|
||||
add_intrinsic(&ompi_mpi_op_maxloc.op, OMPI_OP_BASE_FORTRAN_MAXLOC,
|
||||
FLAGS, "MPI_OP_MAXLOC") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_minloc, OMPI_OP_BASE_FORTRAN_MINLOC,
|
||||
add_intrinsic(&ompi_mpi_op_minloc.op, OMPI_OP_BASE_FORTRAN_MINLOC,
|
||||
FLAGS, "MPI_OP_MINLOC") ||
|
||||
OMPI_SUCCESS !=
|
||||
add_intrinsic(&ompi_mpi_op_replace, OMPI_OP_BASE_FORTRAN_REPLACE,
|
||||
add_intrinsic(&ompi_mpi_op_replace.op, OMPI_OP_BASE_FORTRAN_REPLACE,
|
||||
FLAGS, "MPI_OP_REPLACE")) {
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
43
ompi/op/op.h
43
ompi/op/op.h
@ -12,6 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2008 UT-Battelle, LLC
|
||||
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -145,6 +146,20 @@ struct ompi_op_t {
|
||||
typedef struct ompi_op_t ompi_op_t;
|
||||
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_op_t);
|
||||
|
||||
/**
|
||||
* Padded struct to maintain back compatibiltiy.
|
||||
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
|
||||
* for full explanation why we chose the following padding construct for predefines.
|
||||
*/
|
||||
#define PREDEFINED_OP_PAD (sizeof(void*) * 256)
|
||||
|
||||
struct ompi_predefined_op_t {
|
||||
struct ompi_op_t op;
|
||||
char padding[PREDEFINED_OP_PAD - sizeof(ompi_op_t)];
|
||||
};
|
||||
|
||||
typedef struct ompi_predefined_op_t ompi_predefined_op_t;
|
||||
|
||||
/**
|
||||
* Array to map ddt->id values to the corresponding position in the op
|
||||
* function array.
|
||||
@ -179,72 +194,72 @@ OMPI_DECLSPEC extern int ompi_op_ddt_map[DT_MAX_PREDEFINED];
|
||||
/**
|
||||
* Global variable for MPI_OP_NULL
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_null;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_null;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_MAX
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_max;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_max;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_MIN
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_min;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_min;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_SUM
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_sum;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_sum;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_PROD
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_prod;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_prod;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_LAND
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_land;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_land;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_BAND
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_band;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_band;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_LOR
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_lor;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_lor;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_BOR
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_bor;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_bor;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_LXOR
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_lxor;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_lxor;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_BXOR
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_bxor;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_bxor;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_MAXLOC
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_maxloc;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_maxloc;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_MINLOC
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_minloc;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_minloc;
|
||||
|
||||
/**
|
||||
* Global variable for MPI_REPLACE
|
||||
*/
|
||||
OMPI_DECLSPEC extern ompi_op_t ompi_mpi_op_replace;
|
||||
OMPI_DECLSPEC extern ompi_predefined_op_t ompi_mpi_op_replace;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -18,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "ompi/request/grequest.h"
|
||||
#include "ompi/mpi/f77/fint_2_int.h"
|
||||
|
||||
@ -64,7 +66,7 @@ static void ompi_grequest_construct(ompi_grequest_t* greq)
|
||||
greq->greq_base.req_free = ompi_grequest_free;
|
||||
greq->greq_base.req_cancel = ompi_grequest_cancel;
|
||||
greq->greq_base.req_type = OMPI_REQUEST_GEN;
|
||||
greq->greq_base.req_mpi_object.comm = &ompi_mpi_comm_world;
|
||||
greq->greq_base.req_mpi_object.comm = &(ompi_mpi_comm_world.comm);
|
||||
/* Set the function pointers to C here; the F77 MPI API will
|
||||
override this value if the gen request was created from
|
||||
Fortran */
|
||||
|
@ -11,6 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "opal/class/opal_object.h"
|
||||
#include "ompi/request/request.h"
|
||||
#include "ompi/request/request_default.h"
|
||||
@ -30,7 +32,7 @@ size_t ompi_request_waiting = 0;
|
||||
size_t ompi_request_completed = 0;
|
||||
opal_mutex_t ompi_request_lock;
|
||||
opal_condition_t ompi_request_cond;
|
||||
ompi_request_t ompi_request_null;
|
||||
ompi_predefined_request_t ompi_request_null;
|
||||
ompi_request_t ompi_request_empty;
|
||||
ompi_status_public_t ompi_status_empty;
|
||||
ompi_request_fns_t ompi_request_functions = {
|
||||
@ -72,7 +74,7 @@ static int ompi_request_null_cancel(ompi_request_t* request, int flag)
|
||||
|
||||
static int ompi_request_empty_free(ompi_request_t** request)
|
||||
{
|
||||
*request = &ompi_request_null;
|
||||
*request = &ompi_request_null.request;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -81,7 +83,7 @@ int ompi_request_persistent_proc_null_free(ompi_request_t** request)
|
||||
OMPI_REQUEST_FINI(*request);
|
||||
(*request)->req_state = OMPI_REQUEST_INVALID;
|
||||
OBJ_RELEASE(*request);
|
||||
*request = &ompi_request_null;
|
||||
*request = &ompi_request_null.request;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -104,23 +106,23 @@ int ompi_request_init(void)
|
||||
0, OMPI_FORTRAN_HANDLE_MAX, 64) ) {
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
ompi_request_null.req_type = OMPI_REQUEST_NULL;
|
||||
ompi_request_null.req_status.MPI_SOURCE = MPI_PROC_NULL;
|
||||
ompi_request_null.req_status.MPI_TAG = MPI_ANY_TAG;
|
||||
ompi_request_null.req_status.MPI_ERROR = MPI_SUCCESS;
|
||||
ompi_request_null.req_status._count = 0;
|
||||
ompi_request_null.req_status._cancelled = 0;
|
||||
ompi_request_null.request.req_type = OMPI_REQUEST_NULL;
|
||||
ompi_request_null.request.req_status.MPI_SOURCE = MPI_PROC_NULL;
|
||||
ompi_request_null.request.req_status.MPI_TAG = MPI_ANY_TAG;
|
||||
ompi_request_null.request.req_status.MPI_ERROR = MPI_SUCCESS;
|
||||
ompi_request_null.request.req_status._count = 0;
|
||||
ompi_request_null.request.req_status._cancelled = 0;
|
||||
|
||||
ompi_request_null.req_complete = true;
|
||||
ompi_request_null.req_state = OMPI_REQUEST_INACTIVE;
|
||||
ompi_request_null.req_persistent = false;
|
||||
ompi_request_null.req_f_to_c_index =
|
||||
ompi_request_null.request.req_complete = true;
|
||||
ompi_request_null.request.req_state = OMPI_REQUEST_INACTIVE;
|
||||
ompi_request_null.request.req_persistent = false;
|
||||
ompi_request_null.request.req_f_to_c_index =
|
||||
opal_pointer_array_add(&ompi_request_f_to_c_table, &ompi_request_null);
|
||||
ompi_request_null.req_free = ompi_request_null_free;
|
||||
ompi_request_null.req_cancel = ompi_request_null_cancel;
|
||||
ompi_request_null.req_mpi_object.comm = &ompi_mpi_comm_world;
|
||||
ompi_request_null.request.req_free = ompi_request_null_free;
|
||||
ompi_request_null.request.req_cancel = ompi_request_null_cancel;
|
||||
ompi_request_null.request.req_mpi_object.comm = &ompi_mpi_comm_world.comm;
|
||||
|
||||
if (0 != ompi_request_null.req_f_to_c_index) {
|
||||
if (0 != ompi_request_null.request.req_f_to_c_index) {
|
||||
return OMPI_ERR_REQUEST;
|
||||
}
|
||||
|
||||
@ -150,7 +152,7 @@ int ompi_request_init(void)
|
||||
opal_pointer_array_add(&ompi_request_f_to_c_table, &ompi_request_empty);
|
||||
ompi_request_empty.req_free = ompi_request_empty_free;
|
||||
ompi_request_empty.req_cancel = ompi_request_null_cancel;
|
||||
ompi_request_empty.req_mpi_object.comm = &ompi_mpi_comm_world;
|
||||
ompi_request_empty.req_mpi_object.comm = &ompi_mpi_comm_world.comm;
|
||||
|
||||
if (1 != ompi_request_empty.req_f_to_c_index) {
|
||||
return OMPI_ERR_REQUEST;
|
||||
@ -168,8 +170,8 @@ int ompi_request_init(void)
|
||||
|
||||
int ompi_request_finalize(void)
|
||||
{
|
||||
OMPI_REQUEST_FINI( &ompi_request_null );
|
||||
OBJ_DESTRUCT( &ompi_request_null );
|
||||
OMPI_REQUEST_FINI( &ompi_request_null.request );
|
||||
OBJ_DESTRUCT( &ompi_request_null.request );
|
||||
OMPI_REQUEST_FINI( &ompi_request_empty );
|
||||
OBJ_DESTRUCT( &ompi_request_empty );
|
||||
OBJ_DESTRUCT( &ompi_request_cond );
|
||||
|
@ -11,6 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -131,6 +132,19 @@ struct ompi_request_t {
|
||||
*/
|
||||
typedef struct ompi_request_t ompi_request_t;
|
||||
|
||||
/**
|
||||
* Padded struct to maintain back compatibiltiy.
|
||||
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
|
||||
* for full explanation why we chose the following padding construct for predefines.
|
||||
*/
|
||||
#define PREDEFINED_REQUEST_PAD (sizeof(void*) * 32)
|
||||
|
||||
struct ompi_predefined_request_t {
|
||||
struct ompi_request_t request;
|
||||
char padding[PREDEFINED_REQUEST_PAD - sizeof(ompi_request_t)];
|
||||
};
|
||||
|
||||
typedef struct ompi_predefined_request_t ompi_predefined_request_t;
|
||||
|
||||
/**
|
||||
* Initialize a request. This is a macro to avoid function call
|
||||
@ -312,7 +326,7 @@ OMPI_DECLSPEC extern size_t ompi_request_completed;
|
||||
OMPI_DECLSPEC extern int32_t ompi_request_poll;
|
||||
OMPI_DECLSPEC extern opal_mutex_t ompi_request_lock;
|
||||
OMPI_DECLSPEC extern opal_condition_t ompi_request_cond;
|
||||
OMPI_DECLSPEC extern ompi_request_t ompi_request_null;
|
||||
OMPI_DECLSPEC extern ompi_predefined_request_t ompi_request_null;
|
||||
OMPI_DECLSPEC extern ompi_request_t ompi_request_empty;
|
||||
OMPI_DECLSPEC extern ompi_status_public_t ompi_status_empty;
|
||||
OMPI_DECLSPEC extern ompi_request_fns_t ompi_request_functions;
|
||||
|
@ -14,6 +14,7 @@
|
||||
* Copyright (c) 2006 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2006 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -119,11 +120,11 @@ int ompi_mpi_finalize(void)
|
||||
anything else in MPI_FINALIZE (to include setting up such that
|
||||
MPI_FINALIZED will return true). */
|
||||
|
||||
if (NULL != ompi_mpi_comm_self.c_keyhash) {
|
||||
if (NULL != ompi_mpi_comm_self.comm.c_keyhash) {
|
||||
ompi_attr_delete_all(COMM_ATTR, &ompi_mpi_comm_self,
|
||||
ompi_mpi_comm_self.c_keyhash);
|
||||
OBJ_RELEASE(ompi_mpi_comm_self.c_keyhash);
|
||||
ompi_mpi_comm_self.c_keyhash = NULL;
|
||||
ompi_mpi_comm_self.comm.c_keyhash);
|
||||
OBJ_RELEASE(ompi_mpi_comm_self.comm.c_keyhash);
|
||||
ompi_mpi_comm_self.comm.c_keyhash = NULL;
|
||||
}
|
||||
|
||||
/* Proceed with MPI_FINALIZE */
|
||||
|
@ -13,7 +13,7 @@
|
||||
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2006 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -136,7 +136,7 @@ static void warn_fork_cb(void)
|
||||
if (ompi_mpi_initialized && !ompi_mpi_finalized && !fork_warning_issued) {
|
||||
orte_show_help("help-mpi-runtime.txt", "mpi_init:warn-fork", true,
|
||||
orte_process_info.nodename, getpid(),
|
||||
ompi_mpi_comm_world.c_my_rank);
|
||||
ompi_mpi_comm_world.comm.c_my_rank);
|
||||
fork_warning_issued = true;
|
||||
}
|
||||
}
|
||||
@ -688,15 +688,15 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
goto error;
|
||||
}
|
||||
|
||||
MCA_PML_CALL(add_comm(&ompi_mpi_comm_world));
|
||||
MCA_PML_CALL(add_comm(&ompi_mpi_comm_self));
|
||||
MCA_PML_CALL(add_comm(&ompi_mpi_comm_world.comm));
|
||||
MCA_PML_CALL(add_comm(&ompi_mpi_comm_self.comm));
|
||||
|
||||
|
||||
/*
|
||||
* Dump all MCA parameters if requested
|
||||
*/
|
||||
if (ompi_mpi_show_mca_params) {
|
||||
ompi_show_all_mca_params(ompi_mpi_comm_world.c_my_rank,
|
||||
ompi_show_all_mca_params(ompi_mpi_comm_world.comm.c_my_rank,
|
||||
nprocs,
|
||||
orte_process_info.nodename);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -36,7 +37,7 @@
|
||||
*/
|
||||
opal_pointer_array_t ompi_mpi_windows;
|
||||
|
||||
ompi_win_t ompi_mpi_win_null;
|
||||
ompi_predefined_win_t ompi_mpi_win_null;
|
||||
|
||||
static void ompi_win_construct(ompi_win_t *win);
|
||||
static void ompi_win_destruct(ompi_win_t *win);
|
||||
@ -55,12 +56,12 @@ ompi_win_init(void)
|
||||
}
|
||||
|
||||
/* Setup MPI_WIN_NULL */
|
||||
OBJ_CONSTRUCT(&ompi_mpi_win_null, ompi_win_t);
|
||||
ompi_mpi_win_null.w_flags = OMPI_WIN_INVALID;
|
||||
ompi_mpi_win_null.w_group = &ompi_mpi_group_null;
|
||||
OBJ_CONSTRUCT(&ompi_mpi_win_null.win, ompi_win_t);
|
||||
ompi_mpi_win_null.win.w_flags = OMPI_WIN_INVALID;
|
||||
ompi_mpi_win_null.win.w_group = &ompi_mpi_group_null.group;
|
||||
OBJ_RETAIN(&ompi_mpi_group_null);
|
||||
ompi_win_set_name(&ompi_mpi_win_null, "MPI_WIN_NULL");
|
||||
opal_pointer_array_set_item(&ompi_mpi_windows, 0, &ompi_mpi_win_null);
|
||||
ompi_win_set_name(&ompi_mpi_win_null.win, "MPI_WIN_NULL");
|
||||
opal_pointer_array_set_item(&ompi_mpi_windows, 0, &ompi_mpi_win_null.win);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -69,7 +70,7 @@ ompi_win_init(void)
|
||||
int
|
||||
ompi_win_finalize(void)
|
||||
{
|
||||
OBJ_DESTRUCT(&ompi_mpi_win_null);
|
||||
OBJ_DESTRUCT(&ompi_mpi_win_null.win);
|
||||
OBJ_DESTRUCT(&ompi_mpi_windows);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
@ -208,8 +209,8 @@ ompi_win_construct(ompi_win_t *win)
|
||||
|
||||
/* every new window defaults to MPI_ERRORS_ARE_FATAL (MPI-2 6.6.1,
|
||||
pg. 137) */
|
||||
OBJ_RETAIN(&ompi_mpi_errors_are_fatal);
|
||||
win->error_handler = &ompi_mpi_errors_are_fatal;
|
||||
OBJ_RETAIN(&ompi_mpi_errors_are_fatal.eh);
|
||||
win->error_handler = &ompi_mpi_errors_are_fatal.eh;
|
||||
win->errhandler_type = OMPI_ERRHANDLER_TYPE_WIN;
|
||||
|
||||
win->w_disp_unit = 0;
|
||||
|
@ -11,6 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -93,7 +94,20 @@ struct ompi_win_t {
|
||||
typedef struct ompi_win_t ompi_win_t;
|
||||
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_win_t);
|
||||
|
||||
OMPI_DECLSPEC extern ompi_win_t ompi_mpi_win_null;
|
||||
/**
|
||||
* Padded struct to maintain back compatibiltiy.
|
||||
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
|
||||
* for full explanation why we chose the following padding construct for predefines.
|
||||
*/
|
||||
#define PREDEFINED_WIN_PAD (sizeof(void*) * 64)
|
||||
|
||||
struct ompi_predefined_win_t {
|
||||
struct ompi_win_t win;
|
||||
char padding[PREDEFINED_WIN_PAD - sizeof(ompi_win_t)];
|
||||
};
|
||||
typedef struct ompi_predefined_win_t ompi_predefined_win_t;
|
||||
|
||||
OMPI_DECLSPEC extern ompi_predefined_win_t ompi_mpi_win_null;
|
||||
|
||||
int ompi_win_init(void);
|
||||
int ompi_win_finalize(void);
|
||||
|
@ -9,6 +9,7 @@
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -16,8 +17,9 @@
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
|
||||
|
||||
# support needs to be first for dependencies
|
||||
SUBDIRS = support asm class threads peruse datatype
|
||||
DIST_SUBDIRS = event $(SUBDIRS)
|
||||
|
||||
TESTS =
|
||||
include predefined/Makefile.inc
|
||||
|
22
test/predefined/Makefile.inc
Обычный файл
22
test/predefined/Makefile.inc
Обычный файл
@ -0,0 +1,22 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
|
||||
check_PROGRAMS = \
|
||||
predefined/ompi_predefined
|
||||
|
||||
predefined_ompi_predefined_SOURCES = predefined/ompi_predefined.c
|
||||
predefined_ompi_predefined_LDADD = \
|
||||
$(top_builddir)/ompi/libmpi.la \
|
||||
$(top_builddir)/orte/libopen-rte.la \
|
||||
$(top_builddir)/opal/libopen-pal.la
|
||||
predefined_ompi_predefined_DEPENDENCIES = $(ompi_predefined_LDADD)
|
||||
|
161
test/predefined/ompi_predefined.c
Обычный файл
161
test/predefined/ompi_predefined.c
Обычный файл
@ -0,0 +1,161 @@
|
||||
/*
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc All rights reserved.
|
||||
* Copyright (c) 2009 Cisco Systems, Inc All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "ompi/group/group.h"
|
||||
#include "ompi/request/request.h"
|
||||
#include "ompi/op/op.h"
|
||||
#include "ompi/datatype/datatype.h"
|
||||
#include "ompi/win/win.h"
|
||||
#include "ompi/info/info.h"
|
||||
#include "ompi/file/file.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define GAP_CHECK(NAME, BASE, F1, F2, CGAP) { \
|
||||
offset = (size_t)&BASE.F1 - (size_t)&BASE; \
|
||||
exp_offset = ((size_t)&BASE.F2 - (size_t)&BASE) + sizeof(BASE.F2); \
|
||||
printf(NAME" = %lu, %lu ", offset, sizeof(BASE.F1)); \
|
||||
if (CGAP && offset != exp_offset) printf("***"); \
|
||||
printf("\n"); \
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
ompi_communicator_t test_comm;
|
||||
ompi_group_t test_group;
|
||||
ompi_request_t test_req;
|
||||
ompi_op_t test_op;
|
||||
ompi_win_t test_win;
|
||||
ompi_info_t test_info;
|
||||
ompi_file_t test_file;
|
||||
size_t exp_offset, offset;
|
||||
|
||||
/* Test Predefined communicator sizes */
|
||||
printf("ompi_predefined_communicator_t = %lu bytes\n", sizeof(ompi_predefined_communicator_t));
|
||||
printf("ompi_communicator_t = %lu bytes\n", sizeof(ompi_communicator_t));
|
||||
GAP_CHECK("c_base", test_comm, c_base, c_base, 0);
|
||||
GAP_CHECK("c_lock", test_comm, c_lock, c_base, 1);
|
||||
GAP_CHECK("c_name", test_comm, c_name, c_lock, 1);
|
||||
GAP_CHECK("c_contextid", test_comm, c_contextid, c_name, 1);
|
||||
GAP_CHECK("c_my_rank", test_comm, c_my_rank, c_contextid, 1);
|
||||
GAP_CHECK("c_flags", test_comm, c_flags, c_my_rank, 1);
|
||||
GAP_CHECK("c_id_available", test_comm, c_id_available, c_flags, 1);
|
||||
GAP_CHECK("c_id_start_index", test_comm, c_id_start_index, c_id_available, 1);
|
||||
GAP_CHECK("c_remote_group", test_comm, c_remote_group, c_local_group, 1);
|
||||
GAP_CHECK("c_local_comm", test_comm, c_local_comm, c_remote_group, 1);
|
||||
GAP_CHECK("c_keyhash", test_comm, c_keyhash, c_local_comm, 1);
|
||||
GAP_CHECK("c_cube_dim", test_comm, c_cube_dim, c_keyhash, 1);
|
||||
GAP_CHECK("c_topo_component", test_comm, c_topo_component, c_cube_dim, 1);
|
||||
GAP_CHECK("c_topo", test_comm, c_topo, c_topo_component, 1);
|
||||
GAP_CHECK("c_topo_comm", test_comm, c_topo_comm, c_topo, 1);
|
||||
GAP_CHECK("c_topo_module", test_comm, c_topo_module, c_topo_comm, 1);
|
||||
GAP_CHECK("c_f_to_c_index", test_comm, c_f_to_c_index, c_topo_module, 1);
|
||||
#ifdef OMPI_WANT_PERUSE
|
||||
GAP_CHECK("c_peruse_handles", test_comm, c_peruse_handles, c_f_to_c_index, 1);
|
||||
GAP_CHECK("error_handler", test_comm, error_handler, c_peruse_handles, 1);
|
||||
#else
|
||||
GAP_CHECK("error_handler", test_comm, error_handler, c_f_to_c_index, 1);
|
||||
#endif
|
||||
GAP_CHECK("errhandler_type", test_comm, errhandler_type, error_handler, 1);
|
||||
GAP_CHECK("c_pml_comm", test_comm, c_pml_comm, errhandler_type, 1);
|
||||
GAP_CHECK("c_coll", test_comm, c_coll, c_pml_comm, 1);
|
||||
|
||||
/* Test Predefined group sizes */
|
||||
printf("=============================================\n");
|
||||
printf("ompi_predefined_group_t = %lu bytes\n", sizeof(ompi_predefined_group_t));
|
||||
printf("ompi_group_t = %lu bytes\n", sizeof(ompi_group_t));
|
||||
GAP_CHECK("grp_proc_count", test_group, grp_proc_count, grp_proc_count, 0);
|
||||
GAP_CHECK("grp_my_rank", test_group, grp_my_rank, grp_proc_count, 1);
|
||||
GAP_CHECK("grp_f_to_c_index", test_group, grp_f_to_c_index, grp_my_rank, 1);
|
||||
GAP_CHECK("grp_proc_pointers", test_group, grp_proc_pointers, grp_f_to_c_index, 1);
|
||||
GAP_CHECK("grp_flags", test_group, grp_flags, grp_proc_pointers, 1);
|
||||
GAP_CHECK("grp_parent_group_ptr", test_group, grp_parent_group_ptr, grp_flags, 1);
|
||||
|
||||
/* Test Predefined request sizes */
|
||||
printf("=============================================\n");
|
||||
printf("ompi_predefined_request_t = %lu bytes\n", sizeof(ompi_predefined_request_t));
|
||||
printf("ompi_request_t = %lu bytes\n", sizeof(ompi_request_t));
|
||||
GAP_CHECK("super", test_req, super, super, 0);
|
||||
GAP_CHECK("req_type", test_req, req_type, super, 1);
|
||||
GAP_CHECK("req_status", test_req, req_status, req_type, 1);
|
||||
GAP_CHECK("req_complete", test_req, req_complete, req_status, 1);
|
||||
GAP_CHECK("req_state", test_req, req_state, req_complete, 1);
|
||||
GAP_CHECK("req_persistent", test_req, req_persistent, req_state, 1);
|
||||
GAP_CHECK("req_f_to_c_index", test_req, req_f_to_c_index, req_persistent, 1);
|
||||
GAP_CHECK("req_free", test_req, req_free, req_f_to_c_index, 1);
|
||||
|
||||
/* Test Predefined op sizes */
|
||||
printf("=============================================\n");
|
||||
printf("ompi_predefined_op_t = %lu bytes\n", sizeof(ompi_predefined_op_t));
|
||||
printf("ompi_op_t = %lu bytes\n", sizeof(ompi_op_t));
|
||||
GAP_CHECK("super", test_op, super, super, 0)
|
||||
GAP_CHECK("o_name", test_op, o_name, super, 1)
|
||||
GAP_CHECK("o_flags", test_op, o_flags, o_name, 1)
|
||||
GAP_CHECK("o_f_to_c_index", test_op, o_f_to_c_index, o_flags, 1)
|
||||
GAP_CHECK("o_func", test_op, o_func, o_f_to_c_index, 1)
|
||||
GAP_CHECK("o_3buff_instrinsic", test_op, o_3buff_intrinsic, o_func, 1)
|
||||
|
||||
/* Test Predefined datatype sizes */
|
||||
printf("=============================================\n");
|
||||
printf("ompi_predefined_datatype_t = %lu bytes\n", sizeof(ompi_predefined_datatype_t));
|
||||
printf("ompi_datatype_t = %lu bytes\n", sizeof(ompi_datatype_t));
|
||||
|
||||
/* Test Predefined win sizes */
|
||||
printf("=============================================\n");
|
||||
printf("ompi_predefined_win_t = %lu bytes\n", sizeof(ompi_predefined_win_t));
|
||||
printf("ompi_win_t = %lu bytes\n", sizeof(ompi_win_t));
|
||||
GAP_CHECK("w_base", test_win, w_base, w_base, 0);
|
||||
GAP_CHECK("w_lock", test_win, w_lock, w_base, 1);
|
||||
GAP_CHECK("w_name", test_win, w_name, w_lock, 1);
|
||||
GAP_CHECK("w_group", test_win, w_group, w_name, 1);
|
||||
GAP_CHECK("w_flags", test_win, w_flags, w_group, 1);
|
||||
GAP_CHECK("w_keyhash", test_win, w_keyhash, w_flags, 1);
|
||||
GAP_CHECK("w_f_to_c_index", test_win, w_f_to_c_index, w_keyhash, 1);
|
||||
GAP_CHECK("error_handler", test_win, error_handler, w_f_to_c_index, 1);
|
||||
GAP_CHECK("errhandler_type", test_win, errhandler_type, error_handler, 1);
|
||||
GAP_CHECK("w_disp_unit", test_win, w_disp_unit, errhandler_type, 1);
|
||||
GAP_CHECK("w_baseptr", test_win, w_baseptr, w_disp_unit, 1);
|
||||
GAP_CHECK("w_size", test_win, w_size, w_baseptr, 1);
|
||||
GAP_CHECK("w_mode", test_win, w_mode, w_size, 1);
|
||||
GAP_CHECK("w_osc_module", test_win, w_osc_module, w_size, 1);
|
||||
|
||||
/* Test Predefined info sizes */
|
||||
printf("=============================================\n");
|
||||
printf("ompi_predefined_info_t = %lu bytes\n", sizeof(ompi_predefined_info_t));
|
||||
printf("ompi_info_t = %lu bytes\n", sizeof(ompi_info_t));
|
||||
GAP_CHECK("super", test_info, super, super, 0);
|
||||
GAP_CHECK("i_f_to_c_index", test_info, i_f_to_c_index, super, 1);
|
||||
GAP_CHECK("i_lock", test_info, i_lock, i_f_to_c_index, 1);
|
||||
GAP_CHECK("i_freed", test_info, i_freed, i_lock, 1);
|
||||
|
||||
/* Test Predefined file sizes */
|
||||
printf("=============================================\n");
|
||||
printf("ompi_predefined_file_t = %lu bytes\n", sizeof(ompi_predefined_file_t));
|
||||
printf("ompi_file_t = %lu bytes\n", sizeof(ompi_file_t));
|
||||
GAP_CHECK("super", test_file, super, super, 0);
|
||||
GAP_CHECK("f_comm", test_file, f_comm, super, 1);
|
||||
GAP_CHECK("f_filename", test_file, f_filename, f_comm, 1);
|
||||
GAP_CHECK("f_amode", test_file, f_amode, f_filename, 1);
|
||||
GAP_CHECK("f_info", test_file, f_info, f_amode, 1);
|
||||
GAP_CHECK("f_flags", test_file, f_flags, f_info, 1);
|
||||
GAP_CHECK("f_f_to_c_index", test_file, f_f_to_c_index, f_flags, 1);
|
||||
GAP_CHECK("error_handler", test_file, error_handler, f_f_to_c_index, 1);
|
||||
GAP_CHECK("errhandler_type", test_file, errhandler_type, error_handler, 1);
|
||||
GAP_CHECK("f_io_version", test_file, f_io_version, errhandler_type, 1);
|
||||
GAP_CHECK("f_io_selected_component", test_file, f_io_selected_component, f_io_version, 1);
|
||||
GAP_CHECK("f_io_selected_module", test_file, f_io_selected_module, f_io_selected_component, 1);
|
||||
GAP_CHECK("f_io_selected_data", test_file, f_io_selected_data, f_io_selected_module, 1);
|
||||
GAP_CHECK("f_io_requests", test_file, f_io_requests, f_io_selected_data, 1);
|
||||
GAP_CHECK("f_io_requests_lock", test_file, f_io_requests_lock, f_io_requests, 1);
|
||||
|
||||
return 0;
|
||||
}
|
Загрузка…
Ссылка в новой задаче
Block a user