Page 1 of 1

ABINIT 7.10.2 compilation issues

Posted: Tue Jan 13, 2015 4:59 pm
by phanousk
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.

Re: ABINIT 7.10.2 compilation issues

Posted: Thu Jan 22, 2015 3:41 pm
by Jordan
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

Re: ABINIT 7.10.2 compilation issues

Posted: Thu Jan 22, 2015 5:49 pm
by pouillon
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.