ABINIT 7.10.2 compilation issues

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
phanousk
Posts: 1
Joined: Tue Jan 13, 2015 4:37 pm

ABINIT 7.10.2 compilation issues

Post by phanousk » Tue Jan 13, 2015 4:59 pm

Greetings,
recently I had to compiled ABINIT 7.10.2 from the sources on Debian 7 with GCC 4.8.1 and OpenMPI 1.8.2 and have the following notices:

1) Line 2756 of file src/57_iovars/chinkp.F90 after the macro expansion is too long for the default fortran behavior. My workaround was to add -ffree-line-length-none parameter to file config/wrappers/wrap-mpifc but maybe it should be solved better in code.

2) After the configuration I had to edit src/98_main/Makefile and to the LIBS variable add "-fopenmp -lfftw3 -lfftw3f -lfftw3_threads -lfftw3f_omp" parameters. Although I had these options included in configuration file (in attachment), it seems that the configure script creates the wrong Makefile. The options are in but have no effect during linking phase because nothing deals with variables where are these options set.

Sincerely Petr
PS: please allow to attach .ac or at least .txt files to the forum topics and sorry for using the "hack" to rename my .ac to .log.
Attachments
build-meta-mpi-gcc.ac.log
configuration file
(31.15 KiB) Downloaded 365 times

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

Re: ABINIT 7.10.2 compilation issues

Post by Jordan » Thu Jan 22, 2015 3:41 pm

Thank you for the report, I'm sure the person in charge of the build system will consider your remarks.

However, for you point 2), I don't see the flag related to fftw3-thread:
The flags are with_fft_libs="-L/software/fftw-3.3/amd64_linux26.omp/lib -lfftw3 -lfftw3f", so the -lfftw3_threads -lfftw3f_omp are missing there.
About why -fopenmp is not taken into account, I don't have any good explanation, the enable_openmp="yes" should be enough.
Note that you define FCFLAGS, FCFLAGS_EXTRA and FCFLAGS_OPENMP while defining FCFLAGS will impose the compilation flags to that value and ignore the others.

Point 1) (related to 2)), with gcc48, the free-line-length-none parameter is automatically detected and set but as you imposed FCFLAGS to only "-O2 -fpic -fopenmp", you removed this flag and restricted the lines to be less than XXX characters.
So to have a better detection, use the enable_XXXX flags and FCFLAGS_XXXXX onlys.

Cheers

Jordan

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

Re: ABINIT 7.10.2 compilation issues

Post by pouillon » Thu Jan 22, 2015 5:49 pm

Point 1) has been fixed in the upcoming Abinit 7.10.4.

Point 2) has been fixed in Abinit 7.11 and will be released in Abinit 8.0.

A little remark: you can use LDFLAGS_EXTRA="-fopenmp" to specific link-time options. The FFTW libraries should however only be specified in with_fft_libs. "-lfftw3_threads" was missing in your configure file, this is why the libraries were ignored.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Locked