1
1
Jeff Squyres 7390ab8a23 Many updates and bug fixes for the Fortran bindings. Sorry these
aren't separated out into individual commits; they represent a few
months of work in the Mercurial branch, and it seemed error-prone to
try to break them up into multiple SVN commits.

 * Remove 2nd overloaded interfaces for MPI_TESTALL, MPI_TESTSOME,
   MPI_WAITALL, and MPI_WAITSOME in the "mpi" module implementations
   (because we're not allowed to have them, anyway -- it causes
   complications in the profiling interface).  This forced an MPI-2.2
   errata in the MPI Forum; we applied the errata here (the array of
   statuses parameter could not have a specific dimension specified in
   the dummy argument).  Fixes trac:3166.
 * Similarly, fix type for MPI_ARGVS_NULL in Fortran
 * Add MPI_3.0 function MPI_F_SYNC_REG (Fortran interfaces only).
 * Add MPI-3.0 MPI_MESSAGE_NO_PROC in the mpi_f08 module.
 * Added mpi_f08 handle comparison operators, per MPI-3.0 addendum to
   the F08 proposal at the last Forum meeting.  
 * Added missing type(MPI_File) and type(Message) in mpi_f08 module.
 * Fix --disable-mpi-io configure switch with all Fortran interfaces
 * Re-factor the Fortran header files to be fundamentally simpler and
   easier to maintain.  Fortran constant values in the header files
   are now generated by a script named mpif-values.pl during
   autogen.pl (they were previously generated by mpif-common.pl, but
   it was quite a bit more subtle/complex).  A second commit will
   follow this one to update svn:ignore values (just to ensure we
   don't muck up the first commit with the SVN client getting confused
   by the changed ignore values and new/changed files).
 * Fix some dependencies for compile ordering in
   ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am. 
 * Fix bad wording in several places (.m4 file name, ompi_info output,
   etc.): we previoulsy said "F08 assumed shape" when we really meant
   "F08 assumed rank" (for Fortran gurus, those are very different
   things). 
 * Removed the GREEK/SVN version string from mpif.h.  It really had no
   purpose being there.

Still to be done:

 * Handling of 2D array of strings in MPI_COMM_SPAWN_MULTIPLE still
   isn't right yet.  Not sure how many people really care about this
   :-), but it is still broken.

This commit was SVN r26997.

The following Trac tickets were found above:
  Ticket 3166 --> https://svn.open-mpi.org/trac/ompi/ticket/3166
2012-08-10 21:19:47 +00:00

95 строки
6.2 KiB
C

/*
* Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
*
* $COPYRIGHT$
*
* This file provides symbols for the derived type values needed
* in mpi3_types.f90.
*/
#include "ompi_config.h"
#include "constants.h"
/*
* The following typedef is used to adjust the size of objects
* exported to Fortran via a BIND(C) symbol. Note that an array of
* one of the handles in Fortran, i.e., type(MPI_Comm) has standard
* integer strides so there should be no problem with using them in in
* arrays or common blocks.
*/
typedef MPI_Fint ompi_fortran_08_handle_t[OMPI_FORTRAN_F08_HANDLE_SIZE / sizeof(MPI_Fint)];
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_comm_world = {OMPI_MPI_COMM_WORLD};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_comm_self = {OMPI_MPI_COMM_SELF};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_group_empty = {OMPI_MPI_GROUP_EMPTY};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_errors_are_fatal = {OMPI_MPI_ERRORS_ARE_FATAL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_errors_return = {OMPI_MPI_ERRORS_RETURN};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_message_no_proc = {OMPI_MPI_MESSAGE_NO_PROC};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_max = {OMPI_MPI_MAX};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_min = {OMPI_MPI_MIN};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_sum = {OMPI_MPI_SUM};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_prod = {OMPI_MPI_PROD};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_land = {OMPI_MPI_LAND};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_band = {OMPI_MPI_BAND};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_lor = {OMPI_MPI_LOR};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_bor = {OMPI_MPI_BOR};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_lxor = {OMPI_MPI_LXOR};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_bxor = {OMPI_MPI_BXOR};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_maxloc = {OMPI_MPI_MAXLOC};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_minloc = {OMPI_MPI_MINLOC};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_replace = {OMPI_MPI_REPLACE};
/*
* NULL "handles" (indices)
*/
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_comm_null = {OMPI_MPI_COMM_NULL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_datatype_null = {OMPI_MPI_DATATYPE_NULL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_errhandler_null = {OMPI_MPI_ERRHANDLER_NULL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_group_null = {OMPI_MPI_GROUP_NULL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_info_null = {OMPI_MPI_INFO_NULL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_message_null = {OMPI_MPI_MESSAGE_NULL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_op_null = {OMPI_MPI_OP_NULL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_request_null = {OMPI_MPI_REQUEST_NULL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_win_null = {OMPI_MPI_WIN_NULL};
#if OMPI_PROVIDE_MPI_FILE_INTERFACE
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_file_null = {OMPI_MPI_FILE_NULL};
#endif
/*
* common block items from ompi/include/mpif-common.h
*/
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_byte = {OMPI_MPI_BYTE};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_packed = {OMPI_MPI_PACKED};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_ub = {OMPI_MPI_UB};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_lb = {OMPI_MPI_LB};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_character = {OMPI_MPI_CHARACTER};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_logical = {OMPI_MPI_LOGICAL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer = {OMPI_MPI_INTEGER};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer1 = {OMPI_MPI_INTEGER1};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer2 = {OMPI_MPI_INTEGER2};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer4 = {OMPI_MPI_INTEGER4};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer8 = {OMPI_MPI_INTEGER8};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer16 = {OMPI_MPI_INTEGER16};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_real = {OMPI_MPI_REAL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_real4 = {OMPI_MPI_REAL4};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_real8 = {OMPI_MPI_REAL8};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_real16 = {OMPI_MPI_REAL16};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_double_precision = {OMPI_MPI_DOUBLE_PRECISION};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_complex = {OMPI_MPI_COMPLEX};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_complex8 = {OMPI_MPI_COMPLEX8};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_complex16 = {OMPI_MPI_COMPLEX16};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_complex32 = {OMPI_MPI_COMPLEX32};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_double_complex = {OMPI_MPI_DOUBLE_COMPLEX};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_2real = {OMPI_MPI_2REAL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_2double_precision = {OMPI_MPI_2DOUBLE_PRECISION};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_2integer = {OMPI_MPI_2INTEGER};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_2complex = {OMPI_MPI_2COMPLEX};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_2double_complex = {OMPI_MPI_2DOUBLE_COMPLEX};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_real2 = {OMPI_MPI_REAL2};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_logical1 = {OMPI_MPI_LOGICAL1};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_logical2 = {OMPI_MPI_LOGICAL2};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_logical4 = {OMPI_MPI_LOGICAL4};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_logical8 = {OMPI_MPI_LOGICAL8};