Originally posted by: SystemAdmin
ku,
thanks for your suggestion. The ulimits are all unlimited (except core file size). The filesystem is NFS. I don't think it has anything to do with the filesystem since we can write a 3GB file by looping and using fwrite to write 1GB or less per call. The fread will read a whole 3GB file in a single call, but if you attempt to write 2GB or more in one call to fwrite, it returns an error with errno showing it is a bad parameter. This must be because the fwrite library function is checking that the number of bytes to write must be less than 2GB. This in spite of the fact that the size parameter is size_t, which on a 64-bit AIX system is in fact 64 bits wide and should easily handle large files.
I can live with the limitation that fwrite can write at most 2GB-1 bytes in a single call, but such a limit should be acknowledged in documentation. Since other operating systems allow fwrite to write write more than 2GB in a single call, I think it would be best if the AIX libc fwrite function were updated to handle >2GB writes in a single call. This is just my opinion.
Regards,
Brion
#AIX-Forum