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.
> Hi, > > I am running mom4p1, which writes netcdf-output in parallel. Each > MPI-taks writes its own file. Howdy Martin! Do I understand correctly that netCDF installed correctly and passed make check, and the problems you are having are in a user program? Also, does your application work when run on a single processor? > > It appears, that in some output file the header information and possibly > some data blocks are filled with (nul). This would occur if different processes were updating the netCDF file metadata at the same time. You need to be sure that your processes stop fiddling with netCDF metadata before different processes start writing to the file. If enddef is called before any data operations are done in parallel, and if there are no unlimited dimensions in the file, then parallel writes should work. (This is the same as you could achieve with fopen calls, which is exactly what happens when you use sequential netCDF.) If you cannot manage to get this working with sequential netCDF, or if you want better parallel I/O support, there are two alternatives: You may want to use pNetCDF, a parallel version of netCDF, not written at Unidata, but well-supported and known to work well. See http://www-unix.mcs.anl.gov/parallel-netcdf/. This unfortunately would require some code rewriting. You may instead wish to use netcdf-4/HDF5 files. This would mean installing HDF5-1.8.1 and netCDF-4.0, and creating HDF5 files with the netCDF API. This would require almost no code changes in your interactions with netCDF, but you may wish to take advantage of some features, like the ability to switch from independant to collective operations. Please let me know if this doesn't help. Ed Ticket Details =================== Ticket ID: SKS-197537 Department: Support netCDF Priority: Normal Status: Closed