I'd assume that the root cause of the behavior described by you is that it is not enough memory for storing the result matrix. I'd recommend you to allocate the integer array ic of the size n+1 where n is the number of rows in the the result matrix. Then please call the routine with job=1
call mkl_dcsrmultcsr(trans, job, sort, n, n, n, a,ja,ia, a, ja,ia, ddum, idum, ic, idum, idum)
After that thevalue of ic(n+1)-1 is the exact size of jC and C. After allocation of jC and C, the routine should be called again with job=2 to fill Jc and C.
Another possible reason of the failures is that the column indices of the matrix A or the matrix B are not arranged in the increasing order for each row. I'd recommend to set the parameter sort to 3.
Please provide a test case for reproducing the issue if above suggestions dont workfor you.
All the best