Hello, I'm currently trying to get pardiso to work with multi threading and I'm wondering if it is a linking issue or something else. I have tried some "easy" fixes that didn't work, then I tried the link advisor and get an error when linking.
Question: How do I get pardiso to work with multiple cores?
Background:
When calling pardiso I use the following iparm
iparm= 0
iparm(1) = 1! !0=solver default
iparm(2) = 2 ! !2
iparm(3) = 0 !reserved, set to zero
iparm(4) = 0 ! Preconditioned CGS/CG.
iparm(5) = 0 !
iparm(6) = 0 !
iparm(7) = 0 !
iparm(8) = 9 ! Iterative refinement step.
iparm(9) = 0 ! reserved, set to zero
iparm(10) = 13
iparm(11) = 1
iparm(12) = 0
iparm(13) = 0
iparm(14) = 0
iparm(15) = 0
iparm(16) = 0
iparm(17) = 0
iparm(18) = -1
iparm(19) = -1
iparm(20) = 0
The problem is "large" with
#equations: 71574
#non-zeros in A: 3815460
non-zeros in A (%): 0.074479The simplest fix
call mkl_set_dynamic(0) ! disable adjustment of the number of threads call mkl_set_num_threads(4) call omp_set_num_threads(4)
This is done right before I call pardiso and has no effect on the number of cores used, the next step was to check the MKL linking, I then tried to use the link advisor, https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ but I get and error.
With the advisor,I choose the "Composer XE 2011" in the link advisor since that is where my MKL roots are in the makefile(please correct me if this is a wrong assumption),
MKLroot=/software/intel/parallel_studio/composer_xe_2011_sp1.7.256/mkl/lib/intel64
My OS is then Linux, the compiler is iFort/intel fortran, linking is dynamic(unsure of this, trying static yields same result/error), the interface is LP64.
For threading layer Im uncertain of which option to select, sequential or OpenMP. In the makefile there is "sequential" in LLIBS, but there are sections of the code that are already multithreading with OpenMP, only do-loops and no explicit MKL routines.
LLIBS = -L/software/matlab/R2011a/bin/glnxa64 -leng -lmat -lmx -lut -Wl,--start-group ${MKLroot}/libmkl_intel_lp64.a ${MKLroot}/libmkl_sequential.a ${MKLroot}/libmkl_core.a -Wl,--end-group -lpthread Lastly I'm advised to do the following linking and add to my compiler
-lpthread -lm -openmp -mkl=parallel
Adding the compiler options work but when linking I get the following message/error
$ ifort -lpthread -lmifort: warning #10315: specifying -lm before files may supercede the Intel(R) math library and affect performance /software/intel/parallel_studio/composer_xe_2011_sp1.7.256/compiler/lib/intel64/for_main.o: In function `main': /export/users/nbtester/efi2linux_nightly/branch-12_1/20111012_000000/libdev/frtl/src/libfor/for_main.c:(.text+0x38): undefined reference to `MAIN__'
I assume this means that the linking is incomplete, how can I complete it? And hopefully get pardiso to work on more then 1 core
--
Sorry if this post is messy, this is my first time attempting to link anything. If any clarification is needed please ask, any help is much appreciated
/Viktor