Page 1 of 1

pzlascl.f with undefined reference to `disnan_'

PostPosted: Wed Sep 03, 2014 6:12 pm
by rkanters

As a bit of background: I used the scalapack_installer_1.0.2 to install lapack using Intel 9.1 and MKL 8.1 and using openmpi (1.2.6). Since I had some issues with how the installer interpreted the blaslib and lapacklib options, I used the following command:

./ --prefix /usr/local/ur/netlib/scalapack --blaslib="-L/usr/local/intel/mkl/8.1/lib/em64t -lmkl_em64t -lguide -lpthread" --lapacklib="-L/usr/local/intel/mkl/8.1/lib/em64t -lmkl_lapack -lguide -lpthread -lmkl_em64t" --notesting

If I now link using the following libraries:
-L/usr/local/ur/netlib/scalapack/lib -lscalapack -L/usr/local/intel/mkl/8.1/lib/em64t -lmkl_lapack -lguide -lmkl_em64t -lpthread

I have (thankfully only one) undefined reference:

/usr/local/ur/netlib/scalapack/lib/libscalapack.a(pzlascl.o): In function `pzlascl_':
pzlascl.f:(.text+0x173): undefined reference to `disnan_'
pzlascl.f:(.text+0x1aa): undefined reference to `disnan_'

I was wondering what I need to do to get this reference resolved?

Re: pzlascl.f with undefined reference to `disnan_'

PostPosted: Thu Sep 04, 2014 3:06 pm
by admin
hummm.. disnan routine should be included in MKL.
I would run the ScaLAPACK testings to make sure everything is good.

I am thinking that maybe your MKL library may need to be updated.
Otherwise, just download, build and add the LAPACK Library to your link.

Re: pzlascl.f with undefined reference to `disnan_'

PostPosted: Thu Sep 04, 2014 3:19 pm
by rkanters
I initially had some problems running the tests because of using gfortran for the test and having a library linking line not compatible with gfortran. When I change in the the gfortran to ifort, I could do testing and I got a similar link error in the test, but now with sisnan_:

Code: Select all
../../libscalapack.a(pslascl.o): In function `pslascl_':
pslascl.f:(.text+0x173): undefined reference to `sisnan_'
pslascl.f:(.text+0x1a8): undefined reference to `sisnan_'
make[1]: *** [../xsls] Error 1
make: *** [scalapackexe] Error 2

I also had tried downloading the LAPACK library but that seemed to hang during testing (I waited about 50 minutes in one test before I gave up).

Re: pzlascl.f with undefined reference to `disnan_'

PostPosted: Thu Sep 04, 2014 4:50 pm
by rkanters
I was able to get a newer MKL library, which already had scalapack in it. The program I needed to compile is now working using that scalapack library, i.e., I didn't try building the netlib version with that MKL.

Re: pzlascl.f with undefined reference to `disnan_'

PostPosted: Fri Sep 05, 2014 2:57 am
by akobotov
Hello René,

The suggestion about updating Intel MKL version is absolutely correct.
Intel MKL 8.1 has LAPACK 3.0 in it. And disnan() funcsion was introduced in LAPACK 3.1, which was included into Intel MKL 9.1.
Also both these versions are very old (9.1 was released in 2007) and do not exploit performance features of modern CPUs (like SSE4, AVX, AVX2 instructions sets) which gives performance gains up to several times. So it's recomended to use latest version to leverage such hardware.

I case of Intel MKL specific questions you could go directly to the forum Intel maintais for the product: ... el-library

Best regards,