From 5f356edb64b4ad87ac823f171332fc395160c534 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 30 May 2006 14:37:41 +0000 Subject: [PATCH] Bring over changes from the /tmp/fortran-stuff series: - Make the F90 bindings compile and link properly with gfortran 4.0, 4.1, Intel 9.0, PGI 6.1, Sun (don't know version offhand -- the most current as of this writing, I think), and NAG 5.2, although some have limitations (e.g., NAG can't seem to handle the medium and large sizes) - Building the F90 "small" module size is now the default, even for developers - Split up mpif.h into multiple files because parts of it were toxic to the F90 bindings - Properly specify unsized/unshaped arrays to make the bindings work on all known compilers - Make ompi_info show Fortran 90 bindings size - XML somewhat lags the generated scripts as of this commit, but functionality was my main goal -- the XML can be updated later (if at all). This commit was SVN r10118. --- NEWS | 15 +- config/ompi_configure_options.m4 | 6 - configure.ac | 2 +- ompi/include/Makefile.am | 10 +- ompi/include/mpif-common.h | 450 +++++ ompi/include/mpif-common.h.in | 466 ------ ompi/include/mpif-config.h.in | 88 + ompi/include/mpif.h | 24 +- ompi/mpi/f90/Makefile.am | 2 +- ompi/mpi/f90/scripts/mpi-f90-interfaces.h.sh | 1455 +++++++---------- .../mpi/f90/scripts/mpi_accumulate_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_address_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_allgather_f90.f90.sh | 16 +- .../mpi/f90/scripts/mpi_allgatherv_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_allreduce_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_alltoall_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_alltoallv_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_alltoallw_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_bcast_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_bsend_f90.f90.sh | 16 +- .../mpi/f90/scripts/mpi_bsend_init_f90.f90.sh | 16 +- .../f90/scripts/mpi_buffer_attach_f90.f90.sh | 16 +- .../f90/scripts/mpi_buffer_detach_f90.f90.sh | 16 +- .../mpi_comm_spawn_multiple_f90.f90.sh | 2 +- ompi/mpi/f90/scripts/mpi_exscan_f90.f90.sh | 16 +- .../f90/scripts/mpi_file_iread_at_f90.f90.sh | 16 +- .../mpi/f90/scripts/mpi_file_iread_f90.f90.sh | 16 +- .../scripts/mpi_file_iread_shared_f90.f90.sh | 16 +- .../f90/scripts/mpi_file_iwrite_at_f90.f90.sh | 16 +- .../f90/scripts/mpi_file_iwrite_f90.f90.sh | 16 +- .../scripts/mpi_file_iwrite_shared_f90.f90.sh | 16 +- .../mpi_file_read_all_begin_f90.f90.sh | 16 +- .../scripts/mpi_file_read_all_end_f90.f90.sh | 16 +- .../f90/scripts/mpi_file_read_all_f90.f90.sh | 16 +- .../mpi_file_read_at_all_begin_f90.f90.sh | 16 +- .../mpi_file_read_at_all_end_f90.f90.sh | 16 +- .../scripts/mpi_file_read_at_all_f90.f90.sh | 16 +- .../f90/scripts/mpi_file_read_at_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_file_read_f90.f90.sh | 16 +- .../mpi_file_read_ordered_begin_f90.f90.sh | 37 +- .../mpi_file_read_ordered_end_f90.f90.sh | 16 +- .../scripts/mpi_file_read_ordered_f90.f90.sh | 16 +- .../scripts/mpi_file_read_shared_f90.f90.sh | 16 +- .../mpi_file_write_all_begin_f90.f90.sh | 16 +- .../scripts/mpi_file_write_all_end_f90.f90.sh | 16 +- .../f90/scripts/mpi_file_write_all_f90.f90.sh | 16 +- .../mpi_file_write_at_all_begin_f90.f90.sh | 37 +- .../mpi_file_write_at_all_end_f90.f90.sh | 16 +- .../scripts/mpi_file_write_at_all_f90.f90.sh | 16 +- .../f90/scripts/mpi_file_write_at_f90.f90.sh | 16 +- .../mpi/f90/scripts/mpi_file_write_f90.f90.sh | 16 +- .../mpi_file_write_ordered_begin_f90.f90.sh | 16 +- .../mpi_file_write_ordered_end_f90.f90.sh | 16 +- .../scripts/mpi_file_write_ordered_f90.f90.sh | 16 +- .../scripts/mpi_file_write_shared_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_gather_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_gatherv_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_get_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_ibsend_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_irecv_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_irsend_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_isend_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_issend_f90.f90.sh | 16 +- .../f90/scripts/mpi_pack_external_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_pack_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_put_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_recv_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_recv_init_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_reduce_f90.f90.sh | 16 +- .../f90/scripts/mpi_reduce_scatter_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_rsend_f90.f90.sh | 16 +- .../mpi/f90/scripts/mpi_rsend_init_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_scan_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_scatter_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_scatterv_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_send_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_send_init_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_sendrecv_f90.f90.sh | 16 +- .../scripts/mpi_sendrecv_replace_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_sizeof.f90.sh | 22 +- ompi/mpi/f90/scripts/mpi_ssend_f90.f90.sh | 16 +- .../mpi/f90/scripts/mpi_ssend_init_f90.f90.sh | 16 +- .../scripts/mpi_unpack_external_f90.f90.sh | 16 +- ompi/mpi/f90/scripts/mpi_unpack_f90.f90.sh | 16 +- .../mpi/f90/scripts/mpi_win_create_f90.f90.sh | 16 +- ompi/mpi/f90/xml/chasm-mpi.f90.sh.xsl | 17 +- ompi/mpi/f90/xml/chasm-mpi.f90.xsl | 14 +- ompi/mpi/f90/xml/chasm-mpi.i.f90.xsl | 25 +- ompi/tools/ompi_info/Makefile.am | 3 +- ompi/tools/ompi_info/param.cc | 3 + 90 files changed, 1838 insertions(+), 1976 deletions(-) create mode 100644 ompi/include/mpif-common.h delete mode 100644 ompi/include/mpif-common.h.in create mode 100644 ompi/include/mpif-config.h.in diff --git a/NEWS b/NEWS index b35c8b8140..de13886ebb 100644 --- a/NEWS +++ b/NEWS @@ -25,9 +25,16 @@ version 1.0. 1.1 --- -- Addition of "trivial", "small" (the default), "medium", and "large" - Fortran 90 MPI module sizes (v1.0.x's F90 module was equivalent to - "medium"). See the README file for more explanation. +- Major improvements to the Fortran 90 MPI bindings: + - General improvements in compile/linking time and portability + between different F90 compilers. + - Addition of "trivial", "small" (the default), "medium", and + "large" Fortran 90 MPI module sizes (v1.0.x's F90 module was + equivalent to "medium"). See the README file for more + explanation. + - Fix various MPI F90 interface functions and constant types to + match. Thanks to Michael Kluskens for pointing out the problems + to us. - Allow short messagees to use RDMA (vs. send/receive semantics) to a limited number peers in both the mvapi and openib BTL components. This reduces communication latency over IB channels. @@ -53,8 +60,6 @@ version 1.0. Several Fortran 77 and Fortran 90 tests need to be pre-seeded with results from a config.cache-like file. - Add --debug option to mpirun to generically invoke a parallel debugger. -- Fix various MPI F90 interface functions and constant types to match. - Thanks to Michael Kluskens for pointing out the problems to us. 1.0.3 diff --git a/config/ompi_configure_options.m4 b/config/ompi_configure_options.m4 index 29f56e2ad5..0e16492db8 100644 --- a/config/ompi_configure_options.m4 +++ b/config/ompi_configure_options.m4 @@ -179,12 +179,6 @@ else AC_MSG_RESULT([no]) OMPI_WANT_F90_BINDINGS=0 fi -#################### Early development override #################### -if test "$OMPI_WANT_F90_BINDINGS" = "1" -a -z "$enable_mpi_f90" -a -d .svn; then - OMPI_WANT_F90_BINDINGS=0 - echo "--> developer override: disable Fortran 90 by default" -fi -#################### Early development override #################### AC_MSG_CHECKING([desired Fortran 90 bindings "size"]) AC_ARG_WITH(mpi-f90-size, diff --git a/configure.ac b/configure.ac index d329da1124..173a5d6063 100644 --- a/configure.ac +++ b/configure.ac @@ -1107,7 +1107,7 @@ AC_CONFIG_FILES([ ompi/Makefile ompi/etc/Makefile ompi/include/Makefile - ompi/include/mpif-common.h + ompi/include/mpif-config.h ompi/datatype/Makefile ompi/debuggers/Makefile diff --git a/ompi/include/Makefile.am b/ompi/include/Makefile.am index 713f785d98..b21041cd19 100644 --- a/ompi/include/Makefile.am +++ b/ompi/include/Makefile.am @@ -17,10 +17,12 @@ # $HEADER$ # -# mpif.h is not generated, but mpif-common.h is. See big comments in -# these files for an explanation. +# mpif.h and mpif-common.h are not generated, but mpif-config.h is. +# See big comments in these files for an explanation. -headers = mpif.h +headers = \ + mpif.h \ + mpif-common.h nodist_headers = \ ompi_config.h @@ -32,7 +34,7 @@ include_HEADERS = $(headers) # counterparts, which AM automatically ships. nodist_include_HEADERS = \ mpi.h \ - mpif-common.h + mpif-config.h if WANT_INSTALL_HEADERS ompidir = $(includedir)/openmpi diff --git a/ompi/include/mpif-common.h b/ompi/include/mpif-common.h new file mode 100644 index 0000000000..0872a4065d --- /dev/null +++ b/ompi/include/mpif-common.h @@ -0,0 +1,450 @@ +! -*- fortran -*- +! +! Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana +! University Research and Technology +! Corporation. All rights reserved. +! Copyright (c) 2004-2005 The University of Tennessee and The University +! of Tennessee Research Foundation. All rights +! reserved. +! Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +! University of Stuttgart. All rights reserved. +! Copyright (c) 2004-2005 The Regents of the University of California. +! All rights reserved. +! Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. +! $COPYRIGHT$ +! +! Additional copyrights may follow +! +! $HEADER$ +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! +! Do ***not*** copy this file to the directory where your Fortran +! fortran application is compiled unless it is absolutely necessary! Most +! modern Fortran compilers now support the -I command line flag, which +! tells the compiler where to find .h files (specifically, this one). For +! example: +! +! shell$ mpif77 foo.f -o foo -I$OMPI_HOME/include +! +! will probably do the trick (assuming that you have set OMPI_HOME +! properly). +! +! That being said, OMPI's "mpif77" wrapper compiler should +! automatically include the -I option for you. The following command +! should be equivalent to the command listed above: +! +! shell$ mpif77 foo.f -o foo +! +! You should not copy this file to your local directory because it is +! possible that this file will be changed between versions of Open MPI. +! Indeed, this mpif.h is incompatible with the mpif.f of other +! implementations of MPI. Using this mpif.h with other implementations +! of MPI, or with other versions of Open MPI will result in undefined +! behavior (to include incorrect results, segmentation faults, +! unexplainable "hanging" in your application, etc.). Always use the +! -I command line option instead (or let mpif77 do it for you). +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +! +! This file contains the bulk of the Open MPI Fortran interface. It +! is included as a back-end file to both mpif.h (i.e., the +! standardized MPI Fortran header file) and mpi.f90 (the MPI-2 +! Fortran module source file, found in ompi/mpi/f90). +! +! This file is marginally different than mpif.h. mpif.h includes +! some "external" statements that are not suitable for use with the +! MPI-2 F90 module, and therefore cannot be included in the mpi.f90 +! source file. Hence, this file is essentially everything that +! needs to be in the standardized mpif.h *except* the "external" +! statements, and is therefore suitable to be included in mpi.f90. +! + +! First, however, include some output from configure. +! + include 'mpif-config.h' + +! +! MPI version +! + integer MPI_VERSION, MPI_SUBVERSION + + parameter (MPI_VERSION=2) + parameter (MPI_SUBVERSION=0) +! +! Miscellaneous constants +! + integer MPI_ANY_SOURCE, MPI_ANY_TAG + integer MPI_PROC_NULL, MPI_MAX_PROCESSOR_NAME + integer MPI_ROOT, MPI_MAX_DATAREP_STRING + integer MPI_MAX_ERROR_STRING, MPI_UNDEFINED + integer MPI_CART, MPI_GRAPH, MPI_KEYVAL_INVALID + integer MPI_SOURCE, MPI_TAG, MPI_ERROR + integer MPI_TAG_UB, MPI_HOST, MPI_IO, MPI_WTIME_IS_GLOBAL + integer MPI_APPNUM, MPI_LASTUSEDCODE, MPI_UNIVERSE_SIZE + integer IMPI_CLIENT_SIZE, IMPI_CLIENT_COLOR + integer IMPI_HOST_SIZE, IMPI_HOST_COLOR + integer MPI_BSEND_OVERHEAD + integer MPI_MAX_INFO_KEY, MPI_MAX_INFO_VAL + integer MPI_MAX_PORT_NAME, MPI_MAX_OBJECT_NAME + integer MPI_ORDER_C, MPI_ORDER_FORTRAN + integer MPI_DISTRIBUTE_BLOCK, MPI_DISTRIBUTE_CYCLIC + integer MPI_DISTRIBUTE_NONE, MPI_DISTRIBUTE_DFLT_DARG + integer MPI_TYPECLASS_INTEGER, MPI_TYPECLASS_REAL + integer MPI_TYPECLASS_COMPLEX + integer MPI_SEEK_SET, MPI_SEEK_CUR, MPI_SEEK_END + integer MPI_MODE_CREATE + integer MPI_MODE_RDONLY, MPI_MODE_WRONLY, MPI_MODE_RDWR + integer MPI_MODE_DELETE_ON_CLOSE, MPI_MODE_UNIQUE_OPEN + integer MPI_MODE_EXCL, MPI_MODE_APPEND, MPI_MODE_SEQUENTIAL + integer MPI_DISPLACEMENT_CURRENT + integer MPI_WIN_BASE, MPI_WIN_SIZE, MPI_WIN_DISP_UNIT + + parameter (MPI_ANY_SOURCE=-1) + parameter (MPI_ANY_TAG=-1) + parameter (MPI_PROC_NULL=-2) + parameter (MPI_ROOT=-4) + parameter (MPI_MAX_PROCESSOR_NAME=255) + parameter (MPI_MAX_ERROR_STRING=255) + parameter (MPI_MAX_DATAREP_STRING=128) + parameter (MPI_UNDEFINED=-32766) + parameter (MPI_CART=1) + parameter (MPI_GRAPH=2) + parameter (MPI_KEYVAL_INVALID=-1) + parameter (MPI_SOURCE=1) + parameter (MPI_TAG=2) + parameter (MPI_ERROR=3) + parameter (MPI_TAG_UB=0) + parameter (MPI_HOST=1) + parameter (MPI_IO=2) + parameter (MPI_WTIME_IS_GLOBAL=3) + parameter (MPI_APPNUM=4) + parameter (MPI_LASTUSEDCODE=5) + parameter (MPI_UNIVERSE_SIZE=6) + parameter (MPI_WIN_BASE=6) + parameter (MPI_WIN_SIZE=7) + parameter (MPI_WIN_DISP_UNIT=8) + parameter (IMPI_CLIENT_SIZE=10) + parameter (IMPI_CLIENT_COLOR=11) + parameter (IMPI_HOST_SIZE=12) + parameter (IMPI_HOST_COLOR=13) + + parameter (MPI_BSEND_OVERHEAD=128) + parameter (MPI_MAX_INFO_KEY=35) + parameter (MPI_MAX_INFO_VAL=255) + parameter (MPI_MAX_PORT_NAME=35) + parameter (MPI_MAX_OBJECT_NAME=63) + parameter (MPI_ORDER_C=0) + parameter (MPI_ORDER_FORTRAN=1) + parameter (MPI_DISTRIBUTE_BLOCK=0) + parameter (MPI_DISTRIBUTE_CYCLIC=1) + parameter (MPI_DISTRIBUTE_NONE=2) + parameter (MPI_DISTRIBUTE_DFLT_DARG=-1) + parameter (MPI_TYPECLASS_INTEGER=1) + parameter (MPI_TYPECLASS_REAL=2) + parameter (MPI_TYPECLASS_COMPLEX=3) + parameter (MPI_SEEK_SET=600) + parameter (MPI_SEEK_CUR=602) + parameter (MPI_SEEK_END=604) + parameter (MPI_MODE_CREATE=1) + parameter (MPI_MODE_RDONLY=2) + parameter (MPI_MODE_WRONLY=4) + parameter (MPI_MODE_RDWR=8) + parameter (MPI_MODE_DELETE_ON_CLOSE=16) + parameter (MPI_MODE_UNIQUE_OPEN=32) + parameter (MPI_MODE_EXCL=64) + parameter (MPI_MODE_APPEND=128) + parameter (MPI_MODE_SEQUENTIAL=256) + parameter (MPI_DISPLACEMENT_CURRENT=-54278278) +! +! global variables +! + double complex MPI_BOTTOM, MPI_IN_PLACE + character MPI_ARGV_NULL(1) +! MPI_ARGVS_NULL must not be a character array so that we can match +! an appropriate F90 MPI bindings interface function; see comments +! in mpi-f90-interfaces.h for a full explanation. + integer MPI_ARGVS_NULL +! These must be integer arrays so that we can match the proper +! prototypes in the F90 MPI bindings. + integer MPI_ERRCODES_IGNORE(1) + integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE) + integer MPI_STATUSES_IGNORE(MPI_STATUS_SIZE) + + common/mpi_fortran_bottom/MPI_BOTTOM + common/mpi_fortran_in_place/MPI_IN_PLACE + common/mpi_fortran_argv_null/MPI_ARGV_NULL + common/mpi_fortran_argvs_null/MPI_ARGVS_NULL + common/mpi_fortran_errcodes_ignore/MPI_ERRCODES_IGNORE + common/mpi_fortran_status_ignore/MPI_STATUS_IGNORE + common/mpi_fortran_statuses_ignore/MPI_STATUSES_IGNORE +! +! NULL "handles" (indices) +! + integer MPI_GROUP_NULL, MPI_COMM_NULL, MPI_DATATYPE_NULL + integer MPI_REQUEST_NULL, MPI_OP_NULL, MPI_ERRHANDLER_NULL + integer MPI_INFO_NULL, MPI_WIN_NULL + + parameter (MPI_GROUP_NULL=0) + parameter (MPI_COMM_NULL=2) + parameter (MPI_DATATYPE_NULL=0) + parameter (MPI_REQUEST_NULL=0) + parameter (MPI_OP_NULL=0) + parameter (MPI_ERRHANDLER_NULL=0) + parameter (MPI_INFO_NULL=0) + parameter (MPI_WIN_NULL=0) +! +! MPI_Init_thread constants +! + integer MPI_THREAD_SINGLE, MPI_THREAD_FUNNELED + integer MPI_THREAD_SERIALIZED, MPI_THREAD_MULTIPLE + + parameter (MPI_THREAD_SINGLE=0) + parameter (MPI_THREAD_FUNNELED=1) + parameter (MPI_THREAD_SERIALIZED=2) + parameter (MPI_THREAD_MULTIPLE=3) +! +! error classes +! + integer MPI_SUCCESS + integer MPI_ERR_BUFFER + integer MPI_ERR_COUNT + integer MPI_ERR_TYPE + integer MPI_ERR_TAG + integer MPI_ERR_COMM + integer MPI_ERR_RANK + integer MPI_ERR_REQUEST + integer MPI_ERR_ROOT + integer MPI_ERR_GROUP + integer MPI_ERR_OP + integer MPI_ERR_TOPOLOGY + integer MPI_ERR_DIMS + integer MPI_ERR_ARG + integer MPI_ERR_UNKNOWN + integer MPI_ERR_TRUNCATE + integer MPI_ERR_OTHER + integer MPI_ERR_INTERN + integer MPI_ERR_IN_STATUS + integer MPI_ERR_PENDING + integer MPI_ERR_ACCESS + integer MPI_ERR_AMODE + integer MPI_ERR_ASSERT + integer MPI_ERR_BAD_FILE + integer MPI_ERR_BASE + integer MPI_ERR_CONVERSION + integer MPI_ERR_DISP + integer MPI_ERR_DUP_DATAREP + integer MPI_ERR_FILE_EXISTS + integer MPI_ERR_FILE_IN_USE + integer MPI_ERR_FILE + integer MPI_ERR_INFO_KEY + integer MPI_ERR_INFO_NOKEY + integer MPI_ERR_INFO_VALUE + integer MPI_ERR_INFO + integer MPI_ERR_IO + integer MPI_ERR_KEYVAL + integer MPI_ERR_LOCKTYPE + integer MPI_ERR_NAME + integer MPI_ERR_NO_MEM + integer MPI_ERR_NOT_SAME + integer MPI_ERR_NO_SPACE + integer MPI_ERR_NO_SUCH_FILE + integer MPI_ERR_PORT + integer MPI_ERR_QUOTA + integer MPI_ERR_READ_ONLY + integer MPI_ERR_RMA_CONFLICT + integer MPI_ERR_RMA_SYNC + integer MPI_ERR_SERVICE + integer MPI_ERR_SIZE + integer MPI_ERR_SPAWN + integer MPI_ERR_UNSUPPORTED_DATAREP + integer MPI_ERR_UNSUPPORTED_OPERATION + integer MPI_ERR_WIN + + integer MPI_ERR_SYSRESOURCE + integer MPI_ERR_LASTCODE + + parameter( MPI_SUCCESS = 0) + parameter( MPI_ERR_BUFFER = 1) + parameter( MPI_ERR_COUNT = 2) + parameter( MPI_ERR_TYPE = 3) + parameter( MPI_ERR_TAG = 4) + parameter( MPI_ERR_COMM = 5) + parameter( MPI_ERR_RANK = 6) + parameter( MPI_ERR_REQUEST = 7) + parameter( MPI_ERR_ROOT = 8) + parameter( MPI_ERR_GROUP = 9) + parameter( MPI_ERR_OP = 10) + parameter( MPI_ERR_TOPOLOGY = 11) + parameter( MPI_ERR_DIMS = 12) + parameter( MPI_ERR_ARG = 13) + parameter( MPI_ERR_UNKNOWN = 14) + parameter( MPI_ERR_TRUNCATE = 15) + parameter( MPI_ERR_OTHER = 16) + parameter( MPI_ERR_INTERN = 17) + parameter( MPI_ERR_IN_STATUS = 18) + parameter( MPI_ERR_PENDING = 19) + parameter( MPI_ERR_ACCESS = 20) + parameter( MPI_ERR_AMODE = 21) + parameter( MPI_ERR_ASSERT = 22) + parameter( MPI_ERR_BAD_FILE = 23) + parameter( MPI_ERR_BASE = 24) + parameter( MPI_ERR_CONVERSION = 25) + parameter( MPI_ERR_DISP = 26) + parameter( MPI_ERR_DUP_DATAREP = 27) + parameter( MPI_ERR_FILE_EXISTS = 28) + parameter( MPI_ERR_FILE_IN_USE = 29) + parameter( MPI_ERR_FILE = 30) + parameter( MPI_ERR_INFO_KEY = 31) + parameter( MPI_ERR_INFO_NOKEY = 32) + parameter( MPI_ERR_INFO_VALUE = 33) + parameter( MPI_ERR_INFO = 34) + parameter( MPI_ERR_IO = 35) + parameter( MPI_ERR_KEYVAL = 36) + parameter( MPI_ERR_LOCKTYPE = 37) + parameter( MPI_ERR_NAME = 38) + parameter( MPI_ERR_NO_MEM = 39) + parameter( MPI_ERR_NOT_SAME = 40) + parameter( MPI_ERR_NO_SPACE = 41) + parameter( MPI_ERR_NO_SUCH_FILE = 42) + parameter( MPI_ERR_PORT = 43) + parameter( MPI_ERR_QUOTA = 44) + parameter( MPI_ERR_READ_ONLY = 45) + parameter( MPI_ERR_RMA_CONFLICT = 46) + parameter( MPI_ERR_RMA_SYNC = 47) + parameter( MPI_ERR_SERVICE = 48) + parameter( MPI_ERR_SIZE = 49) + parameter( MPI_ERR_SPAWN = 50) + parameter( MPI_ERR_UNSUPPORTED_DATAREP = 51) + parameter( MPI_ERR_UNSUPPORTED_OPERATION= 52) + parameter( MPI_ERR_WIN = 53) + + parameter( MPI_ERR_SYSRESOURCE = -2) + parameter( MPI_ERR_LASTCODE = 54) + +! +! comparison results +! + integer MPI_IDENT, MPI_CONGRUENT, MPI_SIMILAR, MPI_UNEQUAL + + parameter (MPI_IDENT=0) + parameter (MPI_CONGRUENT=1) + parameter (MPI_SIMILAR=2) + parameter (MPI_UNEQUAL=3) +! +! datatype combiners +! + integer MPI_COMBINER_NAMED + integer MPI_COMBINER_DUP + integer MPI_COMBINER_CONTIGUOUS + integer MPI_COMBINER_VECTOR + integer MPI_COMBINER_HVECTOR_INTEGER + integer MPI_COMBINER_HVECTOR + integer MPI_COMBINER_INDEXED + integer MPI_COMBINER_HINDEXED_INTEGER + integer MPI_COMBINER_HINDEXED + integer MPI_COMBINER_INDEXED_BLOCK + integer MPI_COMBINER_STRUCT_INTEGER + integer MPI_COMBINER_STRUCT + integer MPI_COMBINER_SUBARRAY + integer MPI_COMBINER_DARRAY + integer MPI_COMBINER_F90_REAL + integer MPI_COMBINER_F90_COMPLEX + integer MPI_COMBINER_F90_INTEGER + integer MPI_COMBINER_RESIZED + + parameter (MPI_COMBINER_NAMED=0) + parameter (MPI_COMBINER_DUP=1) + parameter (MPI_COMBINER_CONTIGUOUS=2) + parameter (MPI_COMBINER_VECTOR=3) + parameter (MPI_COMBINER_HVECTOR_INTEGER=4) + parameter (MPI_COMBINER_HVECTOR=5) + parameter (MPI_COMBINER_INDEXED=6) + parameter (MPI_COMBINER_HINDEXED_INTEGER=7) + parameter (MPI_COMBINER_HINDEXED=8) + parameter (MPI_COMBINER_INDEXED_BLOCK=9) + parameter (MPI_COMBINER_STRUCT_INTEGER=10) + parameter (MPI_COMBINER_STRUCT=11) + parameter (MPI_COMBINER_SUBARRAY=12) + parameter (MPI_COMBINER_DARRAY=13) + parameter (MPI_COMBINER_F90_REAL=14) + parameter (MPI_COMBINER_F90_COMPLEX=15) + parameter (MPI_COMBINER_F90_INTEGER=16) + parameter (MPI_COMBINER_RESIZED=17) +! +! lookup table indices +! + integer MPI_COMM_WORLD, MPI_COMM_SELF + integer MPI_GROUP_EMPTY + integer MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN + + parameter (MPI_COMM_WORLD=0) + parameter (MPI_COMM_SELF=1) + parameter (MPI_GROUP_EMPTY=1) + parameter (MPI_ERRORS_ARE_FATAL=1) + parameter (MPI_ERRORS_RETURN=2) + + integer MPI_BYTE, MPI_PACKED, MPI_UB, MPI_LB + integer MPI_CHARACTER, MPI_LOGICAL + integer MPI_INTEGER, MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4 + integer MPI_INTEGER8, MPI_INTEGER16 + integer MPI_REAL, MPI_REAL4, MPI_REAL8, MPI_REAL16 + integer MPI_DOUBLE_PRECISION + integer MPI_COMPLEX, MPI_COMPLEX8, MPI_COMPLEX16, MPI_COMPLEX32 + integer MPI_DOUBLE_COMPLEX + integer MPI_2REAL, MPI_2DOUBLE_PRECISION, MPI_2INTEGER + + parameter (MPI_BYTE=1) + parameter (MPI_PACKED=2) + parameter (MPI_UB=3) + parameter (MPI_LB=4) + parameter (MPI_CHARACTER=5) + parameter (MPI_LOGICAL=6) + parameter (MPI_INTEGER=7) + parameter (MPI_INTEGER1=8) + parameter (MPI_INTEGER2=9) + parameter (MPI_INTEGER4=10) + parameter (MPI_INTEGER8=11) + parameter (MPI_INTEGER16=12) + parameter (MPI_REAL=13) + parameter (MPI_REAL4=14) + parameter (MPI_REAL8=15) + parameter (MPI_REAL16=16) + parameter (MPI_DOUBLE_PRECISION=17) + parameter (MPI_COMPLEX=18) + parameter (MPI_COMPLEX8=19) + parameter (MPI_COMPLEX16=20) + parameter (MPI_COMPLEX32=21) + parameter (MPI_DOUBLE_COMPLEX=22) + parameter (MPI_2REAL=23) + parameter (MPI_2DOUBLE_PRECISION=24) + parameter (MPI_2INTEGER=25) + + integer MPI_MAX, MPI_MIN, MPI_SUM, MPI_PROD, MPI_LAND + integer MPI_BAND, MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR + integer MPI_MAXLOC, MPI_MINLOC, MPI_REPLACE + + parameter (MPI_MAX=1) + parameter (MPI_MIN=2) + parameter (MPI_SUM=3) + parameter (MPI_PROD=4) + parameter (MPI_LAND=5) + parameter (MPI_BAND=6) + parameter (MPI_LOR=7) + parameter (MPI_BOR=8) + parameter (MPI_LXOR=9) + parameter (MPI_BXOR=10) + parameter (MPI_MAXLOC=11) + parameter (MPI_MINLOC=12) + parameter (MPI_REPLACE=13) + +! +! double precision functions +! + double precision MPI_WTIME, MPI_WTICK , PMPI_WTICK, PMPI_WTIME + diff --git a/ompi/include/mpif-common.h.in b/ompi/include/mpif-common.h.in deleted file mode 100644 index e5772ed131..0000000000 --- a/ompi/include/mpif-common.h.in +++ /dev/null @@ -1,466 +0,0 @@ -! -*- fortran -*- -! -! Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana -! University Research and Technology -! Corporation. All rights reserved. -! Copyright (c) 2004-2005 The University of Tennessee and The University -! of Tennessee Research Foundation. All rights -! reserved. -! Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -! University of Stuttgart. All rights reserved. -! Copyright (c) 2004-2005 The Regents of the University of California. -! All rights reserved. -! Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. -! $COPYRIGHT$ -! -! Additional copyrights may follow -! -! $HEADER$ -! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! -! Do ***not*** copy this file to the directory where your Fortran -! fortran application is compiled unless it is absolutely necessary! Most -! modern Fortran compilers now support the -I command line flag, which -! tells the compiler where to find .h files (specifically, this one). For -! example: -! -! shell$ mpif77 foo.f -o foo -I$OMPI_HOME/include -! -! will probably do the trick (assuming that you have set OMPI_HOME -! properly). -! -! That being said, OMPI's "mpif77" wrapper compiler should -! automatically include the -I option for you. The following command -! should be equivalent to the command listed above: -! -! shell$ mpif77 foo.f -o foo -! -! You should not copy this file to your local directory because it is -! possible that this file will be changed between versions of Open MPI. -! Indeed, this mpif.h is incompatible with the mpif.f of other -! implementations of MPI. Using this mpif.h with other implementations -! of MPI, or with other versions of Open MPI will result in undefined -! behavior (to include incorrect results, segmentation faults, -! unexplainable "hanging" in your application, etc.). Always use the -! -I command line option instead (or let mpif77 do it for you). -! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -! -! This file contains the bulk of the Open MPI Fortran interface. It -! is included as a back-end file to both mpif.h (i.e., the -! standardized MPI Fortran header file) and mpi.f90 (the MPI-2 -! Fortran module source file, found in ompi/mpi/f90). -! -! This file is marginally different than mpif.h. mpif.h includes -! some "external" statements that are not suitable for use with the -! MPI-2 F90 module, and therefore cannot be included in the mpi.f90 -! source file. Hence, this file is essentially everything that -! needs to be in the standardized mpif.h *except* the "external" -! statements, and is therefore suitable to be included in mpi.f90. -! - -! -! OMPI version -! This file is generated from configure; do not edit it manually. -! - integer OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION - integer OMPI_RELEASE_VERSION - character*32 OMPI_GREEK_VERSION - character*32 OMPI_SVN_VERSION - parameter (OMPI_MAJOR_VERSION=@OMPI_MAJOR_VERSION@) - parameter (OMPI_MINOR_VERSION=@OMPI_MINOR_VERSION@) - parameter (OMPI_RELEASE_VERSION=@OMPI_RELEASE_VERSION@) - parameter (OMPI_GREEK_VERSION="@OMPI_GREEK_VERSION@") - parameter (OMPI_SVN_VERSION="@OMPI_SVN_R@") -! -! MPI version -! - integer MPI_VERSION, MPI_SUBVERSION - - parameter (MPI_VERSION=2) - parameter (MPI_SUBVERSION=0) -! -! kind parameters -! - integer MPI_OFFSET_KIND, MPI_ADDRESS_KIND, MPI_INTEGER_KIND - parameter (MPI_INTEGER_KIND=@OMPI_MPI_INTEGER_KIND@) - parameter (MPI_ADDRESS_KIND=@OMPI_MPI_ADDRESS_KIND@) - parameter (MPI_OFFSET_KIND=@OMPI_MPI_OFFSET_KIND@) -! -! misc. constants -! - integer MPI_ANY_SOURCE, MPI_ANY_TAG - integer MPI_PROC_NULL, MPI_MAX_PROCESSOR_NAME - integer MPI_ROOT, MPI_MAX_DATAREP_STRING - integer MPI_MAX_ERROR_STRING, MPI_UNDEFINED - integer MPI_CART, MPI_GRAPH, MPI_KEYVAL_INVALID - integer MPI_STATUS_SIZE, MPI_SOURCE, MPI_TAG, MPI_ERROR - integer MPI_TAG_UB, MPI_HOST, MPI_IO, MPI_WTIME_IS_GLOBAL - integer MPI_APPNUM, MPI_LASTUSEDCODE, MPI_UNIVERSE_SIZE - integer IMPI_CLIENT_SIZE, IMPI_CLIENT_COLOR - integer IMPI_HOST_SIZE, IMPI_HOST_COLOR - integer MPI_BSEND_OVERHEAD - integer MPI_MAX_INFO_KEY, MPI_MAX_INFO_VAL - integer MPI_MAX_PORT_NAME, MPI_MAX_OBJECT_NAME - integer MPI_ORDER_C, MPI_ORDER_FORTRAN - integer MPI_DISTRIBUTE_BLOCK, MPI_DISTRIBUTE_CYCLIC - integer MPI_DISTRIBUTE_NONE, MPI_DISTRIBUTE_DFLT_DARG - integer MPI_TYPECLASS_INTEGER, MPI_TYPECLASS_REAL - integer MPI_TYPECLASS_COMPLEX - integer MPI_SEEK_SET, MPI_SEEK_CUR, MPI_SEEK_END - integer MPI_MODE_CREATE - integer MPI_MODE_RDONLY, MPI_MODE_WRONLY, MPI_MODE_RDWR - integer MPI_MODE_DELETE_ON_CLOSE, MPI_MODE_UNIQUE_OPEN - integer MPI_MODE_EXCL, MPI_MODE_APPEND, MPI_MODE_SEQUENTIAL - integer MPI_DISPLACEMENT_CURRENT - integer MPI_WIN_BASE, MPI_WIN_SIZE, MPI_WIN_DISP_UNIT - - parameter (MPI_ANY_SOURCE=-1) - parameter (MPI_ANY_TAG=-1) - parameter (MPI_PROC_NULL=-2) - parameter (MPI_ROOT=-4) - parameter (MPI_MAX_PROCESSOR_NAME=255) - parameter (MPI_MAX_ERROR_STRING=255) - parameter (MPI_MAX_DATAREP_STRING=128) - parameter (MPI_UNDEFINED=-32766) - parameter (MPI_CART=1) - parameter (MPI_GRAPH=2) - parameter (MPI_KEYVAL_INVALID=-1) - parameter (MPI_STATUS_SIZE=5) - parameter (MPI_SOURCE=1) - parameter (MPI_TAG=2) - parameter (MPI_ERROR=3) - parameter (MPI_TAG_UB=0) - parameter (MPI_HOST=1) - parameter (MPI_IO=2) - parameter (MPI_WTIME_IS_GLOBAL=3) - parameter (MPI_APPNUM=4) - parameter (MPI_LASTUSEDCODE=5) - parameter (MPI_UNIVERSE_SIZE=6) - parameter (MPI_WIN_BASE=6) - parameter (MPI_WIN_SIZE=7) - parameter (MPI_WIN_DISP_UNIT=8) - parameter (IMPI_CLIENT_SIZE=10) - parameter (IMPI_CLIENT_COLOR=11) - parameter (IMPI_HOST_SIZE=12) - parameter (IMPI_HOST_COLOR=13) - - parameter (MPI_BSEND_OVERHEAD=128) - parameter (MPI_MAX_INFO_KEY=35) - parameter (MPI_MAX_INFO_VAL=255) - parameter (MPI_MAX_PORT_NAME=35) - parameter (MPI_MAX_OBJECT_NAME=63) - parameter (MPI_ORDER_C=0) - parameter (MPI_ORDER_FORTRAN=1) - parameter (MPI_DISTRIBUTE_BLOCK=0) - parameter (MPI_DISTRIBUTE_CYCLIC=1) - parameter (MPI_DISTRIBUTE_NONE=2) - parameter (MPI_DISTRIBUTE_DFLT_DARG=-1) - parameter (MPI_TYPECLASS_INTEGER=1) - parameter (MPI_TYPECLASS_REAL=2) - parameter (MPI_TYPECLASS_COMPLEX=3) - parameter (MPI_SEEK_SET=600) - parameter (MPI_SEEK_CUR=602) - parameter (MPI_SEEK_END=604) - parameter (MPI_MODE_CREATE=1) - parameter (MPI_MODE_RDONLY=2) - parameter (MPI_MODE_WRONLY=4) - parameter (MPI_MODE_RDWR=8) - parameter (MPI_MODE_DELETE_ON_CLOSE=16) - parameter (MPI_MODE_UNIQUE_OPEN=32) - parameter (MPI_MODE_EXCL=64) - parameter (MPI_MODE_APPEND=128) - parameter (MPI_MODE_SEQUENTIAL=256) - parameter (MPI_DISPLACEMENT_CURRENT=-54278278) -! -! global variables -! - double complex MPI_BOTTOM, MPI_IN_PLACE - character MPI_ARGV_NULL(1) -! MPI_ARGVS_NULL must not be a character array so that we can match -! an appropriate F90 MPI bindings interface function; see comments -! in mpi-f90-interfaces.h for a full explanation. - integer MPI_ARGVS_NULL -! These must be integer arrays so that we can match the proper -! prototypes in the F90 MPI bindings. - integer MPI_ERRCODES_IGNORE(1) - integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE) - integer MPI_STATUSES_IGNORE(MPI_STATUS_SIZE) - - common/mpi_fortran_bottom/MPI_BOTTOM - common/mpi_fortran_in_place/MPI_IN_PLACE - common/mpi_fortran_argv_null/MPI_ARGV_NULL - common/mpi_fortran_argvs_null/MPI_ARGVS_NULL - common/mpi_fortran_errcodes_ignore/MPI_ERRCODES_IGNORE - common/mpi_fortran_status_ignore/MPI_STATUS_IGNORE - common/mpi_fortran_statuses_ignore/MPI_STATUSES_IGNORE -! -! NULL "handles" (indices) -! - integer MPI_GROUP_NULL, MPI_COMM_NULL, MPI_DATATYPE_NULL - integer MPI_REQUEST_NULL, MPI_OP_NULL, MPI_ERRHANDLER_NULL - integer MPI_INFO_NULL, MPI_WIN_NULL - - parameter (MPI_GROUP_NULL=0) - parameter (MPI_COMM_NULL=2) - parameter (MPI_DATATYPE_NULL=0) - parameter (MPI_REQUEST_NULL=0) - parameter (MPI_OP_NULL=0) - parameter (MPI_ERRHANDLER_NULL=0) - parameter (MPI_INFO_NULL=0) - parameter (MPI_WIN_NULL=0) -! -! MPI_Init_thread constants -! - integer MPI_THREAD_SINGLE, MPI_THREAD_FUNNELED - integer MPI_THREAD_SERIALIZED, MPI_THREAD_MULTIPLE - - parameter (MPI_THREAD_SINGLE=0) - parameter (MPI_THREAD_FUNNELED=1) - parameter (MPI_THREAD_SERIALIZED=2) - parameter (MPI_THREAD_MULTIPLE=3) -! -! error classes -! - integer MPI_SUCCESS - integer MPI_ERR_BUFFER - integer MPI_ERR_COUNT - integer MPI_ERR_TYPE - integer MPI_ERR_TAG - integer MPI_ERR_COMM - integer MPI_ERR_RANK - integer MPI_ERR_REQUEST - integer MPI_ERR_ROOT - integer MPI_ERR_GROUP - integer MPI_ERR_OP - integer MPI_ERR_TOPOLOGY - integer MPI_ERR_DIMS - integer MPI_ERR_ARG - integer MPI_ERR_UNKNOWN - integer MPI_ERR_TRUNCATE - integer MPI_ERR_OTHER - integer MPI_ERR_INTERN - integer MPI_ERR_IN_STATUS - integer MPI_ERR_PENDING - integer MPI_ERR_ACCESS - integer MPI_ERR_AMODE - integer MPI_ERR_ASSERT - integer MPI_ERR_BAD_FILE - integer MPI_ERR_BASE - integer MPI_ERR_CONVERSION - integer MPI_ERR_DISP - integer MPI_ERR_DUP_DATAREP - integer MPI_ERR_FILE_EXISTS - integer MPI_ERR_FILE_IN_USE - integer MPI_ERR_FILE - integer MPI_ERR_INFO_KEY - integer MPI_ERR_INFO_NOKEY - integer MPI_ERR_INFO_VALUE - integer MPI_ERR_INFO - integer MPI_ERR_IO - integer MPI_ERR_KEYVAL - integer MPI_ERR_LOCKTYPE - integer MPI_ERR_NAME - integer MPI_ERR_NO_MEM - integer MPI_ERR_NOT_SAME - integer MPI_ERR_NO_SPACE - integer MPI_ERR_NO_SUCH_FILE - integer MPI_ERR_PORT - integer MPI_ERR_QUOTA - integer MPI_ERR_READ_ONLY - integer MPI_ERR_RMA_CONFLICT - integer MPI_ERR_RMA_SYNC - integer MPI_ERR_SERVICE - integer MPI_ERR_SIZE - integer MPI_ERR_SPAWN - integer MPI_ERR_UNSUPPORTED_DATAREP - integer MPI_ERR_UNSUPPORTED_OPERATION - integer MPI_ERR_WIN - - integer MPI_ERR_SYSRESOURCE - integer MPI_ERR_LASTCODE - - parameter( MPI_SUCCESS = 0) - parameter( MPI_ERR_BUFFER = 1) - parameter( MPI_ERR_COUNT = 2) - parameter( MPI_ERR_TYPE = 3) - parameter( MPI_ERR_TAG = 4) - parameter( MPI_ERR_COMM = 5) - parameter( MPI_ERR_RANK = 6) - parameter( MPI_ERR_REQUEST = 7) - parameter( MPI_ERR_ROOT = 8) - parameter( MPI_ERR_GROUP = 9) - parameter( MPI_ERR_OP = 10) - parameter( MPI_ERR_TOPOLOGY = 11) - parameter( MPI_ERR_DIMS = 12) - parameter( MPI_ERR_ARG = 13) - parameter( MPI_ERR_UNKNOWN = 14) - parameter( MPI_ERR_TRUNCATE = 15) - parameter( MPI_ERR_OTHER = 16) - parameter( MPI_ERR_INTERN = 17) - parameter( MPI_ERR_IN_STATUS = 18) - parameter( MPI_ERR_PENDING = 19) - parameter( MPI_ERR_ACCESS = 20) - parameter( MPI_ERR_AMODE = 21) - parameter( MPI_ERR_ASSERT = 22) - parameter( MPI_ERR_BAD_FILE = 23) - parameter( MPI_ERR_BASE = 24) - parameter( MPI_ERR_CONVERSION = 25) - parameter( MPI_ERR_DISP = 26) - parameter( MPI_ERR_DUP_DATAREP = 27) - parameter( MPI_ERR_FILE_EXISTS = 28) - parameter( MPI_ERR_FILE_IN_USE = 29) - parameter( MPI_ERR_FILE = 30) - parameter( MPI_ERR_INFO_KEY = 31) - parameter( MPI_ERR_INFO_NOKEY = 32) - parameter( MPI_ERR_INFO_VALUE = 33) - parameter( MPI_ERR_INFO = 34) - parameter( MPI_ERR_IO = 35) - parameter( MPI_ERR_KEYVAL = 36) - parameter( MPI_ERR_LOCKTYPE = 37) - parameter( MPI_ERR_NAME = 38) - parameter( MPI_ERR_NO_MEM = 39) - parameter( MPI_ERR_NOT_SAME = 40) - parameter( MPI_ERR_NO_SPACE = 41) - parameter( MPI_ERR_NO_SUCH_FILE = 42) - parameter( MPI_ERR_PORT = 43) - parameter( MPI_ERR_QUOTA = 44) - parameter( MPI_ERR_READ_ONLY = 45) - parameter( MPI_ERR_RMA_CONFLICT = 46) - parameter( MPI_ERR_RMA_SYNC = 47) - parameter( MPI_ERR_SERVICE = 48) - parameter( MPI_ERR_SIZE = 49) - parameter( MPI_ERR_SPAWN = 50) - parameter( MPI_ERR_UNSUPPORTED_DATAREP = 51) - parameter( MPI_ERR_UNSUPPORTED_OPERATION= 52) - parameter( MPI_ERR_WIN = 53) - - parameter( MPI_ERR_SYSRESOURCE = -2) - parameter( MPI_ERR_LASTCODE = 54) - -! -! comparison results -! - integer MPI_IDENT, MPI_CONGRUENT, MPI_SIMILAR, MPI_UNEQUAL - - parameter (MPI_IDENT=0) - parameter (MPI_CONGRUENT=1) - parameter (MPI_SIMILAR=2) - parameter (MPI_UNEQUAL=3) -! -! datatype combiners -! - integer MPI_COMBINER_NAMED - integer MPI_COMBINER_DUP - integer MPI_COMBINER_CONTIGUOUS - integer MPI_COMBINER_VECTOR - integer MPI_COMBINER_HVECTOR_INTEGER - integer MPI_COMBINER_HVECTOR - integer MPI_COMBINER_INDEXED - integer MPI_COMBINER_HINDEXED_INTEGER - integer MPI_COMBINER_HINDEXED - integer MPI_COMBINER_INDEXED_BLOCK - integer MPI_COMBINER_STRUCT_INTEGER - integer MPI_COMBINER_STRUCT - integer MPI_COMBINER_SUBARRAY - integer MPI_COMBINER_DARRAY - integer MPI_COMBINER_F90_REAL - integer MPI_COMBINER_F90_COMPLEX - integer MPI_COMBINER_F90_INTEGER - integer MPI_COMBINER_RESIZED - - parameter (MPI_COMBINER_NAMED=0) - parameter (MPI_COMBINER_DUP=1) - parameter (MPI_COMBINER_CONTIGUOUS=2) - parameter (MPI_COMBINER_VECTOR=3) - parameter (MPI_COMBINER_HVECTOR_INTEGER=4) - parameter (MPI_COMBINER_HVECTOR=5) - parameter (MPI_COMBINER_INDEXED=6) - parameter (MPI_COMBINER_HINDEXED_INTEGER=7) - parameter (MPI_COMBINER_HINDEXED=8) - parameter (MPI_COMBINER_INDEXED_BLOCK=9) - parameter (MPI_COMBINER_STRUCT_INTEGER=10) - parameter (MPI_COMBINER_STRUCT=11) - parameter (MPI_COMBINER_SUBARRAY=12) - parameter (MPI_COMBINER_DARRAY=13) - parameter (MPI_COMBINER_F90_REAL=14) - parameter (MPI_COMBINER_F90_COMPLEX=15) - parameter (MPI_COMBINER_F90_INTEGER=16) - parameter (MPI_COMBINER_RESIZED=17) -! -! lookup table indices -! - integer MPI_COMM_WORLD, MPI_COMM_SELF - integer MPI_GROUP_EMPTY - integer MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN - - parameter (MPI_COMM_WORLD=0) - parameter (MPI_COMM_SELF=1) - parameter (MPI_GROUP_EMPTY=1) - parameter (MPI_ERRORS_ARE_FATAL=1) - parameter (MPI_ERRORS_RETURN=2) - - integer MPI_BYTE, MPI_PACKED, MPI_UB, MPI_LB - integer MPI_CHARACTER, MPI_LOGICAL - integer MPI_INTEGER, MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4 - integer MPI_INTEGER8, MPI_INTEGER16 - integer MPI_REAL, MPI_REAL4, MPI_REAL8, MPI_REAL16 - integer MPI_DOUBLE_PRECISION - integer MPI_COMPLEX, MPI_COMPLEX8, MPI_COMPLEX16, MPI_COMPLEX32 - integer MPI_DOUBLE_COMPLEX - integer MPI_2REAL, MPI_2DOUBLE_PRECISION, MPI_2INTEGER - - parameter (MPI_BYTE=1) - parameter (MPI_PACKED=2) - parameter (MPI_UB=3) - parameter (MPI_LB=4) - parameter (MPI_CHARACTER=5) - parameter (MPI_LOGICAL=6) - parameter (MPI_INTEGER=7) - parameter (MPI_INTEGER1=8) - parameter (MPI_INTEGER2=9) - parameter (MPI_INTEGER4=10) - parameter (MPI_INTEGER8=11) - parameter (MPI_INTEGER16=12) - parameter (MPI_REAL=13) - parameter (MPI_REAL4=14) - parameter (MPI_REAL8=15) - parameter (MPI_REAL16=16) - parameter (MPI_DOUBLE_PRECISION=17) - parameter (MPI_COMPLEX=18) - parameter (MPI_COMPLEX8=19) - parameter (MPI_COMPLEX16=20) - parameter (MPI_COMPLEX32=21) - parameter (MPI_DOUBLE_COMPLEX=22) - parameter (MPI_2REAL=23) - parameter (MPI_2DOUBLE_PRECISION=24) - parameter (MPI_2INTEGER=25) - - integer MPI_MAX, MPI_MIN, MPI_SUM, MPI_PROD, MPI_LAND - integer MPI_BAND, MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR - integer MPI_MAXLOC, MPI_MINLOC, MPI_REPLACE - - parameter (MPI_MAX=1) - parameter (MPI_MIN=2) - parameter (MPI_SUM=3) - parameter (MPI_PROD=4) - parameter (MPI_LAND=5) - parameter (MPI_BAND=6) - parameter (MPI_LOR=7) - parameter (MPI_BOR=8) - parameter (MPI_LXOR=9) - parameter (MPI_BXOR=10) - parameter (MPI_MAXLOC=11) - parameter (MPI_MINLOC=12) - parameter (MPI_REPLACE=13) - -! -! double precision functions -! - double precision MPI_WTIME, MPI_WTICK , PMPI_WTICK, PMPI_WTIME diff --git a/ompi/include/mpif-config.h.in b/ompi/include/mpif-config.h.in new file mode 100644 index 0000000000..cc832e4990 --- /dev/null +++ b/ompi/include/mpif-config.h.in @@ -0,0 +1,88 @@ +! -*- fortran -*- +! +! Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana +! University Research and Technology +! Corporation. All rights reserved. +! Copyright (c) 2004-2005 The University of Tennessee and The University +! of Tennessee Research Foundation. All rights +! reserved. +! Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +! University of Stuttgart. All rights reserved. +! Copyright (c) 2004-2005 The Regents of the University of California. +! All rights reserved. +! Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. +! $COPYRIGHT$ +! +! Additional copyrights may follow +! +! $HEADER$ +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! +! Do ***not*** copy this file to the directory where your Fortran +! fortran application is compiled unless it is absolutely necessary! Most +! modern Fortran compilers now support the -I command line flag, which +! tells the compiler where to find .h files (specifically, this one). For +! example: +! +! shell$ mpif77 foo.f -o foo -I$OMPI_HOME/include +! +! will probably do the trick (assuming that you have set OMPI_HOME +! properly). +! +! That being said, OMPI's "mpif77" wrapper compiler should +! automatically include the -I option for you. The following command +! should be equivalent to the command listed above: +! +! shell$ mpif77 foo.f -o foo +! +! You should not copy this file to your local directory because it is +! possible that this file will be changed between versions of Open MPI. +! Indeed, this mpif.h is incompatible with the mpif.f of other +! implementations of MPI. Using this mpif.h with other implementations +! of MPI, or with other versions of Open MPI will result in undefined +! behavior (to include incorrect results, segmentation faults, +! unexplainable "hanging" in your application, etc.). Always use the +! -I command line option instead (or let mpif77 do it for you). +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +! +! This file is included as a back-end file to both mpif.h (i.e., the +! standardized MPI Fortran header file) and a bunch of the MPI +! Fortran 90 subroutine implementations found in ompi/mpi/f90. +! +! This file contains the output from configure that is relevant for +! Fortran applications (both 77 and 90) and a few values that are +! necessary to compile the F90 module (e.g., MPI_STATUS_SIZE). +! + +! +! OMPI version +! This file is generated from configure; do not edit it manually. +! + integer OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION + integer OMPI_RELEASE_VERSION + character*32 OMPI_GREEK_VERSION + character*32 OMPI_SVN_VERSION + parameter (OMPI_MAJOR_VERSION=@OMPI_MAJOR_VERSION@) + parameter (OMPI_MINOR_VERSION=@OMPI_MINOR_VERSION@) + parameter (OMPI_RELEASE_VERSION=@OMPI_RELEASE_VERSION@) + parameter (OMPI_GREEK_VERSION="@OMPI_GREEK_VERSION@") + parameter (OMPI_SVN_VERSION="@OMPI_SVN_R@") +! +! Kind parameters +! + integer MPI_OFFSET_KIND, MPI_ADDRESS_KIND, MPI_INTEGER_KIND + parameter (MPI_INTEGER_KIND=@OMPI_MPI_INTEGER_KIND@) + parameter (MPI_ADDRESS_KIND=@OMPI_MPI_ADDRESS_KIND@) + parameter (MPI_OFFSET_KIND=@OMPI_MPI_OFFSET_KIND@) +! +! Miscellaneous constants +! + integer MPI_STATUS_SIZE + parameter (MPI_STATUS_SIZE=5) diff --git a/ompi/include/mpif.h b/ompi/include/mpif.h index 8a027ab6e0..6eb5d9a687 100644 --- a/ompi/include/mpif.h +++ b/ompi/include/mpif.h @@ -62,16 +62,16 @@ ! These "external" statements are specific to the MPI F77 interface ! (and are toxic to the MPI F90 interface), and are therefore in the ! MPI F77-specific header file (i.e., this one). -! - external MPI_NULL_COPY_FN, MPI_NULL_DELETE_FN - external MPI_COMM_NULL_COPY_FN, MPI_COMM_NULL_DELETE_FN - external MPI_TYPE_NULL_COPY_FN, MPI_TYPE_NULL_DELETE_FN - external MPI_DUP_FN, MPI_COMM_DUP_FN, MPI_TYPE_DUP_FN - external MPI_WIN_NULL_COPY_FN - external MPI_WIN_NULL_DELETE_FN - external MPI_WIN_DUP_FN - -! -! double precision functions -! +! + external MPI_NULL_COPY_FN, MPI_NULL_DELETE_FN + external MPI_COMM_NULL_COPY_FN, MPI_COMM_NULL_DELETE_FN + external MPI_TYPE_NULL_COPY_FN, MPI_TYPE_NULL_DELETE_FN + external MPI_DUP_FN, MPI_COMM_DUP_FN, MPI_TYPE_DUP_FN + external MPI_WIN_NULL_COPY_FN + external MPI_WIN_NULL_DELETE_FN + external MPI_WIN_DUP_FN + +! +! double precision functions +! external MPI_WTIME, MPI_WTICK, PMPI_WTICK, PMPI_WTIME diff --git a/ompi/mpi/f90/Makefile.am b/ompi/mpi/f90/Makefile.am index 746fc2e48e..baa4dff9b4 100644 --- a/ompi/mpi/f90/Makefile.am +++ b/ompi/mpi/f90/Makefile.am @@ -50,7 +50,7 @@ SUBDIRS = scripts -AM_FCFLAGS = -I$(top_builddir)/ompi/include $(OMPI_FC_MODULE_FLAG). -I$(srcdir) +AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include $(OMPI_FC_MODULE_FLAG). -I$(srcdir) # Override the default f90 rules because we have to insert # $(FCFLAGS_f90) right before the source filename. This is necessary diff --git a/ompi/mpi/f90/scripts/mpi-f90-interfaces.h.sh b/ompi/mpi/f90/scripts/mpi-f90-interfaces.h.sh index 4400a7a95a..dfca3df62d 100755 --- a/ompi/mpi/f90/scripts/mpi-f90-interfaces.h.sh +++ b/ompi/mpi/f90/scripts/mpi-f90-interfaces.h.sh @@ -64,7 +64,6 @@ output_1() { cat < @@ -190,7 +191,7 @@ do subroutine ${proc}( ) - include "mpif-common.h" + include "mpif-config.h" diff --git a/ompi/mpi/f90/xml/chasm-mpi.f90.xsl b/ompi/mpi/f90/xml/chasm-mpi.f90.xsl index 19797ea82b..ddfa6c42f3 100644 --- a/ompi/mpi/f90/xml/chasm-mpi.f90.xsl +++ b/ompi/mpi/f90/xml/chasm-mpi.f90.xsl @@ -317,13 +317,13 @@ done for rank in $ranks do - case "$rank" in 1) dim=':' ; esac - case "$rank" in 2) dim=':,:' ; esac - case "$rank" in 3) dim=':,:,:' ; esac - case "$rank" in 4) dim=':,:,:,:' ; esac - case "$rank" in 5) dim=':,:,:,:,:' ; esac - case "$rank" in 6) dim=':,:,:,:,:,:' ; esac - case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac + case "$rank" in 1) dim='*' ; esac + case "$rank" in 2) dim='1,*' ; esac + case "$rank" in 3) dim='1,1,*' ; esac + case "$rank" in 4) dim='1,1,1,*' ; esac + case "$rank" in 5) dim='1,1,1,1,*' ; esac + case "$rank" in 6) dim='1,1,1,1,1,*' ; esac + case "$rank" in 7) dim='1,1,1,1,1,1,*' ; esac diff --git a/ompi/mpi/f90/xml/chasm-mpi.i.f90.xsl b/ompi/mpi/f90/xml/chasm-mpi.i.f90.xsl index dae0757b79..c53e1ad99d 100644 --- a/ompi/mpi/f90/xml/chasm-mpi.i.f90.xsl +++ b/ompi/mpi/f90/xml/chasm-mpi.i.f90.xsl @@ -2,6 +2,7 @@ ........................................................................... Copyright (c) 2004-2006 The Regents of the University of California. All rights reserved. + Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. $COPYRIGHT$ Additional copyrights may follow @@ -112,7 +113,7 @@ output_ () { subroutine ${procedure}( ) - include 'mpif-common.h' + include 'mpif-config.h' @@ -184,7 +185,7 @@ output_ () { subroutine ${proc}( ) - include 'mpif-common.h' + include 'mpif-config.h' @@ -213,13 +214,13 @@ start for rank in $allranks do case "$rank" in 0) dim='' ; esac - case "$rank" in 1) dim=', dimension(:)' ; esac - case "$rank" in 2) dim=', dimension(:,:)' ; esac - case "$rank" in 3) dim=', dimension(:,:,:)' ; esac - case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac - case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac - case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac - case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac + case "$rank" in 1) dim=', dimension(*)' ; esac + case "$rank" in 2) dim=', dimension(1,*)' ; esac + case "$rank" in 3) dim=', dimension(1,1,*)' ; esac + case "$rank" in 4) dim=', dimension(1,1,1,*)' ; esac + case "$rank" in 5) dim=', dimension(1,1,1,1,*)' ; esac + case "$rank" in 6) dim=', dimension(1,1,1,1,1,*)' ; esac + case "$rank" in 7) dim=', dimension(1,1,1,1,1,1,*)' ; esac output_ @@ -631,17 +632,17 @@ end # Do a little error checking -if test ! -f fortran_kinds.sh; then +if test ! -f "$1/fortran_kinds.sh"; then echo "ERROR: Cannot find fortran_kinds.sh" >&2 exit 1 -elif test -z fortran_kinds.sh; then +elif test -z "$1/fortran_kinds.sh"; then echo "ERROR: fortran_kinds.sh appears to be empty!" >&2 exit 1 fi # Read in the KIND information -. fortran_kinds.sh +. "$1/fortran_kinds.sh" # Setup diff --git a/ompi/tools/ompi_info/Makefile.am b/ompi/tools/ompi_info/Makefile.am index 1c3d150506..cc74a6307a 100644 --- a/ompi/tools/ompi_info/Makefile.am +++ b/ompi/tools/ompi_info/Makefile.am @@ -34,7 +34,8 @@ AM_CPPFLAGS = \ -DOMPI_CC_ABSOLUTE="\"@OMPI_CC_ABSOLUTE@\"" \ -DOMPI_CXX_ABSOLUTE="\"@OMPI_CXX_ABSOLUTE@\"" \ -DOMPI_F77_ABSOLUTE="\"@OMPI_F77_ABSOLUTE@\"" \ - -DOMPI_F90_ABSOLUTE="\"@OMPI_F90_ABSOLUTE@\"" + -DOMPI_F90_ABSOLUTE="\"@OMPI_F90_ABSOLUTE@\"" \ + -DOMPI_F90_BUILD_SIZE="\"@OMPI_F90_BUILD_SIZE@\"" if OMPI_INSTALL_BINARIES diff --git a/ompi/tools/ompi_info/param.cc b/ompi/tools/ompi_info/param.cc index 1db4cb8035..77bfee68e7 100644 --- a/ompi/tools/ompi_info/param.cc +++ b/ompi/tools/ompi_info/param.cc @@ -332,6 +332,7 @@ void ompi_info::do_config(bool want_all) (OMPI_F77_SINGLE_UNDERSCORE ? "single underscore" : "double underscore")))) + string(")"): "no"); const string f90(OMPI_WANT_F90_BINDINGS ? "yes" : "no"); + const string f90_size(OMPI_F90_BUILD_SIZE); const string memprofile(OMPI_ENABLE_MEM_PROFILE ? "yes" : "no"); const string memdebug(OMPI_ENABLE_MEM_DEBUG ? "yes" : "no"); const string debug(OMPI_ENABLE_DEBUG ? "yes" : "no"); @@ -373,6 +374,8 @@ void ompi_info::do_config(bool want_all) out("C++ bindings", "bindings:cxx", cxx); out("Fortran77 bindings", "bindings:f77", f77); out("Fortran90 bindings", "bindings:f90", f90); + out("Fortran90 bindings size", "bindings:f90:size", + OMPI_WANT_F90_BINDINGS ? f90_size : "na"); out("C compiler", "compiler:c:command", OMPI_CC); out("C compiler absolute", "compiler:c:absolute", OMPI_CC_ABSOLUTE);