I am annotating a C code using OpenACC pragmas.
The code performs a simulation and can be run on different problem sizes; for production use it requires a huge amount of data (several GB) to be copied in the device before the kernels are launched.
For large data sizes I got a “Floating point exception”, while for small ones it run correctly; to isolate the problem I commented out the kernels launch and the error seems to be associated to the data transfer.
I discovered that increasing the value of $PGI_ACC_BUFFERSIZE the problem disappear.
I think that the problem may be related to the fact that for some reasons the data transfer could not be split in chunks small enough to fit the pinned buffer size… maybe it is related to the fact that I am copying a “short” array of “big” data structures? Maybe it is not able to split in different chunks single elements of the array? Can somebody confirm this?
I am writing here to help other people who may encounter this error, but also to suggest to handle this error condition in order to report a different error message than a generic “Floating point exception” which is hardly associable to a problem in the data transfer.
I am using PGI 14.4 on a machine hosting a NVIDIA K20m.
Thanks in advance,