Unchecked memory allocation and potential performance problem

William Gropp gropp at mcs.anl.gov
Tue Dec 5 08:57:26 CST 2006


In mpincio.c, there's this code

   const int bufsize = 4096;
   ...
   void *buf = malloc(bufsize);

buf isn't checked for null before it is used.  Also, the 4096 is used  
as the buffer size in MPI_File_read_at and similar calls (this seems  
rather small).  Should this buffer size be negotiated? (I'm wondering  
if this might be a source of the slowdown that we're seeing, as this  
code can be invoked during a close).

Bill




More information about the parallel-netcdf mailing list