Hi, all !
I just met a strange bus error while using Pardiso. The following is the detailed information.
First, the purpose of my code: As I study finite element method (FEM), I would like to use Pardiso to solve my equations. Since the right hand side changes at each time step but the matrix keeps the same, I want to factorize the matrix once and reuse it for many times. I wrote three subroutines, each of which contains different stages of Pardiso (1. Reordering&factorization; 2. back substitution; 3. release of memory), and linked them with the pointer array pt.
Second, the problem: I put the three subroutines (solver_pardiso_factor/bsubst/termin) in the module (Solver.f90) and call them in the main program (solvercheck.f90). Everything is ok unless the last step of the memory release. The second call of solver_pardiso_termin of matrix 2 returns the bus error.
Third, what's strange: If I put solver_pardiso_termin at the beginning of the module, followed by solver_pardiso_factor and solver_pardiso_bsubst , the code runs in a good condition.
I'm confused about the problem. If anyone can help me, I would be very rateful.
My platform is CentOS 6.9, the version of the ifort is 13.1.1, the version of MKL is 11.0.5. Attached is my code.
Thanks!