abinit-7.10.5 + Intel 14: configure fallsback to gnu wrapper

option, parallelism,...

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.
Locked
temok
Posts: 39
Joined: Tue Jun 08, 2010 1:44 am

abinit-7.10.5 + Intel 14: configure fallsback to gnu wrapper

Post by temok » Fri Mar 25, 2016 5:12 am

Dear All,

Following

Code: Select all

 ~/doc/build/config-examples/bb_xeon-intel14_buda.ac

I am trying to compile ABINIT 7.10.5 with the intel suite composer_xe_2013_sp1.2.144 (ifort & icc 14.0). I find confusing that ABINIT's configure script takes the mpi wrappers associated to the gnu compilers instead of those associated with intel, that is, configure takes

Code: Select all

mpicc, mpif90 # wrappers to gnu

and not

Code: Select all

mpiicc, mpiifort # wrappers to intel's

(these two families of wrappers live in <intel2013_install_dir>/impi/4.1.3.048/bin64/ )

Before running 'configure', the environment was properly set by sourcing

Code: Select all

.  /home/temok/opt/intel2013Student/bin/compilervars.sh     intel64
.  /home/temok/opt/intel2013Student/impi/4.1.3.048/bin64/mpivars.sh


Then I did (the next paths have been double checked)

Code: Select all

#
# following doc/build/config-examples/bb_xeon-intel14_buda.ac
#
../configure  \
        FC=/home/temok/opt/intel2013Student/composer_xe_2013_sp1.2.144/bin/intel64/ifort  \
       CXX=/home/temok/opt/intel2013Student/composer_xe_2013_sp1.2.144/bin/intel64/icpc  \
        CC=/home/temok/opt/intel2013Student/composer_xe_2013_sp1.2.144/bin/intel64/icc \
    --with-fft-flavor="fftw3" \
    --with-linalg-flavor="mkl" \
    --enable-mpi=yes  \
    --enable-mpi-io=yes   \
    --with-mpi-prefix="/home/temok/opt/intel2013Student/impi/4.1.3.048/intel64/" \
    --program-suffix=7105 \
    --enable-memory-profiling \
    --with-trio-flavor="netcdf+etsf_io" \
    --with-dft-flavor="atompaw+bigdft+libxc+wannier90" \
 >& build1-configure.log


The configuration ends without errors, but it falls back to gnu compilers (nothing bad with that, but I wish to take advantadge of intel's optimized libraries; I already have a another build using purely-gnu compilers, with all tests passed/succeded).

Looking inside the 'configure' script, I notice that it never searches for intel's mpiicc, mpiifort (notice the double 'i'), why not?

Is there a way to force the usage of purely-intel tools? (I could modify the configure script to do so, but first I wish to know if there is a technical reason why configure was written to pick the gnu-wrappers)

The tail of the log file is

Code: Select all

Summary of important options:

  * C compiler      : gnu version 4.4
  * Fortran compiler: gnu version 4.4
  * architecture    : amd opteron (64 bits)

  * debugging       : basic
  * optimizations   : standard

  * OpenMP enabled  : no (collapse: ignored)
  * MPI    enabled  : yes
  * MPI-IO enabled  : yes
  * GPU    enabled  : no (flavor: none)

  * TRIO   flavor = netcdf-fallback+etsf_io-fallback
  * TIMER  flavor = abinit (libs: ignored)
  * LINALG flavor = mkl (libs: auto-detected)
  * ALGO   flavor = none (libs: ignored)
  * FFT    flavor = fftw3 (libs: auto-detected)
  * MATH   flavor = none (libs: ignored)
  * DFT    flavor = libxc-fallback+atompaw-fallback+bigdft-fallback+wannier90-fallback

Configuration complete.
You may now type "make" to build ABINIT.


From the config.log, I see that 'configure' took mpif90, which gives

Code: Select all

/home/temok/opt/intel2013Student/impi/4.1.3.048/intel64/bin/mpif90  -v

mpif90 for the Intel(R) MPI Library 4.1 for Linux*
Copyright(C) 2003-2014, Intel Corporation.  All rights reserved.
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)


But I would expect it to instead take 'mpiifort', which gives

Code: Select all

/home/temok/opt/intel2013Student/impi/4.1.3.048/intel64/bin/mpiifort -v
mpiifort for the Intel(R) MPI Library 4.1 for Linux*
Copyright(C) 2003-2014, Intel Corporation.  All rights reserved.
ifort version 14.0.2


Thank you,
Temok

Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Re: abinit-7.10.5 + Intel 14: configure fallsback to gnu wra

Post by Jordan » Fri Mar 25, 2016 8:45 am

MPI is a standard not compiler related library. Which means that there is a standard.
All MPI implementation (openmpi,mpich,intelmpi) proide wrapper for mpif90 mpicc mpic++
When the MPI library is compile, it "remembers" with which compiler it's been compiled so when you compile with ifort then mpif90 should user ifort and so on.
Usually there is always a way to for the fortran/c compiler whatever the mpi compilation. This is nothing more than a wrapper that correctly set som -I -L and -l flags.

Thas is why the build system only looks for mpif90 mpicc mpic++ and not other not official names

You can try to add CC=icc FC=ifort on the configure command line to enforce the compiler. Or just creat some alias from mpiifort to mpif90 womewhere (should be in the intel mpi library.

Hope this help.

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: abinit-7.10.5 + Intel 14: configure fallsback to gnu wra

Post by pouillon » Fri Mar 25, 2016 10:32 am

If your compilers do not have standard names, you should not use the --with-mpi-prefix option, but the following:

Code: Select all

../configure --enable-mpi CC="mpicc" FC="mpiifort"
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Locked