2004-01-25 22:07:54 +00:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "lam_config.h"
|
|
|
|
|
|
|
|
#include "mpi.h"
|
|
|
|
#include "mpi/interface/c/bindings.h"
|
2004-02-10 22:15:55 +00:00
|
|
|
#include "lam/lfc/lam_list.h"
|
2004-02-01 22:28:20 +00:00
|
|
|
#include "mpi/info/info.h"
|
2004-01-25 22:07:54 +00:00
|
|
|
|
|
|
|
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
|
|
|
#pragma weak MPI_Info_get_nkeys = PMPI_Info_get_nkeys
|
|
|
|
#endif
|
|
|
|
|
2004-02-01 22:28:20 +00:00
|
|
|
/**
|
|
|
|
* MPI_Info_get_nkeys - Returns the number of keys defined on an
|
|
|
|
* 'MPI_Info' object
|
|
|
|
*
|
|
|
|
* @param info info object (handle)
|
|
|
|
* @param nkeys number of keys defined on 'info' (integer)
|
|
|
|
*
|
|
|
|
* @retval MPI_SUCCESS
|
|
|
|
* @retval MPI_ERR_ARG
|
|
|
|
*
|
|
|
|
* This function returns the number of elements in the list
|
|
|
|
* containing the key-value pairs
|
|
|
|
*/
|
2004-01-25 22:07:54 +00:00
|
|
|
int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) {
|
2004-02-11 15:23:43 +00:00
|
|
|
int err;
|
2004-02-03 22:34:01 +00:00
|
|
|
|
|
|
|
if (NULL == info){
|
|
|
|
printf ("Invalid MPI_Info handle passed\n");
|
|
|
|
return MPI_ERR_ARG;
|
|
|
|
}
|
2004-02-11 15:23:43 +00:00
|
|
|
err = lam_info_get_nkeys(info, nkeys);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* check if there are any errors. There does not seem to be any
|
|
|
|
* error possible in this. But have to look at it again
|
|
|
|
*/
|
2004-02-03 22:34:01 +00:00
|
|
|
|
2004-01-25 22:07:54 +00:00
|
|
|
return MPI_SUCCESS;
|
|
|
|
}
|