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