Empty lib62_ctqmc.a when building abinit-9.6.2

Hi all, it’s been a long time.

While building the 9.6.2 version of Abinit just downloaded from here, the linker (/usr/bin/ld) complained about not finding quite a bunch of functions while trying to work in src/65_paw and src/68_dmft. Grepping around showed those functions belonged to src/62_ctqmc. It happens that although all the object files in this directory had been compiled, the archive lib62_ctqmc.a was empty.

It was easy to workaround this problem by issuing :
cd src/62_ctqmc/
ar rc lib62_ctqmc.a *.o
ranlib lib62_ctqmc.a
cd …/…
make

Nevertheless, I wonder : could this bug be specific to my machine ? Unfortunately following the exact same steps on my desktop machine I get some uncorrectable building errors… So I can’t really check.

For the Bug I’m reporting the (soft+hard)ware stack was very classical : ubuntu 20.04 + gcc + openmpi on AMD EPYC.
Here are the commands issued:
mkdir tmp
cd tmp
…/configure --with-hdf5 --with-netcdf --with-netcdf-fortran --with-mpi --enable-openmp --with-libxml2
make

The AC9 configuration file contained the following lines :
CC=“mpicc”
FC=“mpif90”
FCFLAGS_OPENMP="-fopenmp"
FCFLAGS_EXTRA="-O2 -march=native -mtune=native -Wall -Wno-maybe-uninitialized -fbacktrace -pedantic -fcheck=all"

Hi PM - great to hear from you again.

My build on my laptop (mac os M1 chip) looks fine, with all .o and .a files present in the ctqmc directory. You have tried

make clean&& make -j 8

just to be sure? If you changed interfaces or modules, sometimes the Makefiles are not quite clever enough to rebuild all of the fortran module dependencies. You might also try re-running makemake as well…

what is this? More worrisome I think

Hi Matthieu,

While my message was waiting spam filter approbation I did some other checking. And, as you’ve guessed, this was some kind of transient error : It happens only once, most likely because of a keyboard to pc interface bug.

My other problem is not that worrisome : I’m used to get some weird behaviors on my old desktop gentoo. Except if it looks familiar to you, please don’t bother to help me about that :
Following precisely the same receipt, I get the following message :

mpif90 -DHAVE_CONFIG_H -I. -I…/…/…/…/…/shared/common/src/17_libtetra_ext -I…/…/…/… -I…/…/…/…/shared/common/src/10_defs -I…/…/…/…/…/shared/common/src/10_defs -I…/…/…/…/shared/common/src/11_memory_mpi -I…/…/…/…/…/shared/common/src/11_memory_mpi -I…/…/…/…/shared/common/src/12_hide_mpi -I…/…/…/…/…/shared/common/src/12_hide_mpi -I…/…/…/…/shared/common/src/14_hidewrite -I…/…/…/…/…/shared/common/src/14_hidewrite -I…/…/…/…/shared/common/src/16_hideleave -I…/…/…/…/…/shared/common/src/16_hideleave -I…/…/…/…/shared/common/src/17_libtetra_ext -I…/…/…/…/…/shared/common/src/17_libtetra_ext -I…/…/…/…/shared/common/src/incs -I…/…/…/…/…/shared/common/src/incs -I…/…/…/…/shared/common/src/mods -I…/…/…/…/…/shared/common/src/mods -I…/…/…/…/src/incs -I…/…/…/…/…/src/incs -I…/…/…/…/src/mods -I…/…/…/…/…/src/mods -I…/…/…/…/shared/libpaw/incs -I…/…/…/…/…/shared/libpaw/incs -I…/…/…/…/shared/libpaw/mods -I…/…/…/…/…/shared/libpaw/mods -ffree-form -J…/mods -O2 -mtune=native -march=native -g -ffree-line-length-none -fallow-argument-mismatch -O2 -march=native -mtune=native -Wall -Wno-maybe-uninitialized -fbacktrace -pedantic -fcheck=all -fopenmp -c -o libtetrabz_common.o …/…/…/…/…/shared/common/src/17_libtetra_ext/libtetrabz_common.F90
…/…/…/…/…/shared/common/src/17_libtetra_ext/libtetrabz_common.F90:805:35:

