diff --git a/src/drivers/common/mem_alloc.c b/src/drivers/common/mem_alloc.c index 7932d76a9..43dfe5788 100644 --- a/src/drivers/common/mem_alloc.c +++ b/src/drivers/common/mem_alloc.c @@ -280,7 +280,7 @@ void NCI_Free_fn(void *ptr, #ifdef PNC_MALLOC_TRACE ncmpii_del_mem_entry(ptr); #endif - free_counter++; + // free_counter++; free(ptr); } diff --git a/src/drivers/include/common.h b/src/drivers/include/common.h index f141cca78..7ab9311b0 100644 --- a/src/drivers/include/common.h +++ b/src/drivers/include/common.h @@ -53,7 +53,7 @@ (xtype == NC_UBYTE && itype == MPI_UNSIGNED_CHAR)) ? 0 : 1 #endif -extern int free_counter; +// extern int free_counter; extern void * NCI_Malloc_fn(size_t size, const int lineno, const char *func, diff --git a/src/drivers/ncmpio/ncmpio_close.c b/src/drivers/ncmpio/ncmpio_close.c index b562650f4..87fb55032 100644 --- a/src/drivers/ncmpio/ncmpio_close.c +++ b/src/drivers/ncmpio/ncmpio_close.c @@ -32,7 +32,7 @@ #include "ncmpio_subfile.h" #endif -int free_counter = 0; +// int free_counter = 0; /*----< ncmpio_free_NC() >----------------------------------------------------*/ void @@ -47,18 +47,18 @@ ncmpio_free_NC(NC *ncp) ncmpio_free_NC_dimarray(&ncp->dims); // if (rank == 0) // printf("ncmpio_free_NC free() count after ncmpio_free_NC_dimarray: %d\n", free_counter); - double dim_free_time = MPI_Wtime() - start_time; + // double dim_free_time = MPI_Wtime() - start_time; ncmpio_free_NC_attrarray(&ncp->attrs); // if (rank == 0) // printf("ncmpio_free_NC free() count after ncmpio_free_NC_attarray: %d\n", free_counter); - start_time = MPI_Wtime(); + // start_time = MPI_Wtime(); ncmpio_free_NC_vararray(&ncp->vars); // if (rank == 0) // printf("ncmpio_free_NC free() count after ncmpio_free_NC_vararray: %d\n", free_counter); - double var_free_time = MPI_Wtime() - start_time; - if (rank == 0) - printf("dim_free_time: %f, var_free_time: %f\n", dim_free_time, var_free_time); + // double var_free_time = MPI_Wtime() - start_time; + // if (rank == 0) + // printf("dim_free_time: %f, var_free_time: %f\n", dim_free_time, var_free_time); /* The only case that ncp->mpiinfo is MPI_INFO_NULL is when exiting endef * from a redef. All other cases reaching here are from ncmpi_close, in * which case ncp->mpiinfo is never MPI_INFO_NULL. @@ -231,16 +231,16 @@ ncmpio_close(void *ncdp) } /* free up space occupied by the header metadata */ - double free_time_start = MPI_Wtime(); - free_counter = 0; + // double free_time_start = MPI_Wtime(); + // free_counter = 0; ncmpio_free_NC(ncp); - double free_time = MPI_Wtime() - free_time_start; - int rank; - MPI_Comm_rank(ncp->comm, &rank); - if (rank == 0){ - printf("ncmpio_free_NC time: %f\n", free_time); - printf("ncmpio_free_NC free() count: %d\n", free_counter); - } + // double free_time = MPI_Wtime() - free_time_start; + // int rank; + // MPI_Comm_rank(ncp->comm, &rank); + // // if (rank == 0){ + // printf("ncmpio_free_NC time: %f\n", free_time); + // printf("ncmpio_free_NC free() count: %d\n", free_counter); + // } return status; } diff --git a/src/drivers/ncmpio/ncmpio_dim.c b/src/drivers/ncmpio/ncmpio_dim.c index eb4e965b6..dc9b1510b 100644 --- a/src/drivers/ncmpio/ncmpio_dim.c +++ b/src/drivers/ncmpio/ncmpio_dim.c @@ -120,15 +120,15 @@ ncmpio_free_NC_dimarray(NC_dimarray *ncap) int i; assert(ncap != NULL); - double start_time; - double free_dim_array_time; - double free_dim_extra_time; - double free_dim_hash_time; + // double start_time; + // double free_dim_array_time; + // double free_dim_extra_time; + // double free_dim_hash_time; if (ncap->value != NULL) { /* when error is detected reading NC_DIMENSION tag, ncap->ndefined can * be > 0 and ncap->value is still NULL */ - start_time = MPI_Wtime(); + // start_time = MPI_Wtime(); for (i=0; indefined; i++) { /* when error is detected reading dimension i, ncap->value[i] can * still be NULL @@ -139,19 +139,19 @@ ncmpio_free_NC_dimarray(NC_dimarray *ncap) } NCI_Free(ncap->value); - free_dim_array_time = MPI_Wtime() - start_time; - start_time = MPI_Wtime(); + // free_dim_array_time = MPI_Wtime() - start_time; + // start_time = MPI_Wtime(); NCI_Free(ncap->localids); NCI_Free(ncap->indexes); ncap->value = NULL; ncap->localids = NULL; ncap->indexes = NULL; - free_dim_extra_time = MPI_Wtime() - start_time; + // free_dim_extra_time = MPI_Wtime() - start_time; } ncap->ndefined = 0; ncap->nread = 0; - start_time = MPI_Wtime(); + // start_time = MPI_Wtime(); // printf("dimarray ncap->hash_size: %d\n", ncap->hash_size); #ifndef SEARCH_NAME_LINEARLY /* free space allocated for dim name lookup table */ @@ -162,8 +162,8 @@ ncmpio_free_NC_dimarray(NC_dimarray *ncap) ncap->hash_size = 0; } #endif - free_dim_hash_time = MPI_Wtime() - start_time; - printf("free_dim_array_time: %f, free_dim_extra_time: %f, free_dim_hash_time: %f\n", free_dim_array_time, free_dim_extra_time, free_dim_hash_time); + // free_dim_hash_time = MPI_Wtime() - start_time; + // printf("free_dim_array_time: %f, free_dim_extra_time: %f, free_dim_hash_time: %f\n", free_dim_array_time, free_dim_extra_time, free_dim_hash_time); } /*----< ncmpio_dup_NC_dimarray() >-------------------------------------------*/ diff --git a/src/drivers/ncmpio/ncmpio_var.c b/src/drivers/ncmpio/ncmpio_var.c index 78ddca109..362161c24 100644 --- a/src/drivers/ncmpio/ncmpio_var.c +++ b/src/drivers/ncmpio/ncmpio_var.c @@ -40,7 +40,7 @@ void ncmpio_free_NC_var(NC_var *varp) { if (varp == NULL) return; - int old_free_counter = free_counter; + // int old_free_counter = free_counter; ncmpio_free_NC_attrarray(&varp->attrs); // if (first_var) @@ -141,10 +141,10 @@ ncmpio_free_NC_vararray(NC_vararray *ncap) assert(ncap != NULL); // printf("var ncap->ndefined: %d\n", ncap->ndefined); - int old_free_counter = free_counter; + // int old_free_counter = free_counter; // first_var = 1; - double start_time, free_var_array_time, free_var_extra_time, free_var_hash_time; - start_time = MPI_Wtime(); + // double start_time, free_var_array_time, free_var_extra_time, free_var_hash_time; + // start_time = MPI_Wtime(); if (ncap->value != NULL) { /* when error is detected reading NC_VARIABLE tag, ncap->ndefined can * be > 0 and ncap->value is still NULL @@ -159,20 +159,20 @@ ncmpio_free_NC_vararray(NC_vararray *ncap) } NCI_Free(ncap->value); - free_var_array_time = MPI_Wtime() - start_time; - start_time = MPI_Wtime(); + // free_var_array_time = MPI_Wtime() - start_time; + // start_time = MPI_Wtime(); NCI_Free(ncap->localids); NCI_Free(ncap->indexes); ncap->localids = NULL; ncap->indexes = NULL; ncap->value = NULL; - free_var_extra_time = MPI_Wtime() - start_time; + // free_var_extra_time = MPI_Wtime() - start_time; // printf("free_var_array_time: %f, free_var_extra_time: %f\n", free_var_array_time, free_var_extra_time); } ncap->ndefined = 0; ncap->nread = 0; // printf("free_counter after free var array: %d\n", free_counter); - start_time = MPI_Wtime(); + // start_time = MPI_Wtime(); // printf("vararray ncap->hash_size: %d\n", ncap->hash_size); #ifndef SEARCH_NAME_LINEARLY /* free space allocated for var name lookup table */ @@ -183,8 +183,8 @@ ncmpio_free_NC_vararray(NC_vararray *ncap) ncap->hash_size = 0; } #endif - free_var_hash_time = MPI_Wtime() - start_time; - printf("free_var_array_time: %f, free_var_extra_time: %f, free_var_hash_time: %f\n", free_var_array_time, free_var_extra_time, free_var_hash_time); + // free_var_hash_time = MPI_Wtime() - start_time; + // printf("free_var_array_time: %f, free_var_extra_time: %f, free_var_hash_time: %f\n", free_var_array_time, free_var_extra_time, free_var_hash_time); } /*----< ncmpio_dup_NC_vararray() >-------------------------------------------*/