I have the same problem, I'm running 3D simulations on cluster with 120 Gb RAM. For the small meshes (200 000 elements) everything works perfectly, but if I'm trying to increase number of elements (6 mllion or more) I am getting the same error=-2 durig factorithation. I'm using default values of iparm and solving symmetric indefinite matrix. May be you know what it could be and how to resolve this problem?
Please create a separate post about your particular problem. The overall problem defintion is quite general and the observed error can be caused by different reasons.
Also, please, provide more details about your use case: MKL version, size of the matrix, msglvl output, your iparm settings, your hardware, and what you see exactly. Ideally, a standalone reproducer would be the best as we can then check what exactly happens rather than give you some general piece of advice.