XIOS: Error due to too many variables in an output file

De LMDZPedia
Aller à : navigation, rechercher

The Symptom

If LMDZ (with XIOS) crashes with the following error message:

terminate called after throwing an instance of 'xios::CNetCdfException'
 what():  Error when calling function nc_enddef(ncId)
NetCDF: HDF error
Unable to end define mode of this file, given its id: 65536
Program received signal SIGABRT: Process abort signal.

This is most likely due to having increased the output level of an output file and asking for too many variables.

This error is actually not due to XIOS but to the NetCDF4+HDF5 library when trying to write in parallel in a file. For some obscure reason when generating the header's metadata (containing information on all fields in the file) an error is generated in nc_enddef (finalisation of the header of the NetCDF file).

Some Workarounds

  • Output less variables (i.e. decrease the output level of the file and/or increase the output level of variables not needed in the outputs)
  • use the serial version which seems to work : use only one process or a single XIOS server or use two levels of servers (as these, in the end, write in serial)
  • use the PnetCDF (classical format) library instead of the NetCDF4+HDF5 library

Hopefully someday this NetCDF4+HDF5 bug in the library will be fixed...

13/12/2021