It is not a limitation in the license.
Glancing at your code it looks like it is your buffer size that is the issue.
16322/2 = 8183... this the size of the buffer you declare
as you can see in the code below the size of the buffer is ln, as the number of elements sent. Why should it be the problem?
buffer = (double*)calloc(ln, sizeof(double));
retCode = MPI_Ssend (buffer, ln, MPI_DOUBLE, i, 0, MPI_COMM_WORLD);
retCode = MPI_Recv (buffer, ln, MPI_DOUBLE, p-1, MPI_ANY_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE);