Add the new MPI-3 function MPI_GET_LIBRARY_VERSION.
This commit was SVN r25860.
This commit is contained in:
parent
e7f0d2e091
commit
feb8eb8a90
@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
@ -55,6 +55,10 @@ AC_DEFUN([OPAL_SAVE_VERSION], [
|
||||
[Complete release number of ]$2)
|
||||
AC_DEFINE_UNQUOTED($1[_RELEASE_DATE], ["$]$1[_RELEASE_DATE"],
|
||||
[Release date of ]$2)
|
||||
AC_DEFINE_UNQUOTED($1[_WANT_REPO_REV], ["$]$1[_WANT_REPO_REV"],
|
||||
[Release date of ]$2)
|
||||
AC_DEFINE_UNQUOTED($1[_REPO_REV], ["$]$1[_REPO_REV"],
|
||||
[Release date of ]$2)
|
||||
|
||||
AC_CONFIG_FILES([$4])
|
||||
])dnl
|
||||
|
@ -12,12 +12,15 @@
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int rank, size;
|
||||
int rank, size, len;
|
||||
char version[MPI_MAX_LIBRARY_VERSION_STRING];
|
||||
|
||||
MPI_Init(&argc, &argv);
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &size);
|
||||
printf("Hello, world, I am %d of %d\n", rank, size);
|
||||
MPI_Get_library_version(version, &len);
|
||||
printf("Hello, world, I am %d of %d, (%s, %d)\n",
|
||||
rank, size, version, len);
|
||||
MPI_Finalize();
|
||||
|
||||
return 0;
|
||||
|
@ -12,12 +12,15 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int rank, size;
|
||||
int rank, size, len;
|
||||
char version[MPI_MAX_LIBRARY_VERSION_STRING];
|
||||
|
||||
MPI::Init();
|
||||
rank = MPI::COMM_WORLD.Get_rank();
|
||||
size = MPI::COMM_WORLD.Get_size();
|
||||
std::cout << "Hello, world! I am " << rank << " of " << size << std::endl;
|
||||
MPI_Get_library_version(version, &len);
|
||||
std::cout << "Hello, world! I am " << rank << " of " << size
|
||||
<< "(" << version << ", " << len << ")" << std::endl;
|
||||
MPI::Finalize();
|
||||
|
||||
return 0;
|
||||
|
@ -9,12 +9,15 @@ C
|
||||
program main
|
||||
implicit none
|
||||
include 'mpif.h'
|
||||
integer ierr, rank, size
|
||||
integer ierr, rank, size, len
|
||||
character*(MPI_MAX_LIBRARY_VERSION_STRING) version
|
||||
|
||||
call MPI_INIT(ierr)
|
||||
call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
|
||||
call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr)
|
||||
print *, "Hello, world, I am ", rank, " of ", size
|
||||
call MPI_GET_LIBRARY_VERSION(version, len, ierr)
|
||||
print *, "Hello, world, I am ", rank, " of ", size, " (",
|
||||
& version, ",", len, ")"
|
||||
call MPI_FINALIZE(ierr)
|
||||
|
||||
end
|
||||
|
@ -11,11 +11,15 @@
|
||||
program main
|
||||
use mpi
|
||||
implicit none
|
||||
integer :: ierr, rank, size
|
||||
integer :: ierr, rank, size, len
|
||||
character*(MPI_MAX_LIBRARY_VERSION_STRING) :: version
|
||||
character*(MPI_MAX_OBJECT_NAME) :: name
|
||||
|
||||
call MPI_INIT(ierr)
|
||||
call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
|
||||
call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr)
|
||||
print *, "Hello, world, I am ", rank, " of ", size
|
||||
call MPI_GET_LIBRARY_VERSION(version, len, ierr)
|
||||
print *, "Hello, world, I am ", rank, " of ", size," (", &
|
||||
version, ",", len, ")"
|
||||
call MPI_FINALIZE(ierr)
|
||||
end
|
||||
|
@ -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) 2007-2011 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
@ -409,6 +409,7 @@ typedef int (MPI_Grequest_cancel_function)(void *, int);
|
||||
#define MPI_MAX_PROCESSOR_NAME OPAL_MAX_PROCESSOR_NAME /* max proc. name length */
|
||||
#define MPI_MAX_ERROR_STRING OPAL_MAX_ERROR_STRING /* max error message length */
|
||||
#define MPI_MAX_OBJECT_NAME OPAL_MAX_OBJECT_NAME /* max object name length */
|
||||
#define MPI_MAX_LIBRARY_VERSION_STRING 256 /* max length of library version string */
|
||||
#define MPI_UNDEFINED -32766 /* undefined stuff */
|
||||
#define MPI_CART 1 /* cartesian topology */
|
||||
#define MPI_GRAPH 2 /* graph topology */
|
||||
@ -1250,6 +1251,7 @@ OMPI_DECLSPEC int MPI_Get(void *origin_addr, int origin_count,
|
||||
MPI_Datatype origin_datatype, int target_rank,
|
||||
MPI_Aint target_disp, int target_count,
|
||||
MPI_Datatype target_datatype, MPI_Win win);
|
||||
OMPI_DECLSPEC int MPI_Get_library_version(char *version, int *resultlen);
|
||||
OMPI_DECLSPEC int MPI_Get_processor_name(char *name, int *resultlen);
|
||||
OMPI_DECLSPEC int MPI_Get_version(int *version, int *subversion);
|
||||
OMPI_DECLSPEC int MPI_Graph_create(MPI_Comm comm_old, int nnodes, int *index,
|
||||
@ -1778,6 +1780,7 @@ OMPI_DECLSPEC int PMPI_Get(void *origin_addr, int origin_count,
|
||||
MPI_Datatype origin_datatype, int target_rank,
|
||||
MPI_Aint target_disp, int target_count,
|
||||
MPI_Datatype target_datatype, MPI_Win win);
|
||||
OMPI_DECLSPEC int PMPI_Get_library_version(char *version, int *resultlen);
|
||||
OMPI_DECLSPEC int PMPI_Get_processor_name(char *name, int *resultlen);
|
||||
OMPI_DECLSPEC int PMPI_Get_version(int *version, int *subversion);
|
||||
OMPI_DECLSPEC int PMPI_Graph_create(MPI_Comm comm_old, int nnodes, int *index,
|
||||
|
@ -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) 2006-2010 Cisco Systems, Inc. All rights reserved.
|
||||
! Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
! $COPYRIGHT$
|
||||
!
|
||||
! Additional copyrights may follow
|
||||
@ -95,6 +95,7 @@
|
||||
integer MPI_MAX_PROCESSOR_NAME
|
||||
integer MPI_MAX_ERROR_STRING
|
||||
integer MPI_MAX_OBJECT_NAME
|
||||
integer MPI_MAX_LIBRARY_VERSION_STRING
|
||||
integer MPI_MAX_INFO_KEY
|
||||
integer MPI_MAX_INFO_VAL
|
||||
integer MPI_MAX_PORT_NAME
|
||||
@ -102,6 +103,7 @@
|
||||
parameter (MPI_MAX_PROCESSOR_NAME=@OPAL_MAX_PROCESSOR_NAME@-1)
|
||||
parameter (MPI_MAX_ERROR_STRING=@OPAL_MAX_ERROR_STRING@-1)
|
||||
parameter (MPI_MAX_OBJECT_NAME=@OPAL_MAX_OBJECT_NAME@-1)
|
||||
parameter (MPI_MAX_LIBRARY_VERSION_STRING=256-1)
|
||||
parameter (MPI_MAX_INFO_KEY=@OPAL_MAX_INFO_KEY@-1)
|
||||
parameter (MPI_MAX_INFO_VAL=@OPAL_MAX_INFO_VAL@-1)
|
||||
parameter (MPI_MAX_PORT_NAME=@OPAL_MAX_PORT_NAME@-1)
|
||||
|
@ -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) 2009-2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -139,6 +139,7 @@ libmpi_c_mpi_la_SOURCES = \
|
||||
get_address.c \
|
||||
get_count.c \
|
||||
get_elements.c \
|
||||
get_library_version.c \
|
||||
get_processor_name.c \
|
||||
get_version.c \
|
||||
graph_create.c \
|
||||
|
125
ompi/mpi/c/get_library_version.c
Normal file
125
ompi/mpi/c/get_library_version.c
Normal file
@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2009 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
#include "ompi_config.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ompi/mpi/c/bindings.h"
|
||||
#include "ompi/runtime/params.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "ompi/errhandler/errhandler.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
||||
#pragma weak MPI_Get_library_version = PMPI_Get_library_version
|
||||
#endif
|
||||
|
||||
#if OMPI_PROFILING_DEFINES
|
||||
#include "ompi/mpi/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
static const char FUNC_NAME[] = "MPI_get_library_version";
|
||||
|
||||
|
||||
int MPI_Get_library_version(char *version, int *resultlen)
|
||||
{
|
||||
int len_left;
|
||||
MPI_Comm null = MPI_COMM_NULL;
|
||||
char *ptr, tmp[MPI_MAX_LIBRARY_VERSION_STRING];
|
||||
|
||||
OPAL_CR_NOOP_PROGRESS();
|
||||
|
||||
if (MPI_PARAM_CHECK) {
|
||||
/* Per MPI-3, this function can be invoked before
|
||||
MPI_INIT, so we don't invoke the normal
|
||||
MPI_ERR_INIT_FINALIZE() macro here */
|
||||
|
||||
if (NULL == version || NULL == resultlen) {
|
||||
/* Note that we have to check and see if we have
|
||||
previously called MPI_INIT or not. If so, use the
|
||||
normal OMPI_ERRHANDLER_INVOKE, because the user may
|
||||
have changed the default errhandler on MPI_COMM_WORLD.
|
||||
If we have not invoked MPI_INIT, then just abort
|
||||
(i.e., use a NULL communicator, which will end up at the
|
||||
default errhandler, which is abort). */
|
||||
|
||||
if (ompi_mpi_initialized && !ompi_mpi_finalized) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
} else {
|
||||
return OMPI_ERRHANDLER_INVOKE(null, MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* First write to a tmp variable so that we can write to *all* the
|
||||
chars (MPI-3 says that we can only write resultlen chars to the
|
||||
output string) */
|
||||
ptr = tmp;
|
||||
len_left = sizeof(tmp);
|
||||
memset(tmp, 0, MPI_MAX_LIBRARY_VERSION_STRING);
|
||||
|
||||
snprintf(tmp, MPI_MAX_LIBRARY_VERSION_STRING, "Open MPI v%d.%d",
|
||||
OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION);
|
||||
ptr += strlen(tmp);
|
||||
len_left -= strlen(tmp);
|
||||
|
||||
if (OMPI_RELEASE_VERSION > 0) {
|
||||
snprintf(ptr, len_left, ".%d", OMPI_RELEASE_VERSION);
|
||||
ptr = tmp + strlen(tmp);
|
||||
len_left = MPI_MAX_LIBRARY_VERSION_STRING - strlen(tmp);
|
||||
}
|
||||
if (NULL != OMPI_GREEK_VERSION && strlen(OMPI_GREEK_VERSION) > 0) {
|
||||
snprintf(ptr, len_left, "%s", OMPI_GREEK_VERSION);
|
||||
ptr = tmp + strlen(tmp);
|
||||
len_left = MPI_MAX_LIBRARY_VERSION_STRING - strlen(tmp);
|
||||
}
|
||||
|
||||
/* Package name */
|
||||
if (NULL != OPAL_PACKAGE_STRING && strlen(OPAL_PACKAGE_STRING) > 0) {
|
||||
snprintf(ptr, len_left, ", package: %s", OPAL_PACKAGE_STRING);
|
||||
ptr = tmp + strlen(tmp);
|
||||
len_left = MPI_MAX_LIBRARY_VERSION_STRING - strlen(tmp);
|
||||
}
|
||||
|
||||
/* Ident string */
|
||||
if (NULL != OMPI_IDENT_STRING && strlen(OMPI_IDENT_STRING) > 0) {
|
||||
snprintf(ptr, len_left, ", ident: %s", OMPI_IDENT_STRING);
|
||||
ptr = tmp + strlen(tmp);
|
||||
len_left = MPI_MAX_LIBRARY_VERSION_STRING - strlen(tmp);
|
||||
}
|
||||
|
||||
/* Repository revision */
|
||||
if (OMPI_WANT_REPO_REV &&
|
||||
NULL != OMPI_REPO_REV && strlen(OMPI_REPO_REV) > 0) {
|
||||
snprintf(ptr, len_left, ", repo rev: %s", OMPI_REPO_REV);
|
||||
ptr = tmp + strlen(tmp);
|
||||
len_left = MPI_MAX_LIBRARY_VERSION_STRING - strlen(tmp);
|
||||
}
|
||||
|
||||
/* Release date */
|
||||
if (NULL != OMPI_RELEASE_DATE && strlen(OMPI_RELEASE_DATE) > 0) {
|
||||
snprintf(ptr, len_left, ", %s", OMPI_RELEASE_DATE);
|
||||
ptr = tmp + strlen(tmp);
|
||||
len_left = MPI_MAX_LIBRARY_VERSION_STRING - strlen(tmp);
|
||||
}
|
||||
|
||||
memcpy(version, tmp, strlen(tmp) + 1);
|
||||
*resultlen = strlen(tmp) + 1;
|
||||
|
||||
return MPI_SUCCESS;
|
||||
}
|
@ -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) 2009-2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -121,6 +121,7 @@ nodist_libmpi_c_pmpi_la_SOURCES = \
|
||||
pget_address.c \
|
||||
pget_count.c \
|
||||
pget_elements.c \
|
||||
pget_library_version.c \
|
||||
pget_processor_name.c \
|
||||
pget_version.c \
|
||||
pgraph_create.c \
|
||||
|
@ -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) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -165,6 +165,7 @@
|
||||
#define MPI_Get_count PMPI_Get_count
|
||||
#define MPI_Get_elements PMPI_Get_elements
|
||||
#define MPI_Get PMPI_Get
|
||||
#define MPI_Get_library_version PMPI_Get_library_version
|
||||
#define MPI_Get_processor_name PMPI_Get_processor_name
|
||||
#define MPI_Get_version PMPI_Get_version
|
||||
#define MPI_Graph_create PMPI_Graph_create
|
||||
|
@ -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-2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -155,6 +155,7 @@ libmpi_f77_la_SOURCES += \
|
||||
get_address_f.c \
|
||||
get_count_f.c \
|
||||
get_elements_f.c \
|
||||
get_library_version_f.c \
|
||||
get_processor_name_f.c \
|
||||
get_version_f.c \
|
||||
graph_create_f.c \
|
||||
|
76
ompi/mpi/f77/get_library_version_f.c
Normal file
76
ompi/mpi/f77/get_library_version_f.c
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/f77/bindings.h"
|
||||
#include "ompi/mpi/f77/f77_strings.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_GET_LIBRARY_VERSION = mpi_get_library_version_f
|
||||
#pragma weak pmpi_get_library_version = mpi_get_library_version_f
|
||||
#pragma weak pmpi_get_library_version_ = mpi_get_library_version_f
|
||||
#pragma weak pmpi_get_library_version__ = mpi_get_library_version_f
|
||||
#elif OMPI_PROFILE_LAYER
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPI_GET_LIBRARY_VERSION,
|
||||
pmpi_get_library_version,
|
||||
pmpi_get_library_version_,
|
||||
pmpi_get_library_version__,
|
||||
pmpi_get_library_version_f,
|
||||
(char *version, MPI_Fint *resultlen, MPI_Fint *ierr, MPI_Fint version_len),
|
||||
(version, resultlen, ierr, version_len) )
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPI_GET_LIBRARY_VERSION = mpi_get_library_version_f
|
||||
#pragma weak mpi_get_library_version = mpi_get_library_version_f
|
||||
#pragma weak mpi_get_library_version_ = mpi_get_library_version_f
|
||||
#pragma weak mpi_get_library_version__ = mpi_get_library_version_f
|
||||
#endif
|
||||
|
||||
#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER
|
||||
OMPI_GENERATE_F77_BINDINGS (MPI_GET_LIBRARY_VERSION,
|
||||
mpi_get_library_version,
|
||||
mpi_get_library_version_,
|
||||
mpi_get_library_version__,
|
||||
mpi_get_library_version_f,
|
||||
(char *version, MPI_Fint *resultlen, MPI_Fint *ierr, MPI_Fint version_len),
|
||||
(version, resultlen, ierr, version_len) )
|
||||
#endif
|
||||
|
||||
|
||||
#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS
|
||||
#include "ompi/mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_get_library_version_f(char *version, MPI_Fint *resultlen,
|
||||
MPI_Fint *ierr, MPI_Fint version_len)
|
||||
{
|
||||
int err, c_resultlen;
|
||||
char c_version[MPI_MAX_LIBRARY_VERSION_STRING];
|
||||
|
||||
err = MPI_Get_library_version(c_version, &c_resultlen);
|
||||
if (MPI_SUCCESS == err) {
|
||||
ompi_fortran_string_c2f(c_version, version,
|
||||
OMPI_FINT_2_INT(version_len));
|
||||
*resultlen = OMPI_INT_2_FINT(c_resultlen);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
|
||||
} else {
|
||||
*ierr = OMPI_INT_2_FINT(err);
|
||||
}
|
||||
}
|
@ -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) 2009-2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -120,6 +120,7 @@ nodist_libmpi_f77_pmpi_la_SOURCES = \
|
||||
pget_address_f.c \
|
||||
pget_count_f.c \
|
||||
pget_elements_f.c \
|
||||
pget_library_version_f.c \
|
||||
pget_processor_name_f.c \
|
||||
pget_version_f.c \
|
||||
pgraph_create_f.c \
|
||||
|
@ -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-2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -198,6 +198,7 @@ PN(void, mpi_get_address, MPI_GET_ADDRESS, (char *location, MPI_Aint *address, M
|
||||
PN(void, mpi_get_count, MPI_GET_COUNT, (MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI_Fint *ierr));
|
||||
PN(void, mpi_get_elements, MPI_GET_ELEMENTS, (MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI_Fint *ierr));
|
||||
PN(void, mpi_get, MPI_GET, (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *ierr));
|
||||
PN(void, mpi_get_library_version, MPI_GET_LIBRARY_VERSION, (char *version, MPI_Fint *resultlen, MPI_Fint *ierr, MPI_Fint version_len));
|
||||
PN(void, mpi_get_processor_name, MPI_GET_PROCESSOR_NAME, (char *name, MPI_Fint *resultlen, MPI_Fint *ierr, int name_len));
|
||||
PN(void, mpi_get_version, MPI_GET_VERSION, (MPI_Fint *version, MPI_Fint *subversion, MPI_Fint *ierr));
|
||||
PN(void, mpi_graph_create, MPI_GRAPH_CREATE, (MPI_Fint *comm_old, MPI_Fint *nnodes, MPI_Fint *index, MPI_Fint *edges, ompi_fortran_logical_t *reorder, MPI_Fint *comm_graph, MPI_Fint *ierr));
|
||||
|
@ -5,7 +5,7 @@
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -9553,3 +9553,27 @@ start MPI_Comm_spawn_multiple small
|
||||
output_284 MPI_Comm_spawn_multipleA "character(len=*), dimension(count,*)"
|
||||
output_284 MPI_Comm_spawn_multipleN "double precision"
|
||||
end MPI_Comm_spawn_multiple
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
output_285() {
|
||||
if test "$output" = "0"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
procedure=$1
|
||||
cat <<EOF
|
||||
|
||||
subroutine ${procedure}(version, resultlen, ierr)
|
||||
character(len=*), intent(out) :: version
|
||||
integer, intent(out) :: resultlen
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine ${procedure}
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
start MPI_Get_library_version small
|
||||
output_285 MPI_Get_library_version
|
||||
end MPI_Get_library_version
|
||||
|
||||
|
84
ompi/mpi/man/man3/MPI_Get_library_version.3in
Normal file
84
ompi/mpi/man/man3/MPI_Get_library_version.3in
Normal file
@ -0,0 +1,84 @@
|
||||
.\" Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
|
||||
.\" Copyright 2006-2008 Sun Microsystems, Inc.
|
||||
.\" Copyright (c) 1996 Thinking Machines Corporation
|
||||
.\" $COPYRIGHT$
|
||||
.TH MPI_Get_library_version 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
|
||||
.SH NAME
|
||||
\fBMPI_Get_library_version\fP \- Returns a string of the current Open MPI version
|
||||
|
||||
.SH SYNTAX
|
||||
.ft R
|
||||
.SH C Syntax
|
||||
.nf
|
||||
#include <mpi.h>
|
||||
int MPI_Get_library_version(char \fI*version\fP, int \fI*resultlen\fP)
|
||||
|
||||
.fi
|
||||
.SH Fortran Syntax
|
||||
.nf
|
||||
INCLUDE 'mpif.h'
|
||||
MPI_GET_LIBRARY_VERSION(\fIVERSION\fP, \fIRESULTLEN\fP, \fIIERROR\fP)
|
||||
CHARACTER*(*) \fINAME\fP
|
||||
INTEGER \fIRESULTLEN\fP, \fIIERROR\fP
|
||||
|
||||
.fi
|
||||
.SH C++ Syntax
|
||||
.nf
|
||||
There is no C++ binding for this function.
|
||||
|
||||
.fi
|
||||
.SH OUTPUT PARAMETERS
|
||||
.ft R
|
||||
.TP 1i
|
||||
version
|
||||
A string containing the Open MPI version (string).
|
||||
|
||||
.ft R
|
||||
.TP 1i
|
||||
resultlen
|
||||
Length (in characters) of result returned in \fIversion\fP (integer).
|
||||
|
||||
.ft R
|
||||
.TP 1i
|
||||
IERROR
|
||||
Fortran only: Error status (integer).
|
||||
|
||||
.SH DESCRIPTION
|
||||
.ft R
|
||||
This routine returns a string representing the version of the MPI
|
||||
library. The version argument is a character string for maximum
|
||||
flexibility.
|
||||
.sp
|
||||
The number of characters actually written is returned in the output
|
||||
argument, \fIresultlen\fP. In C, a '\\0' character is additionally
|
||||
stored at \fIversion[resultlen]\fP. The \fIresultlen\fP cannot be
|
||||
larger than (MPI_MAX_LIBRARY_VERSION_STRING - 1). In Fortran, version
|
||||
is padded on the right with blank characters. The \fIresultlen\fP
|
||||
cannot be larger than MPI_MAX_LIBRARY_VERSION_STRING.
|
||||
|
||||
.SH NOTE
|
||||
.ft R
|
||||
The \fIversion\fP string that is passed must be at least
|
||||
MPI_MAX_LIBRARY_VERSION_STRING characters long.
|
||||
.sp
|
||||
MPI_Get_library_version is one of the few functions that can be called
|
||||
before MPI_Init and after MPI_Finalize.
|
||||
.sp
|
||||
MPI_Get_library_version is an MPI-3 function and has no C++ binding.
|
||||
|
||||
.SH ERRORS
|
||||
Almost all MPI routines return an error value; C routines as the value
|
||||
of the function and Fortran routines in the last argument.
|
||||
.sp
|
||||
Before the error value is returned, the current MPI error handler is
|
||||
called. By default, this error handler aborts the MPI job, except for
|
||||
I/O function errors. The error handler may be changed with
|
||||
MPI_Comm_set_errhandler; the predefined error handler
|
||||
MPI_ERRORS_RETURN may be used to cause error values to be
|
||||
returned. Note that MPI does not guarantee that an MPI program can
|
||||
continue past an error.
|
||||
|
||||
.SH SEE ALSO
|
||||
.ft R
|
||||
.nf
|
||||
MPI_Get_version
|
@ -1,5 +1,5 @@
|
||||
# -*- makefile -*-
|
||||
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
@ -149,6 +149,7 @@ mpi_api_man_pages = \
|
||||
mpi/man/man3/MPI_Get_address.3 \
|
||||
mpi/man/man3/MPI_Get_count.3 \
|
||||
mpi/man/man3/MPI_Get_elements.3 \
|
||||
mpi/man/man3/MPI_Get_library_version.3 \
|
||||
mpi/man/man3/MPI_Get_processor_name.3 \
|
||||
mpi/man/man3/MPI_Get_version.3 \
|
||||
mpi/man/man3/MPI_Graph_create.3 \
|
||||
|
Loading…
Reference in New Issue
Block a user