added implementation of the following functions.
This commit was SVN r1403.
Этот коммит содержится в:
родитель
6dd383b884
Коммит
66d555b070
@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "mpi/c/bindings.h"
|
#include "mpi/c/bindings.h"
|
||||||
|
#include "runtime/runtime.h"
|
||||||
|
#include "errhandler/errclass.h"
|
||||||
|
#include "communicator/communicator.h"
|
||||||
|
|
||||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
||||||
#pragma weak MPI_Add_error_class = PMPI_Add_error_class
|
#pragma weak MPI_Add_error_class = PMPI_Add_error_class
|
||||||
@ -15,7 +18,23 @@
|
|||||||
#include "mpi/c/profile/defines.h"
|
#include "mpi/c/profile/defines.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int MPI_Add_error_class(int *errorclass) {
|
int MPI_Add_error_class(int *errorclass)
|
||||||
return MPI_SUCCESS;
|
{
|
||||||
|
int class;
|
||||||
|
|
||||||
|
if ( MPI_PARAM_CHECK ) {
|
||||||
|
if ( ompi_mpi_finalized )
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
||||||
|
"MPI_Add_error_class");
|
||||||
|
}
|
||||||
|
|
||||||
|
class = ompi_errclass_add();
|
||||||
|
if ( 0 > class ) {
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
||||||
|
"MPI_Add_error_class");
|
||||||
|
}
|
||||||
|
|
||||||
|
*errorclass = class;
|
||||||
|
return MPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
|
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "mpi/c/bindings.h"
|
#include "mpi/c/bindings.h"
|
||||||
|
#include "runtime/runtime.h"
|
||||||
|
#include "errhandler/errcode.h"
|
||||||
|
#include "errhandler/errclass.h"
|
||||||
|
#include "communicator/communicator.h"
|
||||||
|
|
||||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
||||||
#pragma weak MPI_Add_error_code = PMPI_Add_error_code
|
#pragma weak MPI_Add_error_code = PMPI_Add_error_code
|
||||||
@ -15,6 +19,26 @@
|
|||||||
#include "mpi/c/profile/defines.h"
|
#include "mpi/c/profile/defines.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int MPI_Add_error_code(int errorclass, int *errorcode){
|
int MPI_Add_error_code(int errorclass, int *errorcode)
|
||||||
return MPI_SUCCESS;
|
{
|
||||||
|
int code;
|
||||||
|
|
||||||
|
if ( MPI_PARAM_CHECK ) {
|
||||||
|
if ( ompi_mpi_finalized)
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
||||||
|
"MPI_Add_error_code");
|
||||||
|
if ( ompi_errclass_is_invalid(errorclass) )
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
|
||||||
|
"MPI_Add_error_code");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
code = ompi_mpi_errcode_add ( errorclass);
|
||||||
|
if ( 0 > code ) {
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
||||||
|
"MPI_Add_error_code");
|
||||||
|
}
|
||||||
|
|
||||||
|
*errorcode = code;
|
||||||
|
return MPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,13 @@
|
|||||||
* * */
|
* * */
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "mpi/c/bindings.h"
|
#include "mpi/c/bindings.h"
|
||||||
|
#include "runtime/runtime.h"
|
||||||
|
#include "errhandler/errcode.h"
|
||||||
|
#include "communicator/communicator.h"
|
||||||
|
|
||||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
||||||
#pragma weak MPI_Add_error_string = PMPI_Add_error_string
|
#pragma weak MPI_Add_error_string = PMPI_Add_error_string
|
||||||
@ -15,6 +19,24 @@
|
|||||||
#include "mpi/c/profile/defines.h"
|
#include "mpi/c/profile/defines.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int MPI_Add_error_string(int errorcode, char *string){
|
int MPI_Add_error_string(int errorcode, char *string)
|
||||||
return MPI_SUCCESS;
|
{
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
if ( MPI_PARAM_CHECK ) {
|
||||||
|
if ( ompi_mpi_finalized)
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
||||||
|
"MPI_Add_error_string");
|
||||||
|
if ( ompi_mpi_errcode_is_invalid(errorcode) )
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
|
||||||
|
"MPI_Add_error_string");
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = ompi_mpi_errcode_add_string (errorcode, string, strlen(string)+1);
|
||||||
|
if ( OMPI_SUCCESS != rc ) {
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
||||||
|
"MPI_Add_error_string");
|
||||||
|
}
|
||||||
|
|
||||||
|
return MPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "mpi/c/bindings.h"
|
#include "mpi/c/bindings.h"
|
||||||
|
#include "runtime/runtime.h"
|
||||||
|
#include "errhandler/errcode.h"
|
||||||
|
#include "communicator/communicator.h"
|
||||||
|
|
||||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
||||||
#pragma weak MPI_Error_class = PMPI_Error_class
|
#pragma weak MPI_Error_class = PMPI_Error_class
|
||||||
@ -15,6 +18,19 @@
|
|||||||
#include "mpi/c/profile/defines.h"
|
#include "mpi/c/profile/defines.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int MPI_Error_class(int errorcode, int *errorclass) {
|
int MPI_Error_class(int errorcode, int *errorclass)
|
||||||
|
{
|
||||||
|
|
||||||
|
if ( MPI_PARAM_CHECK ) {
|
||||||
|
if ( ompi_mpi_finalized )
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
||||||
|
"MPI_Error_class");
|
||||||
|
if ( ompi_mpi_errcode_is_invalid(errorcode))
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
|
||||||
|
"MPI_Error_class");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
*errorclass = ompi_mpi_errcode_get_class(errorcode);
|
||||||
return MPI_SUCCESS;
|
return MPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
#include <string.h>
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "mpi/c/bindings.h"
|
#include "mpi/c/bindings.h"
|
||||||
|
#include "runtime/runtime.h"
|
||||||
|
#include "errhandler/errcode.h"
|
||||||
|
#include "communicator/communicator.h"
|
||||||
|
|
||||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
||||||
#pragma weak MPI_Error_string = PMPI_Error_string
|
#pragma weak MPI_Error_string = PMPI_Error_string
|
||||||
@ -15,6 +18,22 @@
|
|||||||
#include "mpi/c/profile/defines.h"
|
#include "mpi/c/profile/defines.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int MPI_Error_string(int errorcode, char *string, int *resultlen) {
|
int MPI_Error_string(int errorcode, char *string, int *resultlen)
|
||||||
|
{
|
||||||
|
char *tmpstring;
|
||||||
|
|
||||||
|
if ( MPI_PARAM_CHECK ) {
|
||||||
|
if ( ompi_mpi_finalized )
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
|
||||||
|
"MPI_Error_string");
|
||||||
|
if ( ompi_mpi_errcode_is_invalid(errorcode))
|
||||||
|
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
|
||||||
|
"MPI_Error_string");
|
||||||
|
}
|
||||||
|
|
||||||
|
tmpstring = ompi_mpi_errcode_get_string (errorcode);
|
||||||
|
strcpy(string, tmpstring);
|
||||||
|
*resultlen = strlen(string);
|
||||||
|
|
||||||
return MPI_SUCCESS;
|
return MPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user