MAINT: Use proper data type for bigint when defining NetCDF file.

This commit is contained in:
Lars Pastewka
2017-11-01 21:19:55 +01:00
parent f2dc764d1d
commit 36b7aa73aa
2 changed files with 10 additions and 0 deletions

View File

@ -497,8 +497,13 @@ void DumpNetCDF::openfile()
&thermovar[i]), th->keyword[i] );
}
else if (th->vtype[i] == BIGINT) {
#if defined(LAMMPS_SMALLBIG) || defined(LAMMPS_BIGBIG)
NCERRX( nc_def_var(ncid, th->keyword[i], NC_INT64, 1, dims,
&thermovar[i]), th->keyword[i] );
#else
NCERRX( nc_def_var(ncid, th->keyword[i], NC_LONG, 1, dims,
&thermovar[i]), th->keyword[i] );
#endif
}
}
}

View File

@ -465,8 +465,13 @@ void DumpNetCDFMPIIO::openfile()
&thermovar[i]), th->keyword[i] );
}
else if (th->vtype[i] == BIGINT) {
#if defined(LAMMPS_SMALLBIG) || defined(LAMMPS_BIGBIG)
NCERRX( ncmpi_def_var(ncid, th->keyword[i], NC_INT64, 1, dims,
&thermovar[i]), th->keyword[i] );
#else
NCERRX( ncmpi_def_var(ncid, th->keyword[i], NC_LONG, 1, dims,
&thermovar[i]), th->keyword[i] );
#endif
}
}
}