Page 1 of 1

Intel MPI + OpenMP

Posted: Wed Feb 26, 2014 2:37 pm
by ygillet
Good afternoon,

I'm trying to compile Abinit with Intel MPI (on top of cluster studio 2013) and OpenMP.

However, during the configuration stage, I got the following error :
configure:30888: checking whether the Fortran Compiler supports MPI
configure:31148: mpiifort -o conftest -g -extend-source -vec-report0
-noaltparam -nofpscomp -openmp -static-intel -static-libgcc
conftest.F90 -L/opt/intel/ics_2013.0.028/impi/4.1.0.024/intel64/lib
-L/opt/intel/ics_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64
-L/opt/intel/ics_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64
-L/usr/local/intel/ics_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64
-L/usr/local/intel/ics_2013.0.028/composer_xe_2013.1.117/ipp/lib/intel64
-L/usr/local/intel/ics_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64
-L/usr/local/intel/ics_2013.0.028/composer_xe_2013.1.117/tbb/lib/intel64
-L/usr/local/gcc/4.7.2/lib -L/usr/local/gcc/4.7.2/lib64
-L/opt/gcc/4.7.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.2/
-L/opt/gcc/4.7.2/bin/../lib/gcc/ -L/usr/local/gcc/4.7.2/lib/../lib64
-L/usr/local/gcc/4.7.2/lib/../lib64/ -L/usr/local/gcc/4.7.2/lib64/../lib64
-L/usr/local/gcc/4.7.2/lib64/../lib64/
-L/opt/gcc/4.7.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../lib64
-L/opt/gcc/4.7.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../lib64/
-L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/
-L/opt/intel/ics_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64/
-L/opt/intel/ics_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64/
-L/usr/local/intel/ics_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64/
-L/usr/local/intel/ics_2013.0.028/composer_xe_2013.1.117/ipp/lib/intel64/
-L/usr/local/intel/ics_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64/
-L/usr/local/intel/ics_2013.0.028/composer_xe_2013.1.117/tbb/lib/intel64/
-L/usr/local/gcc/4.7.2/lib/ -L/usr/local/gcc/4.7.2/lib64/
-L/opt/gcc/4.7.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../
-L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib -ldl -lmpi -lmpigf -lmpigi -lrt
-lpthread -lifport -lifcore -limf -lsvml -lm -lipgo -lirc -lirc_s >&5 ld:
MPIR_Thread: TLS definition
in /opt/intel/ics_2013.0.028/impi/4.1.0.024/intel64/lib/libmpi_dbg_mt.so
section .tbss mismatches non-TLS definition
in /opt/intel/ics_2013.0.028/impi/4.1.0.024/intel64/lib/libmpi.so
section .bss /opt/intel/ics_2013.0.028/impi/4.1.0.024/intel64/lib/libmpi_dbg_mt.so:
could not read symbols: Bad value configure:31155: $? = 1 configure: failed
program was:
| program main
|
| include "mpif.h"
| integer :: ierr
| call mpi_init(ierr)
| call mpi_finalize(ierr)
|
| end configure:31413: result: no


It seems like the build system wanted me to use "-lmpi" in addition to "-lmt_mpi" that I gave him in the .ac file:
with_mpi_libs='-L/usr/local/intel/ics_2013.0.028/impi/4.1.0.024/lib64 -lmt_mpi'
However, these two libraries are in conflict !

Am I doing something wrong ? If I disable openmp (remove -lmt_mpi => -lmpi, change mkl and fftw and enable_openmp="no"), the configuration works. Moreover, the configuration works with OpenMPI + OpenMP on top of intel cluster studio...

Thank you very much for your help. The config.log and the ac file are joint to this message

Yannick Gillet

Re: Intel MPI + OpenMP

Posted: Thu Feb 27, 2014 6:45 pm
by pouillon
Intel compilers do not automatically enable the correct build options when you use OpenMP and MPI at once. You may be able to solve this issue with the following flags:

Code: Select all

CFLAGS_EXTRA="-mt_mpi" CC_LDFLAGS_EXTRA="-mt_mpi" FCFLAGS_EXTRA="-mt_mpi" FC_LDFLAGS_EXTRA="-mt_mpi"

If this does not work, you still can have a look at Intel's discussion forums, e.g.: http://software.intel.com/en-us/forums/topic/392483

Re: Intel MPI + OpenMP

Posted: Fri Feb 28, 2014 10:13 am
by ygillet
Hello Yann,

Thank you for your answer.

I've just tried but the error is still the same.

As mentioned in the link of your reply, there is a conflict between the "-lmpi" and "-mt_mpi"... However, the "-lmpi" option comes from the build system into the ${LIBS} variable :
LIBS="${CC_LIBS} ${lib_mpi_libs}" (configure file, line 30018) so from the lib_mpi_libs variable.

The problem is that I don't know how to remove "-lmpi" from ${lib_mpi_libs} in a "clean" way.

Yannick

Re: Intel MPI + OpenMP

Posted: Tue Mar 04, 2014 12:41 pm
by pouillon
I cannot propose any solution for now. As a temporary measure, you could enhance the config/wrappers/wrap-fc.in, so that it removes unwanted libraries from the command line. I suggest you to consult Matteo Giantomassi if you need help.