Compile and link goes fine. However there is another issue which bothers me. If my system is a 64 bit system. Should I get the length of my integers 8 bytes or as usual 4 bytes? A simple c++ program shows ints as 4 bytes. I am a bit confused.
As a reply to my own post, I realized that I did not understand the strategy to use the functions,
+ should I use pardisoinit first of all + if I do not use pardisoinit and set iparm=0 then the other parameters are filled automatically to default values and I get a segfault. and under gdb I found out that
Program received signal SIGSEGV, Segmentation fault. 0x00002aaaac91da38 in mkl_pds_pardiso_c () from /home/utab/intel/composerxe-2011.3.174/mkl/lib/intel64/libmkl_core.so
I can understand this segfault at least c++ arrays are zero based and iparm(35) should be changed, but then should I enter all iparm array myself?
In fact, C/C++ int type is platform independent and should be equal to 4-byte integer regardless you're on 32-bit or 64-bit system. The main difference of 64-bit system is a size of pointers (64-bit) that allows adressing much more memory. So, in general, if you're on 64-bit OS it doesn;t mean that you should compile with MKL_ILP64 and link with libmkl_intel_ilp64 library.
The only need for that is when the size of your task for PARDISO is really huge (for example, matrix A has about a billion of non-zero elements and more). In this case you can use ILP64 version of PARDISO, but please take into account that all the integer data passed to PARDISO should be 64-bit - in other words, all scalars/arrays must have "long long int" or MKL_INT type, not "int".
So, my recommendation for you is to start with LP64 (not ILP64) version of MKL.
Re "setting PARDISO parameter".
My recommendation is to set iparm=1 and set all the parameters explicitly (you may refer how is was made in the examples of MKL). It's easy as far as the majority should be equal to 0.
And a comment about zero-based c++ arrays: it should be applicable (I mean iparm(35)=1) only if rows/colums in your matrix are enumerated from 0, not 1. The fact that arrays start from 0 in C/C++ is Ok for PARDISO (it's not a zero-based case).