805 | CALL MPI_allREDUCE(MPI_IN_PLACE, vector, ndim, &
| 1

826 | CALL MPI_allREDUCE(MPI_IN_PLACE, vector, ndim, &
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/COMPLEX(8)).
make[5]: *** [Makefile:1203: libtetrabz_common.o] Error 1
make[5]: Leaving directory ‘/home/anglade/build/abinit-9.6.2/tmp/shared/common/src/17_libtetra_ext’

I’ve the feeling this is quite a classical problem with compiler type checking where they should not. Maybe one extra flag would solve that ?

HI Pierre-Matthieu,

Very strange…
You have correctly put “-fallow-argument-mismatch”

Many posts indicate that this is the solution…
for ex :

For the time being, I use : “-O2 -mtune=native -march=native -g -ffree-line-length-none -fallow-argument-mismatch”

make clean ; */*/makemake ; ...

jmb

Thanks. Looks to be exactly what I was needing. Yet although I’v spelled checked the argument and compared with gfortran manual, it keeps bothering about this (NB : it happens that this option was in fact already included in my command line). Maybe an other kind of error than a mispelling in my command line ? Otherwise, my guess is that it’s kind of an idiosyncrasy from my local libs installation. Don’t bother with that : Abinit is working fine on more standard machine; that’s enough.

make[5]: Entering directory ‘/home/anglade/build/abinit-9.6.2/tmp/shared/common/src/17_libtetra_ext’
mpif90 -DHAVE_CONFIG_H -I. -I…/…/…/…/…/shared/common/src/17_libtetra_ext -I…/…/…/… -I…/…/…/…/shared/common/src/10_defs -I…/…/…/…/…/shared/common/src/10_defs -I…/…/…/…/shared/common/src/11_memory_mpi -I…/…/…/…/…/shared/common/src/11_memory_mpi -I…/…/…/…/shared/common/src/12_hide_mpi -I…/…/…/…/…/shared/common/src/12_hide_mpi -I…/…/…/…/shared/common/src/14_hidewrite -I…/…/…/…/…/shared/common/src/14_hidewrite -I…/…/…/…/shared/common/src/16_hideleave -I…/…/…/…/…/shared/common/src/16_hideleave -I…/…/…/…/shared/common/src/17_libtetra_ext -I…/…/…/…/…/shared/common/src/17_libtetra_ext -I…/…/…/…/shared/common/src/incs -I…/…/…/…/…/shared/common/src/incs -I…/…/…/…/shared/common/src/mods -I…/…/…/…/…/shared/common/src/mods -I…/…/…/…/src/incs -I…/…/…/…/…/src/incs -I…/…/…/…/src/mods -I…/…/…/…/…/src/mods -I…/…/…/…/shared/libpaw/incs -I…/…/…/…/…/shared/libpaw/incs -I…/…/…/…/shared/libpaw/mods -I…/…/…/…/…/shared/libpaw/mods -ffree-form -J…/mods -O2 -mtune=native -march=native -g -ffree-line-length-none -fallow-argument-mismatch -O2 -march=native -mtune=native -Wall -Wno-maybe-uninitialized -fbacktrace -pedantic -fcheck=all -fallow-argument-mismatch -fopenmp -c -o libtetrabz_common.o …/…/…/…/…/shared/common/src/17_libtetra_ext/libtetrabz_common.F90
…/…/…/…/…/shared/common/src/17_libtetra_ext/libtetrabz_common.F90:805:35:

805 | CALL MPI_allREDUCE(MPI_IN_PLACE, vector, ndim, &
| 1

826 | CALL MPI_allREDUCE(MPI_IN_PLACE, vector, ndim, &
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/COMPLEX(8)).
make[5]: *** [Makefile:1203: libtetrabz_common.o] Error 1

Thanks again.

PS : I’m currently compiling gcc 11. Maybe it will be less touchy than gcc 10.

EDIT : same behavior with gcc 11.3. Weird.