Dear all,
I encountered the problem of configuring MKL. Could some experts help me with it? Even after reading Joe and Alain's posts, I have no idea how to configure with -O3 xHOST -ip. Is it set in FCFLAGS?
The following is my configuration:
rundong@rundong-home:~/Downloads/abinit-6.4.1/build$ ../configure --enable-64bit-flags=yes --prefix=/opt/abinit FCFLAGS_EXTRA="-heap-arrays 1024" --enable-mpi=yes --with-mpi-prefix=/opt/openmpi --enable-mpi-io=yes --with-linalg-includes="-I/opt/Compiler/11.1/073/mkl/include" --with-linalg-flavor=mkl --with-linalg-libs="-L/opt/intel/Compiler/11.1/073/mkl/lib/em64t -llibmkl_intel_lp64 -llibmkl_sequential -llibmkl_core" --enable-bse-unpacked=yes --enable-gw-cutoff=yes --enable-gw-dpc=yes --enable-gw-optimal=yes --enable-gw-wrapper=yes --enable-mpi-io-test=yes
no matter what I try, the log file keeps telling me
ld: cannot find -llibmkl_intel_lp64
no matter what I have done, such as changing the /etc/ld.so.conf file. By the way, a configuration without MKL just worked fine.
Help is desperately needed.
Many thanks in advance
Regards,
Rundong
configuring mkl
Moderators: fgoudreault, mcote
Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
- Alain_Jacques
- Posts: 279
- Joined: Sat Aug 15, 2009 9:34 pm
- Location: Université catholique de Louvain - Belgium
Re: configuring mkl
Hello Rundong,
There is at least a problem in your
If you want to link against a library named libmkl_intel_lp64.so, you have to strip the "lib" part of the name to append to "-l" i.e. -lmkl_intel_lp64 will link against libmkl_intel_lp64.so but -llibmkl_intel_lp64 will fail to find a liblibmkl_intel_lp64.so file. This is the explanation for the error message from ld.
You can push your own optimization flags with FCFLAGS but it has drawbacks - the per-directory optimizations will be messed. I would rather advise to leave FCFLAGS untouched and try --enable-optim=aggressive configuration mod if you have a recent abinit source; it should switch to higher performance settings but don't forget to run the test suite to check accuracy.
Kind regards,
Alain
There is at least a problem in your
--with-linalg-libs="-L/opt/intel/Compiler/11.1/073/mkl/lib/em64t -llibmkl_intel_lp64 -llibmkl_sequential -llibmkl_core"
If you want to link against a library named libmkl_intel_lp64.so, you have to strip the "lib" part of the name to append to "-l" i.e. -lmkl_intel_lp64 will link against libmkl_intel_lp64.so but -llibmkl_intel_lp64 will fail to find a liblibmkl_intel_lp64.so file. This is the explanation for the error message from ld.
You can push your own optimization flags with FCFLAGS but it has drawbacks - the per-directory optimizations will be messed. I would rather advise to leave FCFLAGS untouched and try --enable-optim=aggressive configuration mod if you have a recent abinit source; it should switch to higher performance settings but don't forget to run the test suite to check accuracy.
Kind regards,
Alain
Re: configuring mkl
Hi, Alain,
Thank you very much for the timely help. It solved my problem. Now I have mkl serial version. I guess if I need mpi version I should install intel mpi.
As you suggested, I also used aggressive approach.
Best regards,
Rundong
Thank you very much for the timely help. It solved my problem. Now I have mkl serial version. I guess if I need mpi version I should install intel mpi.
As you suggested, I also used aggressive approach.
Best regards,
Rundong
- Alain_Jacques
- Posts: 279
- Joined: Sat Aug 15, 2009 9:34 pm
- Location: Université catholique de Louvain - Belgium
Re: configuring mkl
It depends on what you mean by Intel MPI. Intel sells its own proprietary MPI Library. I have no experience with that one; don't even know if it compiles Abinit.
What is routinely tested is MPI-2 libraries provided by OpenMPI or MPICH2. Both are working fine. The idea is to build an MPI library, parallelizing compilers and launchers (named mpicc, mpif90, mpirun, ...) with the backend compilers (gcc/gfortran or icc/ifort) you intend to use; not a complicated task but has to be adapted to your hardware environment (a plain SMP box, a cluster with Infiniband, ...). And then reconfigure Abinit with --enable-mpi and --with-mpi-prefix=xxx (xxx as your mpif90 resides in xxx/bin/mpif90). Check the options syntax with configure --help; I may have misspelled them - and they change from time to time.
Kind regards,
Alain
What is routinely tested is MPI-2 libraries provided by OpenMPI or MPICH2. Both are working fine. The idea is to build an MPI library, parallelizing compilers and launchers (named mpicc, mpif90, mpirun, ...) with the backend compilers (gcc/gfortran or icc/ifort) you intend to use; not a complicated task but has to be adapted to your hardware environment (a plain SMP box, a cluster with Infiniband, ...). And then reconfigure Abinit with --enable-mpi and --with-mpi-prefix=xxx (xxx as your mpif90 resides in xxx/bin/mpif90). Check the options syntax with configure --help; I may have misspelled them - and they change from time to time.
Kind regards,
Alain
Re: configuring mkl
Thanks again, Alain.
I have setup openmpi stuff on my computer, but your suggestions is very inspirational.
Best regards,
Rundong
I have setup openmpi stuff on my computer, but your suggestions is very inspirational.
Best regards,
Rundong