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

Compiling Wien2k9

ranyele
Beginner
626 Views
Hello everyone!

I am a student of physics here in Brazil and am having some difficulty in compiling a program to do calculations called Wien2K. I'm using the Intel Fortran compiler 11.1.059 and the intel mkl library 10.2.2.025 with the following flags:

Compiler options: -FR -mp1 -w -prec_div -pc80 -pad -align -DINTEL_VML -traceback -O3 -xW
Linker Flags: -L/opt/intel/mkl/10.2.2.025/lib/32 -L/opt/Wien2K9/SRC_lib -pthread -lsvml -Vaxlib
R_LIB (LAPACK+BLAS): -llapack_lapw -latlas_blas -lguide

Of all the 53 sources to be compiled, only 3 are giving error and not being compiled. These are:

WARNING: no executable found in SRC_lapw1. Check compile.msg in this directory
hamilt.o: In function `hamilt_':
hamilt_tmp_.F:(.text+0x3196): undefined reference to `vdcos_'
hamilt_tmp_.F:(.text+0x37c7): undefined reference to `vdsincos_'
hamilt_tmp_.F:(.text+0x37e9): undefined reference to `vdinv_'

WARNING: no executable found in SRC_lapwdm. Check compile.msg in this directory
/opt/Wien2K9/SRC_lib//libatlas_blas.a(dgemm.o): In function `dgemm_':
dgemm.f:(.text+0x1d7): undefined reference to `xerbla_'

WARNING: no executable found in SRC_qtl. Check compile.msg in this directory
/opt/Wien2K9/SRC_lib//libatlas_blas.a(zgemm.o): In function `zgemm_':
zgemm.f:(.text+0x1d7): undefined reference to `xerbla_'

Could someone give me a help with these functions?!
I have been clear with my explanation.
Now appreciate the attention of all.

Ranyele Amorim Martins - Physics UFSJ - 2009
0 Kudos
3 Replies
TimP
Honored Contributor III
626 Views
You are using an antiquated group of compiler flags. It seems you are trying to link a combination of Atlas and some portion of MKL. Your Atlas functions are requiring lapack functions, where it seems you should be using a normal method to provide those for Atlas, or otherwise use MKL entirely. If you are calling VML functions from MKL, you will need to link the corresponding libraries, perhaps updating your compile flags in accordance with compiler docs and the MKL link advisor in the right hand column of the header page for this forum.
0 Kudos
ranyele
Beginner
626 Views
Quoting - tim18
You are using an antiquated group of compiler flags. It seems you are trying to link a combination of Atlas and some portion of MKL. Your Atlas functions are requiring lapack functions, where it seems you should be using a normal method to provide those for Atlas, or otherwise use MKL entirely. If you are calling VML functions from MKL, you will need to link the corresponding libraries, perhaps updating your compile flags in accordance with compiler docs and the MKL link advisor in the right hand column of the header page for this forum.

Perfect, tim18.
I'm more inside than I'm doing with these libraries. What I could give my checking libraries is that when I use the mkl libs, the compilation does not succeed, but are used when the libs that comes with the source package.
This has left me even more confused, because when I use the mkl the number of triple error msg. In the source code they have references to the IBM MASS or VML Intel. But when I use the mkl libs vml me return the following messages:

R_LIB (LAPACK+BLAS): -lmkl_vml_def -lmkl_vml_ia -lmkl_sequential -lmkl_pgi_thread

http://pastebin.com/m56473400

It is wrong to use this combination of compiler flags? This way was the only way I could minimize my error messages.
With flags the messages are:

R_LIB (LAPACK+BLAS): -lguide -llapack_lapw -latlas_blas

http://pastebin.com/m2545d31

The libs I have installed are:

/opt/intel/mkl/10.2.2.025/lib/32
libguide.a libmkl_gnu_thread.a libmkl_scalapack_core.a
libguide.so libmkl_gnu_thread.so libmkl_scalapack_core.so
libiomp5.a libmkl_intel.a libmkl_sequential.a
libiomp5.so libmkl_intel.so libmkl_sequential.so
libmkl_blacs.a libmkl_intel_thread.a libmkl_solver.a
libmkl_blacs_intelmpi.a libmkl_intel_thread.so libmkl_solver_sequential.a
libmkl_blacs_intelmpi.so libmkl_lapack95.a libmkl_vml_def.so
libmkl_blacs_openmpi.a libmkl_lapack.so libmkl_vml_ia.so
libmkl_blas95.a libmkl_p4m3.so libmkl_vml_p4m2.so
libmkl_cdft_core.a libmkl_p4m.so libmkl_vml_p4m3.so
libmkl_core.a libmkl_p4p.so libmkl_vml_p4m.so
libmkl_core.so libmkl_p4.so libmkl_vml_p4p.so
libmkl_def.so libmkl_pgi_thread.a libmkl_vml_p4.so
libmkl_gf.a libmkl_pgi_thread.so

/opt/Wien2K9/SRC_lib
blas_lapw libatlas_athlon.a libblas.a README
compile.msg libatlas_blas.a libblas_lapw.a xerbla.f
lapack_lapw libatlas_pII.a liblapack_lapw.a xerbla.o

Once again thank you for all the help.
0 Kudos
TimP
Honored Contributor III
626 Views
Well, you may have undertaken something too complex to advise about.
mkl_pgi_thread would be valid only if you are using pgi OpenMP run-time, in which case you can't also use an Intel OpenMP runtime (the obsolete libguide or current gcc compatible libiomp5), and can't use a gfortran library.
You must use exactly one of the sequential or thread libraries, and it should follow all the other MKL libraries.
I still don't see how you plan to mix atlas and mkl. If someone worked out some such mixture with past versions of those libraries, it seems unsurprising if it doesn't continue to work.
0 Kudos
Reply