Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Compile Pardiso example under linux

alevseev
Beginner
2,397 Views
Could you help me with compilation pardiso example (pardiso_sym_f.f from mkl library examples)?

-sh-3.1$ ifort pardiso_sym_f.f -o pardiso.x -I /opt/intel/mkl/10.1.0.015/include/ -I /opt/intel/mkl/10.1.0.015/
pardiso_sym_f.f(78): (col. 7) remark: LOOP WAS VECTORIZED.
pardiso_sym_f.f(81): (col. 7) remark: BLOCK WAS VECTORIZED.
pardiso_sym_f.f(106): (col. 7) remark: LOOP WAS VECTORIZED.
pardiso_sym_f.f(133): (col. 7) remark: LOOP WAS VECTORIZED.
/tmp/ifort5nLdf5.o: In function `MAIN__':
pardiso_sym_f.f:(.text+0x188): undefined reference to `pardiso_'
pardiso_sym_f.f:(.text+0x32f): undefined reference to `pardiso_'
pardiso_sym_f.f:(.text+0x477): undefined reference to `pardiso_'
pardiso_sym_f.f:(.text+0x694): undefined reference to `pardiso_'
0 Kudos
9 Replies
Gennady_F_Intel
Moderator
2,397 Views

Which architecture are you working on? ia32, IA64(aka Itanium) or Intel64.
--Gennady
0 Kudos
alevseev
Beginner
2,397 Views

Which architecture are you working on? ia32, IA64(aka Itanium) or Intel64.
--Gennady
As i understand architecture is IA64.
0 Kudos
Gennady_F_Intel
Moderator
2,397 Views

MKL_LIB=/opt/intel/mkl/10.1.0.015/lib/64
ifort -w -I /opt/intel/mkl/10.1.0.015/include/ pardiso_sym_f.f -L${MKL_LIB} ${MKL_LIB}/libmkl_solver_lp64.a ${MKL_LIB}/libmkl_intel_lp64.a -Wl,--start-group ${MKL_LIB}/libmkl_intel_thread.a ${MKL_LIB}/libmkl_core.a -Wl,--end-group -L${MKL_LIB} -liomp5 -lpthread -lm -o pardiso_sym_f.out

I'd recommend you to read user's Guide manual, especially chapter 5 "Linking You application with Intel MKL".
--Gennady

0 Kudos
alevseev
Beginner
2,397 Views

MKL_LIB=/opt/intel/mkl/10.1.0.015/lib/64
ifort -w -I /opt/intel/mkl/10.1.0.015/include/ pardiso_sym_f.f -L${MKL_LIB} ${MKL_LIB}/libmkl_solver_lp64.a ${MKL_LIB}/libmkl_intel_lp64.a -Wl,--start-group ${MKL_LIB}/libmkl_intel_thread.a ${MKL_LIB}/libmkl_core.a -Wl,--end-group -L${MKL_LIB} -liomp5 -lpthread -lm -o pardiso_sym_f.out

I'd recommend you to read user's Guide manual, especially chapter 5 "Linking You application with Intel MKL".
--Gennady

Unfortunately, it still gave errors.

-sh-3.1$ MKL_LIB=/opt/intel/mkl/10.1.0.015/lib/64/
-sh-3.1$ ifort -w -I /opt/intel/mkl/10.1.0.015/include/ pardiso_sym_f.f -L${MKL_LIB} ${MKL_LIB}/libmkl_solver_lp64.a ${MKL_LIB}/libmkl_intel_lp64.a -Wl,--start-group ${MKL_LIB}/libmkl_intel_thread.a ${MKL_LIB}/libmkl_core.a -Wl,--end-group -L${MKL_LIB} -liomp5 -lpthread -lm -o pardiso_sym_f.out
pardiso_sym_f.f(78): (col. 7) remark: LOOP WAS VECTORIZED.
pardiso_sym_f.f(81): (col. 7) remark: BLOCK WAS VECTORIZED.
pardiso_sym_f.f(106): (col. 7) remark: LOOP WAS VECTORIZED.
pardiso_sym_f.f(133): (col. 7) remark: LOOP WAS VECTORIZED.
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_pardiso_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_pardiso_lp64.o): Relocations in generic ELF (EM: 50)
ld: /opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a(_pardiso_lp64.o): Relocations in generic ELF (EM: 50)
/opt/intel/mkl/10.1.0.015/lib/64//libmkl_intel_lp64.a: could not read symbols: File in wrong format
-sh-3.1$

0 Kudos
Gennady_F_Intel
Moderator
2,397 Views

File in wrong format!!! It seems you are working on Intel64.
Could you give the output of "cat /proc/cpuinfo" ?
--Gennady

0 Kudos
alevseev
Beginner
2,397 Views
It seem, I was wrong about architecture. Administrator said it is EM64T=Intel64

And output is:
-sh-3.1$ cat /proc/cpuinfo

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel Xeon CPU 5140 @ 2.33GHz
stepping : 6
cpu MHz : 2333.420
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips : 4670.19
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel Xeon CPU 5140 @ 2.33GHz
stepping : 6
cpu MHz : 2333.420
cache size : 4096 KB
physical id : 3
siblings : 2
core id : 0
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips : 4666.84
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel Xeon CPU 5140 @ 2.33GHz
stepping : 6
cpu MHz : 2333.420
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips : 4666.72
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel Xeon CPU 5140 @ 2.33GHz
stepping : 6
cpu MHz : 2333.420
cache size : 4096 KB
physical id : 3
siblings : 2
core id : 1
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips : 4666.97
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
0 Kudos
Gennady_F_Intel
Moderator
2,397 Views
yes, sure, this is Intel 64.
please try the following linking line:

MKL_LIB=/opt/intel/mkl/10.1.0.015/lib/em64t
ifort -w -I /opt/intel/mkl/10.1.0.015/include/ pardiso_sym_f.f -L${MKL_LIB} ${MKL_LIB}/libmkl_solver_lp64.a ${MKL_LIB}/libmkl_intel_lp64.a -Wl,--start-group ${MKL_LIB}/libmkl_intel_thread.a ${MKL_LIB}/libmkl_core.a -Wl,--end-group -L${MKL_LIB} -liomp5 -lpthread -lm -o test.out
--Gennady
0 Kudos
alevseev
Beginner
2,397 Views
yes, sure, this is Intel 64.
please try the following linking line:

MKL_LIB=/opt/intel/mkl/10.1.0.015/lib/em64t
ifort -w -I /opt/intel/mkl/10.1.0.015/include/ pardiso_sym_f.f -L${MKL_LIB} ${MKL_LIB}/libmkl_solver_lp64.a ${MKL_LIB}/libmkl_intel_lp64.a -Wl,--start-group ${MKL_LIB}/libmkl_intel_thread.a ${MKL_LIB}/libmkl_core.a -Wl,--end-group -L${MKL_LIB} -liomp5 -lpthread -lm -o test.out
--Gennady
Thanks. It works fine!
0 Kudos
alevseev
Beginner
2,397 Views
I have another question. It is strange, but actual..
Is it possible to compile the same (pardiso) example under mpi, so that i can execute it with mpirun command?
Unfortunately our cluster doesn't permit running applications directly, only through queue.
0 Kudos
Reply