This error can point to a few different types of problems. I imagine your code is too long to post here; however, anything you post or can describe would make it easier for us to have a chance to work it out.
I don't memorize the error messages, and these guesses could be totally wrong, but off the top of my head this error might be due to a mismatch between i and j grid point values in the grid and the i and j values that are being used when setting boundary conditions. Or it might have something to do with assigning properties to FLAC zones that don't exist.
Thank you all for your suggestions. I observed that the code runs successfully at seismic motion of low peak amplitude of acceleration. The above error occurs when seismic motion of high peak amplitude of acceleration is applied.