Add MPI_Get_library_version to STUBS library

This commit is contained in:
Stan Moore 2019-07-26 11:23:46 -06:00
parent 17d6b317a7
commit 0ba854b4ab
2 changed files with 19 additions and 0 deletions

View File

@ -76,6 +76,23 @@ int MPI_Finalized(int *flag)
/* ---------------------------------------------------------------------- */
/* return "LAMMPS MPI STUBS" as name of the library */
int MPI_Get_library_version(char *verison, int *resultlen)
{
const char string[] = "LAMMPS MPI STUBS";
int len;
if (!version || !resultlen) return MPI_ERR_ARG;
len = strlen(string);
memcpy(version,string,len+1);
*resultlen = len;
return MPI_SUCCESS;
}
/* ---------------------------------------------------------------------- */
/* return "localhost" as name of the processor */
int MPI_Get_processor_name(char *name, int *resultlen)

View File

@ -63,6 +63,7 @@ extern "C" {
#define MPI_IN_PLACE NULL
#define MPI_MAX_PROCESSOR_NAME 128
#define MPI_MAX_LIBRARY_VERSION_STRING 128
typedef void MPI_User_function(void *invec, void *inoutvec,
int *len, MPI_Datatype *datatype);
@ -79,6 +80,7 @@ typedef struct _MPI_Status MPI_Status;
int MPI_Init(int *argc, char ***argv);
int MPI_Initialized(int *flag);
int MPI_Finalized(int *flag);
int MPI_Get_library_version(char *version, int *resultlen);
int MPI_Get_processor_name(char *name, int *resultlen);
int MPI_Get_version(int *major, int *minor);