00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "mpioimpl.h"
00010
00011 #ifdef HAVE_WEAK_SYMBOLS
00012
00013 #if defined(HAVE_PRAGMA_WEAK)
00014 #pragma weak MPI_Info_free = PMPI_Info_free
00015 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
00016 #pragma _HP_SECONDARY_DEF PMPI_Info_free MPI_Info_free
00017 #elif defined(HAVE_PRAGMA_CRI_DUP)
00018 #pragma _CRI duplicate MPI_Info_free as PMPI_Info_free
00019
00020 #endif
00021
00022
00023 #define MPIO_BUILD_PROFILING
00024 #include "mpioprof.h"
00025 #endif
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 int MPI_Info_free(MPI_Info *info)
00036 {
00037 MPI_Info curr, next;
00038
00039 if ((*info <= (MPI_Info) 0) || ((*info)->cookie != MPIR_INFO_COOKIE)) {
00040 FPRINTF(stderr, "MPI_Info_free: Invalid info object\n");
00041 MPI_Abort(MPI_COMM_WORLD, 1);
00042 }
00043
00044 curr = (*info)->next;
00045 ADIOI_Free(*info);
00046 *info = MPI_INFO_NULL;
00047
00048 while (curr) {
00049 next = curr->next;
00050 free(curr->key);
00051 free(curr->value);
00052 ADIOI_Free(curr);
00053 curr = next;
00054 }
00055
00056 return MPI_SUCCESS;
00057 }