Configure fails with mkl because configure can not find blas.h

251 views
Skip to first unread message

John Low

unread,
Jun 11, 2021, 9:39:01 AM6/11/21
to molpro-user
To whom it may concern,

I am trying to configure Molpro_release that I git cloned today.

I would prefer to use Intel's MKL but the configure fails with the message.

"configure: error: unable to resolve cblas.h"

I am using the following configure command.

../configure --prefix=/soft/molpro/2021.2 LDFLAGS="-L/soft/ga/5.8/gcc-9.2/lib -L$MKLROOT/lib/intel64" LIBS="-lmkl_scalapack_lp64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -lgomp -lpthread -lm -ldl" CXXFLAGS="-I/home/jlow/eigen/eigen-3.3.9 -I$MKLROOT/include -march=native" FCFLAGS="-m64 -I$MKLROOT/include -march=native" CFLAGS="-march=native -I$MKLROOT/include" FC=mpif90 CC=mpicc CXX=mpicxx &> configure.log

I have attached the standard output from configure (configure.log) and the config.log file.

From what I can tell MKL needs to use mkl_blas.h rather than cblas.h for the cblas headers.  I this is true, I could try a workaround with a link.  But I think it would better if it were incorporated in the configure script.

Is there another workaround for CBLAS and MKL?

Thanks for the help!

John J. Low
Argonne National Laboratory
Lemont, IL
config.log.xz
configure.log.xz

Andy May

unread,
Jun 11, 2021, 10:08:21 AM6/11/21
to John Low, molpro-user
Dear John,

I can see you have specified everything the standard autoconf way, but unfortunately Molpro's blas/lapack detection does not play so well with that yet. This is mainly just historical, and where possible we've moved to the standard variables, but I don't think we're quite ready yet with blas/lapack so you will need to use the --with-lapack options.

I note you are using '../configure', Molpro doesn't support an out of source build so it will really need to be './configure' in the source tree. Also, if you have a GA install all that you need to do is ensure the resulting bin directory (containing ga-config) is in PATH and configure will use that to do the rest.

Here are some options to try:

1. Let configure try and find MKL automatically, hopefully will work based on MKLROOT being set:

./configure --prefix=/soft/molpro/2021.2 CPPFLAGS=-I/home/jlow/eigen/eigen-3.3.9 CFLAGS=-march=native CXXFLAGS=-march=native FCFLAGS=-march=native FC=mpif90

2.  If that fails guide configure to the MKL lib directory by adding:

--with-lapack-path=$MKLROOT/lib/intel64

3. If you want to specify the libraries by hand instead use:

--with-lapack="-L$MKLROOT/lib/intel64 -lmkl_scalapack_lp64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -lgomp -lpthread -lm -ldl"

Hopefully the above or something similar should enable you to configure Molpro against MKL.

Best wishes,

Andy

--
You received this message because you are subscribed to the Google Groups "molpro-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to molpro-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/molpro-user/f3dfdf13-b31a-4de1-99a6-1e256b2f1f70n%40googlegroups.com.

John Low

unread,
Jun 23, 2021, 10:46:32 AM6/23/21
to molpro-user
Andy,

Thanks for the help in configuring Molpro.   Now I have a Molpro build that fails several tests.  I have attached the config.log and the output from the tests which failed.

Any suggestions you may have to build Molpro to generate a correct executable would be appreciated.

Thanks,

John Low
Argonne National Laboratory
Lemont, IL

errors.tar.xz
config.log.xz

Andy May

unread,
Jun 23, 2021, 10:49:54 AM6/23/21
to John Low, molpro-user
Dear John,

Sure, I replied already on Friday to your private message about this, perhaps the email got filtered or put in spam, anyway I'll forward it again to you now.

Best wishes,

Andy

Jacek Koput

unread,
Aug 30, 2021, 7:24:59 AM8/30/21
to molpro-user
Dear Andy,

I am trying to configure Molpro following the above-mentioned notes:

 ./configure --prefix=/home/users/koput/Molpro_ib --with-lapack=-L/opt/exp_soft/local/haswell/intel/mkl/lib/intel64 -Wl,--no-as-needed -lmkl_intel_ilp64 -lmkl_core -lmkl_gnu_thread -lgomp -lpthread -lm -ldl --with-lapack-int64=yes CPPFLAGS=-I/home/users/koput/Eigen3 -I/home/users/koput/ga_lib_g/include CFLAGS=-march=native CXXFLAGS=-march=native FCFLAGS=-march=native LDFLAGS=-L/home/users/koput/ga_lib_g/lib FC=mpif90 CC=mpicc CXX=mpic++

but, surprisingly, it fails with the message:

configure:7913: error: LAPACK with 8-byte integers no longer supported

Does it mean that one should switch to the ia-32 architecture?  intel/mkl/lib/ia32 instead of intel/mkl/lib/intel64 (and the libraries accordingly)?

Kind regards,
Jacek

Andy May

unread,
Aug 30, 2021, 3:19:13 PM8/30/21
to Jacek Koput, molpro-user
Dear Jacek,

No, it's just refers to the size of the integers inside MKL. Previously we used the MKL interface with 64-bit integers since this matches what is widely used inside Molpro (by virtue of -i8 flag or equivalent), but this does not play well with some components we now interface to which expect Fortran standard compliant interface (32-bit integers). So you just need to use mkl_intel_lp64 instead of  mkl_intel_ilp64 and remove the --with-lapack-int64 option, something like:

./configure --prefix=/home/users/koput/Molpro_ib --with-lapack=-L/opt/exp_soft/local/haswell/intel/mkl/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lgomp -lpthread -lm -ldl  CPPFLAGS=-I/home/users/koput/Eigen3 -I/home/users/koput/ga_lib_g/include CFLAGS=-march=native CXXFLAGS=-march=native FCFLAGS=-march=native LDFLAGS=-L/home/users/koput/ga_lib_g/lib FC=mpif90 CC=mpicc CXX=mpic++

Or perhaps just let configure add the MKL libraries for you:

./configure --prefix=/home/users/koput/Molpro_ib --with-lapack-path=/opt/exp_soft/local/haswell/intel/mkl/lib/intel64 CPPFLAGS=-I/home/users/koput/Eigen3 -I/home/users/koput/ga_lib_g/include CFLAGS=-march=native CXXFLAGS=-march=native FCFLAGS=-march=native LDFLAGS=-L/home/users/koput/ga_lib_g/lib FC=mpif90 CC=mpicc CXX=mpic++

Best wishes,

Andy

Reply all
Reply to author
Forward
0 new messages