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

Error while implementing "pdgetrf" function

bond078
Beginner
822 Views
Hi All,

I am trying to call the function PDGETRF in a fortran program. But I am receiving below error:

undefined reference to `pdgetrf_'

I have defined PDGETRF in the EXTERNAL section of the code. Any help to resolve this error will be appreciated.

Thanks,
Nimish.
0 Kudos
7 Replies
ArturGuzik
Valued Contributor I
822 Views
Quoting - bond078
undefined reference to `pdgetrf_'

I have defined PDGETRF in the EXTERNAL section of the code. Any help to resolve this error will be appreciated.

Hi,

how about your linking (line)? Seems linker can't find the routine. Gennady always suggests trying the MKL assistant (you'll find it at the top tree messages of the forum), please do so. If it didn't resolve the problem, post some more info (linking, calling lines), so somebody can offer a solution.

A.
0 Kudos
bond078
Beginner
822 Views
Quoting - ArturGuzik

Hi,

how about your linking (line)? Seems linker can't find the routine. Gennady always suggests trying the MKL assistant (you'll find it at the top tree messages of the forum), please do so. If it didn't resolve the problem, post some more info (linking, calling lines), so somebody can offer a solution.

A.

I am using a makefile for running the code. This makefile works for calling the DGETRF routine. However I noticed that the makefile has "include lapack.lst" statement but it does not have any include statement for SCLAPACK routines of which PDGETRF is part. I even could not find SCALAPACK.lst anywhere on my machine.

And were you talking about this MKL assistant? http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
0 Kudos
ArturGuzik
Valued Contributor I
822 Views
Quoting - bond078
And were you talking about this MKL assistant? http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
Yes, I was talking about this page.

Did you set up your machine/cluster correctly? I mean, is the linking line like (in the example) working OK?

To link with ScaLAPACK using LP64 interface for a cluster of Intel 64 architecture based systems, use the following:
set lib="c:MS CCP SDKLibAMD64";em64tlib;%lib%
ifort mkl_scalapack_lp64.lib mkl_blacs_mpich2_lp64.lib mkl_lapack.lib mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib msmpi.lib bufferoverflowu.lib

Is your calling interface correct?

You won't find an example in standard MKL, I think. Do you have Cluster Toolkit? You can always go to Netlib and try to get example source there.

A.
0 Kudos
bond078
Beginner
822 Views
Quoting - ArturGuzik
Did you set up your machine/cluster correctly? I mean, is the linking line like (in the example) working OK?

To link with ScaLAPACK using LP64 interface for a cluster of Intel 64 architecture based systems, use the following:
set lib="c:MS CCP SDKLibAMD64";em64tlib;%lib%
ifort mkl_scalapack_lp64.lib mkl_blacs_mpich2_lp64.lib mkl_lapack.lib mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib msmpi.lib bufferoverflowu.lib

Is your calling interface correct?

You won't find an example in standard MKL, I think. Do you have Cluster Toolkit? You can always go to Netlib and try to get example source there.

A.

i think my machine is set up correctly, because i have been able to run many other routines. Also my machine is 64bit with Linux OS, intel itanium processors. Hence i guess c:MS CCP SDKLibAMD64 is not applicable to me. We don't have cluster toolkit. i found a few examples at netlib calling PDGETRF but i have implemented the same in my code to call that function. I could not find any compiling/linking details at netlib though.

i also found that i don't have any of the .lib files mentioned in your linking command on my machine. in my lib folders i have all .so and .a files.

let me know what do you think.

Also i noticed one more thing that in the example directory (/Programs/intel/mkl/10.0.1.014/examples) i don't have SCALAPACK and BLACS examples. Is this the way it should be or i am missing something on my machine?
0 Kudos
Tyler_T_Intel
Employee
822 Views
Quoting - ArturGuzik
You won't find an example in standard MKL, I think. Do you have Cluster Toolkit? You can always go to Netlib and try to get example source there.

A.
"Standard" Intel MKL these days also includes the capabilities once only available in the Intel MKL Cluster Edition (we merged the cluster capabilities into the "standard"Intel MKL back in Nov'07 (?).

That said, the "standard" Intel MKL (with cluster capbilities) is also available via the the Intel Cluster Toolkit.
0 Kudos
ArturGuzik
Valued Contributor I
822 Views
In the light of what Tyler said, you should have all tools needed, assuming your version is new enough (I have 10.1).

The linking line for you (using MKL tool) is:

$MKLPATH/libmkl_scalapack_ilp64.a $MKLPATH/libmkl_solver_ilp64.a -Wl,--start-group $MKLPATH/libmkl_intel_ilp64.a $MKLPATH/libmkl_intel_thread.a $MKLPATH/libmkl_core.a $MKLPATH/libmkl_blacs_intelmpi_ilp64.a -Wl,--end-group -openmp -lpthread

The also couldn't find standard examples on my machine, but there is makefile and examples in tests folder.

Please note, that you'll need MPI library. In the examples of linking command I set Intel MPI lib. You can use MPICH2, as it's free to download.

A.
0 Kudos
bond078
Beginner
822 Views
Thank you all of you for your help. I am not able to run the code successfully using the command ifort with linking line above. I used the makefile in the /Programs/intel/mkl/10.0.1.014/tests/scalapack/ directory and changed name of one of the program with the my code name. This fetched me the object file but failed to create the exe as i need to make more changes in the makefiles (this one and the other which this one calls) to get the executable. However, right now I am being sucked into another project and hence I have to stop working on this task. Will post back again when will resume this project.

Thanks again.
0 Kudos
Reply