Showing results for 
Search instead for 
Did you mean: 

to compile ARPACK with sequential mkl

i need to compile ARPACK  with sequential mkl. the two versions of ARAPCK are available serial and parallel. i am using ubuntu 14.04 and ifort version 16.0.1.

i chose serial version of ARPACK, transferred all .f files from patch to SRC and used

ifort *.f -c    then created archive file using        ar q libarpack.a *.o

this .a file then i linked my source codes and mkl libraries (LAPACK and BLAS) and using commands

ifort -O3 -static-intel -parallel -par-threshold0 -mkl=parallel -openmp -i8 -mkl=parallel -L/home/user/Desktop/lib/libarpack.a -w -o xyz a.f b.f c.f d.f e.f g.f90 h.f90 i.f90 k.f90 l.f90 m.f90 o.......f90

i get output as

/tmp/ifortkfJcST.o: In function `m_3_arpack_diagonalizers_mp_arpack_coo_half_auto_':

h.f90:(.text+0x1076): undefined reference to `dsaupd_'

h.f90:(.text+0x18bf): undefined reference to `dseupd_'

i am unable to understand the cause and hence cant rectify. i strongly feel it is linked to linking/ compiling of arpack file.

pl help. your expertise will be invaluable to me.


0 Kudos
7 Replies
Black Belt

You say you want serial, yet you set hopelessly aggressive parallelization options.

You would also require the -larpack at the end of your linking step, possibly followed by -mkl.

Did you have expert advice to set -i8?  If so, everything including libraries would require that setting.


 thank you Mr Tim.

I write the details given in make file

Default settings for the system-dependent variables

 32-bit integer version of arpack  to be compiled with sequential mkl    (required)

the default settings for system dependent variables are

LINK2 = ifort -O3 -static-intel -parallel -par-threshold0 -mkl=parallel -openmp -i8    

LIBAR= ./source/lib/libarpack_intel_mkl.a                   


    $(LINK2) $^ $(LIB2) $(LIBAR) -o $@   is the command given in make file.

while creating executable i followed it. but i am apprehensive of the LINK2.

the linking of 'arpack' to Intel's 'mkl' library is by -O3 -static-intel -parallel -par-threshold0 -mkl=parallel

so i dont think we need -mkl=parallel again. this might be an error in make file description..

i feel it should be

ifort -O3 -static-intel -parallel -par-threshold0 -mkl=parallel -openmp -i8   -L/home/user/Desktop/lib/libarpack.a  xyz a.f b.f c.f d.f e.f g.f90 h.f90 i.f90 k.f90 l.f90 m.f90 o.......f90

if it is required to set -i8, then pl explain me how to configure the settings.

also i used intel fortran composer which does not inculde MPI lib. the arpack is available in two options serial and parallel. i used serial type of arpack. hope these were not the cause of errors.

i value your time and advice. I am not an expert. pl write in detail if you dont mind. 

warm regards



pls pay attention on the fact, then you use compiler option mkl=parallell, then by the default, LP64 mkl's libraries would be linked. In the case you need to link with ILP64 Libraries, then you need explicitly to add MKL's libraries you need to link. pls look at the MKL Linker Adviser to see how to do that. 


thank you for valuable input. pl answers specifically to my questions. i will enhance my understanding and eliminate doubts
1   does use of composer version can be a reason to my problem. it does not contain MPI libraries. only cluster edition has MPI libraries
2   how to compile static 32 bit ARPACK sequentially using MKL lib.  i need full command
3  the default setting given are 

LINK2 = ifort -O3 -static-intel -parallel -par-threshold0 -mkl=parallel -openmp -i8    

LIBAR= ./source/lib/libarpack_intel_mkl.a                   LIB=-mkl=sequential                            LIB2=-mkl=parallel

$(LINK2) $^ $(LIB2) $(LIBAR) -o $@   is the command given in make file.

but i am apprehensive of the LINK2 and LIB

the linking of 'arpack' to Intel's 'mkl' library is by ifort -O3 -static-intel -parallel -par-threshold0 -mkl=parallel  which means i am linking with 32 bit interger code. Am I right ?

4   do i we need -mkl=parallel again in LIB2. this might be an error in make file description..

5  what is -openmp -i8 refer to in LINK2.....

pl answer 1,2,4,5 .  answers to these points may help in solving the issue


Black Belt

As Gennady pointed out, the obsolete -i8 option (if still implemented) set when making an object which calls MKL will require the ilp64 MKL library.  I don't think it's feasible to mix lp64 and ilp64 (the subject was brought up here not long ago), so you would need to be consistent in using that option or the current versions of it.  -i8 would have no effect in a compile step which includes no source files, but why confuse things?

Speaking of confusion, once again, you are telling the compiler to auto-parallelize wherever possible, even at the expense of performance.  It seems to make more sense to try to get things working first without -parallel, and avoid -par-threshold until you have evidence in favor of it.  For the link step, either -parallel or -qopenmp have the same effect of linking in the OpenMP library which is used also by mkl=parallel.  Your recent compiler should reject the old spelling of -openmp.

If your arpack Makefile was set up carefully,  it might use -parallel along with mkl=sequential, and mkl=parallel where -parallel is not used.  At the very least, you are seeing evidence that it was set up for ifort several versions back, and you should pay attention to the options.

If you are meaning by serial arpack one which does not use MPI, then you will not need the cluster parallel studio.  Use of MPI would involve MPI wrappers such as mpiifort, mpiicc, mpiicpc as the names of the Intel MPI Fortran, C, and C++ compilers, with slightly different names for other MPI implementations.


thanks Tim

while installing ifort cluster ed (evaluating version)  do i need to edit bash file and set environment for using default MKL, MPI libraries.

what should be the exact path.... the ifort path is , which directory should we consider to specify the path as there are so many lib in intel folder like bin, mkl (shared), mpi (shared), impi, daal (shared), compilers_and_libraries_2016.1.150 and compilers_and_libraries_2016 have same folders and files

e.g     source /opt/intel/compilers_and_libraries_2016.1.150/linux/bin/ intel64

         source /opt/intel/compilers_and_libraries_2016.1.150/linux/bin/ ia32  since i require 32 bit arpack to be compiled sequetially...

2  you mean in LINK2 = ifort -O3 -static-intel -parallel -par-threshold0 -mkl=parallel -openmp -i8 ,  i dont need MPI libraries.  what does openmp -i8 stand for

i shall answer your questions raised in above and my need for using commands mentioned in above post later just to avoid confusion at this stage,.

your suggestions have been highly helpful a lot. thanks for your efforts


Black Belt

In addition to sourceing the, if you wished to use Intel MPI, you would source ia32 (if you are running a version of Intel MPI which still has 32-bit mode support).  Did you read

where it is advised to use MPI 4.1 if you insist on 32-bit mode?  It may work with current ifort but probably hasn't been tested, nor would it be likely to have been tested on current linux distros.

You can assure yourself of which ifort is set up for MPI build by 'mpiifort -V'. 

In my own opinion, you may be wasting more time switching your focus to running 32-bit ifort and MPI on a 64-bit system.  To make it work, you will need to set up the full 32-bit g++ in addition to the 64-bit g++ development system.  You will need also to keep track of your 32- and 64-bit MPI installations and builds.