ok. I've got what you mean. You can just link your application with mkl's threaded libraries and then pardiso will automatically execute in parallel mode. Please look at the MKL Linker Adviser and you can find How to link your application with threaded versions of MKL.
What MKL version are you using? In the case of version > 10.2 you don't need to set the number of threads PARSDISO will be running explicitly ( iparm(3) is not used).
thanks for early reply. I am using mkl 10.2.5.035. I saw the link advisor, what i am not getting is what essential changes do i need to make in program to run it parallel, i mean values of iparm. And while compiling i should use mpicc *.c or gcc *.c to run pardiso in parallel mode.
Note: I want to run c program as serial code and inside c program use pardiso in parallel mode.
I have a c program running in serial using gcc compiler. In this program to solve equation of type Ax=b i am calling PARDISO. Now i want to use it in such that internally PARDISO works on parallel way so as to reduce computational time.
for using pardiso in parallel mode i was suggested that set iparm=0 and pardiso will run in parallel mode. So in the example given in installation folder i.e. pardiso_unsym_c.c by setting iparm values. But i got segmentation fault