bug when repeatedly opening/closing datasets

Robert Latham robl at mcs.anl.gov
Thu Aug 16 14:47:38 CDT 2007


Hi everyone

Annette Koontz found a bug in parallle-netcdf where if a process
opened and closed files repeatedly, the process would eventually get
NC_ENFILE (too many open files, even though the process has been
closing file).

Now, this is a pretty old bug, and nobody's complained about it too
much on the mailing list, but if someone runs into that problem and
wants a fix before the next release goes out, this patch might do the
trick:

Index: src/lib/mpincio.c
===================================================================
--- src/lib/mpincio.c   (revision 562)
+++ src/lib/mpincio.c   (working copy)
@@ -239,6 +239,7 @@
       return NC_EFILE;
     }
   }
+  IDalloc[*((int *)&nciop->fd)] = 0;
 
   if (doUnlink) {
     mpireturn = MPI_File_delete((char *)nciop->path, nciop->mpiinfo);

-- 
Rob Latham
Mathematics and Computer Science Division    A215 0178 EA2D B059 8CDF
Argonne National Lab, IL USA                 B29D F333 664A 4280 315B




More information about the parallel-netcdf mailing list