Compiling Abinit 6.4.1 in HPC cluster CentOS  [SOLVED]

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
cespejo
Posts: 21
Joined: Fri Feb 26, 2010 8:12 pm

Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by cespejo » Wed Oct 20, 2010 6:56 am

Dear Abiniters,
I'm getting the following problem at configure on several compilers and parallel environments:

(1) the compilers: intel 11.1, gfortran 4.1.2
(1') parallel environments: mvapich-intel, openmpi-gcc
(2) the architecture: 64 bit, HPC SMP cluster. (CentOS 5)
(3) The problem occur compiling in parallel.
(4) the version of ABINIT: 6.4.1
(5) the relevant compiler error message:
(the full config.log is attached)

Code: Select all

  $ ../configure --enable-vdwxc=yes --enable-mpi=yes --enable-mpi-io=yes FC=/usr/local/mpi/intel/mvapich/bin/mpif90
.
.
.
==============================================================================
 === Advanced compiler features                                             ===
 ==============================================================================

checking stddef.h usability... no
checking stddef.h presence... yes
configure: WARNING: stddef.h: present but cannot be compiled
configure: WARNING: stddef.h:     check for missing prerequisite headers?
configure: WARNING: stddef.h: see the Autoconf documentation
configure: WARNING: stddef.h:     section "Present But Cannot Be Compiled"
configure: WARNING: stddef.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.launchpad.net/abinit/ ##
configure: WARNING:     ## ------------------------------------------------- ##
checking for stddef.h... no
checking stdarg.h usability... no
checking stdarg.h presence... yes
configure: WARNING: stdarg.h: present but cannot be compiled
configure: WARNING: stdarg.h:     check for missing prerequisite headers?
configure: WARNING: stdarg.h: see the Autoconf documentation
configure: WARNING: stdarg.h:     section "Present But Cannot Be Compiled"
configure: WARNING: stdarg.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.launchpad.net/abinit/ ##
configure: WARNING:     ## ------------------------------------------------- ##
checking for stdarg.h... no
checking stdio.h usability... no
checking stdio.h presence... yes
configure: WARNING: stdio.h: present but cannot be compiled
configure: WARNING: stdio.h:     check for missing prerequisite headers?
configure: WARNING: stdio.h: see the Autoconf documentation
configure: WARNING: stdio.h:     section "Present But Cannot Be Compiled"
configure: WARNING: stdio.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.launchpad.net/abinit/ ##
configure: WARNING:     ## ------------------------------------------------- ##
checking for stdio.h... no
checking malloc.h usability... no
checking malloc.h presence... yes
configure: WARNING: malloc.h: present but cannot be compiled
configure: WARNING: malloc.h:     check for missing prerequisite headers?
configure: WARNING: malloc.h: see the Autoconf documentation
configure: WARNING: malloc.h:     section "Present But Cannot Be Compiled"
configure: WARNING: malloc.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.launchpad.net/abinit/ ##
configure: WARNING:     ## ------------------------------------------------- ##
checking for malloc.h... no
checking math.h usability... no
checking math.h presence... yes
configure: WARNING: math.h: present but cannot be compiled
configure: WARNING: math.h:     check for missing prerequisite headers?
configure: WARNING: math.h: see the Autoconf documentation
configure: WARNING: math.h:     section "Present But Cannot Be Compiled"
configure: WARNING: math.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.launchpad.net/abinit/ ##
configure: WARNING:     ## ------------------------------------------------- ##
checking for math.h... no
checking termios.h usability... no
checking termios.h presence... yes
configure: WARNING: termios.h: present but cannot be compiled
configure: WARNING: termios.h:     check for missing prerequisite headers?
configure: WARNING: termios.h: see the Autoconf documentation
configure: WARNING: termios.h:     section "Present But Cannot Be Compiled"
configure: WARNING: termios.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.launchpad.net/abinit/ ##
configure: WARNING:     ## ------------------------------------------------- ##
checking for termios.h... no
checking errno.h usability... no
checking errno.h presence... yes
configure: WARNING: errno.h: present but cannot be compiled
configure: WARNING: errno.h:     check for missing prerequisite headers?
configure: WARNING: errno.h: see the Autoconf documentation
configure: WARNING: errno.h:     section "Present But Cannot Be Compiled"
configure: WARNING: errno.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.launchpad.net/abinit/ ##
configure: WARNING:     ## ------------------------------------------------- ##
checking for errno.h... no
checking mcheck.h usability... no
checking mcheck.h presence... yes
configure: WARNING: mcheck.h: present but cannot be compiled
configure: WARNING: mcheck.h:     check for missing prerequisite headers?
configure: WARNING: mcheck.h: see the Autoconf documentation
configure: WARNING: mcheck.h:     section "Present But Cannot Be Compiled"
configure: WARNING: mcheck.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.launchpad.net/abinit/ ##
configure: WARNING:     ## ------------------------------------------------- ##
checking for mcheck.h... no
checking for abort... no

Although configure is finished, soon after typing make the installation stops claiming that C compiler cannot create executables.
Thanks in advance for any help.

Camilo.
Attachments
config.log
Full config.log file
(169.21 KiB) Downloaded 399 times

User avatar
Alain_Jacques
Posts: 279
Joined: Sat Aug 15, 2009 9:34 pm
Location: Université catholique de Louvain - Belgium

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by Alain_Jacques » Wed Oct 20, 2010 10:19 am

Hello Camillo,

It isn't the right way to configure Abinit anymore i.e. don't mix mpi compilers with FC or CC variables. Mpi compilers will call the backend compiler. So a sample configure invocation line should look like

Code: Select all

../configure
--with-64bit-flags="yes"
--enable-mpi="yes"
--with-mpi-prefix=/PathToMpiRoot
FCFLAGS=ifyouneedthem
FC_LDFLAGS_EXTRA=ifyouneedthem


Before invoking configure, you should source the script that setups Intel compilers i.e. source /opt/intel/Compiler/.../bin/ifortvars.sh intel64
and /PathToMpiRoot is the path where MPI binaries and libs associated with Intel compilers reside i.e. in /PathToMpiRoot/bin/ and /PathToMpiRoot/lib/
no CC or FC ... configure should pick the righ compiler from mpif90 and mpicc
If it works like that, you may tune i further to add MKL, optimizations ... but that's another story

Kind regards,

Alain

cespejo
Posts: 21
Joined: Fri Feb 26, 2010 8:12 pm

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by cespejo » Wed Oct 20, 2010 8:14 pm

Dear Alain,
Thanks! I've done what you suggested for the configuration. Also In my .bashrc I source the ifortvars.sh and export Paths and set library paths also. However I'm getting the same problem: although using --with-mpi-prefix the correct compilers are chosen, there is the same list of warnings at advanced compiler features section of configure, and next in Connectors it is claimed that MPI support is not usable, furthermore after make compilation stops claiming that C compiler connot generate executables.
Later I changed to openmpi-gcc and set properly my .bashrc getting the same results (I take care of logout the machine and login again in order to mpi-selector-menu adjusts the parallel environment).
Thanks again for any help.

Camilo.

User avatar
Alain_Jacques
Posts: 279
Joined: Sat Aug 15, 2009 9:34 pm
Location: Université catholique de Louvain - Belgium

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by Alain_Jacques » Wed Oct 20, 2010 11:31 pm

Ok Camillo, a small exercise then ...

Create a file with this small MPI C program ...

Code: Select all

#include <stdio.h>
#include <mpi.h>

int main(int argc, char *argv[]) {
  int numprocs, rank, namelen;
  char processor_name[MPI_MAX_PROCESSOR_NAME];

  MPI_Init(&argc, &argv);
  MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Get_processor_name(processor_name, &namelen);

  printf("Process %d on %s out of %d\n", rank, processor_name, numprocs);

  MPI_Finalize();
}

Setup your parallel environment, compile with mpicc and run with mpirun (let's say with -np 4 to request 4 slots). Does it work? As long as it doesn't, Abinit configure cannot get past the mpi c consistency test.


Alain

User avatar
Alain_Jacques
Posts: 279
Joined: Sat Aug 15, 2009 9:34 pm
Location: Université catholique de Louvain - Belgium

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by Alain_Jacques » Wed Oct 20, 2010 11:35 pm

... Sorry CamiLo - I'll never get "Don Camillo" (http://en.wikipedia.org/wiki/Don_Camillo) out of my head. :oops:

Alain

cespejo
Posts: 21
Joined: Fri Feb 26, 2010 8:12 pm

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by cespejo » Thu Oct 21, 2010 6:09 pm

Dear Alain,
It was compiled without complains, and here is the execution log:

Code: Select all

 mpirun -hostfile ./myhosts -np 4 a.out 
Process 1 on node001 out of 4
Process 3 on node001 out of 4
Process 0 on node001 out of 4
Process 2 on node001 out of 4

So I think that the mpi and c compiler are working.

PD. wow now I know that the tv series Don Camilo at the end of the 80s in Colombia was indeed an adaptation of
the original Don Camillo to the political weather in the 50s, when rivalry among liberal and conservative parties drove the country
to a violent course ;)

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

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by pouillon » Thu Oct 21, 2010 7:45 pm

I've looked into your config.log. You're getting these warnings because you're using GCC 4.1, which is not supported by the build system of Abinit. A quick fix would be to specify the CFLAGS at configure-time yourself.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

cespejo
Posts: 21
Joined: Fri Feb 26, 2010 8:12 pm

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by cespejo » Thu Oct 21, 2010 8:47 pm

Thanks Yann. However, the problem persists working with ifort 11.1
Cheers.
Camilo.

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

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS  [SOLVED]

Post by pouillon » Fri Oct 22, 2010 11:33 am

You have to make sure that mpicc is connected to icc, not to gcc. If "mpicc --version" tells you about GCC, then you know why it keeps giving you these warnings.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

cespejo
Posts: 21
Joined: Fri Feb 26, 2010 8:12 pm

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by cespejo » Mon Oct 25, 2010 6:23 pm

Thanks Yann, certainly it is the problem, we have not the icc compiler!
So, neither the mpi-gcc nor the mpi-intel work due to different reasons (gcc version on one hand and lack of icc on the other)
I'm updating the gcc compilers now :)
Cheers,
Camilo.

myid520@163.com
Posts: 1
Joined: Mon Oct 25, 2010 9:48 pm

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by myid520@163.com » Mon Oct 25, 2010 10:04 pm

pouillon wrote:I've looked into your config.log. You're getting these warnings because you're using GCC 4.1, which is not supported by the build system of Abinit. A quick fix would be to specify the CFLAGS at configure-time yourself.

Yes. You must remove '-mtune=native -march=native' in the CFLAGS to enable-plugins successfully.
(the defauls CFLAGS seems "-fixed -g -extend-source -vec-report0 -noaltparam -nofpscomp -O3 -xHost -ip -no-prec-div")
Actually, I found icc does not work too if do not remove those keys in CFLAGS.
I want to know the defauls CFLAGS is for which type C compilers?
Zhenhua Zeng

cespejo
Posts: 21
Joined: Fri Feb 26, 2010 8:12 pm

Re: Compiling Abinit 6.4.1 in HPC cluster CentOS

Post by cespejo » Mon Oct 25, 2010 11:19 pm

Thanks a lot Zhenhua! It compiled cleanly with gcc after, as Yann said, adjusting CFLAGS as you suggested :D

Camilo.

Locked