This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Charles, Testing your program on Linux with the valgrind tool using the latest netCDF snapshot linked to HDF5 1.8.3-snap2 shows that when it's running it seems to consume more memory with each iteration, but that all the memory gets freed. With 2 iterations, valgrind reports: ==435== malloc/free: in use at exit: 0 bytes in 0 blocks. ==435== malloc/free: 156,398 allocs, 156,398 frees, 38,083,416 bytes allocated. ==435== For counts of detected errors, rerun with: -v ==435== All heap blocks were freed -- no leaks are possible. With 4 iterations, the output from valgrind is: ==486== malloc/free: in use at exit: 0 bytes in 0 blocks. ==486== malloc/free: 310,335 allocs, 310,335 frees, 75,860,672 bytes allocated. ==486== For counts of detected errors, rerun with: -v ==486== All heap blocks were freed -- no leaks are possible. So at this point, I think it's an HDF5 problem, that every time you deflate a variable it allocates more memory without freeing the memory previously allocated until everything is freed at exit. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: AIX-376820 Department: Support netCDF Priority: Normal Status: Closed