A previous version of gfortran (6.3.1) did not complain.
It seems to me that the error arises because MPI_TAG_UB is not a constant/parameter, but an attribute whose value should be accessed through MPI_ATTR_GET, similarly to what is done in m_xmpi.F90 .
Thank you for detecting this bug.
Fortunately, the concerned file is not used by Abinit (because abinit uses m_xmpi MPI module ), but only in the standalone version of the PAW library.
To compile abinit with gcc8, just comment temporarily the concerned lines.
The correction has been made and will be available in the next version.
The compilation finishes without problems and the tests are correct.
On Ubuntu 18.04 with default updated gfortran 7.3.0 and mpirun (open mpi) 2.1.1, this problem appears too.
When compiling abinit 8.8.4 with gnu 8.1 and OpenMPI 3.0 but under CentOS 7.5 , compilation succeeds !?!
Then, depends on the OS and/or the compilation of OpenMPI ( the instructions of mpif90 is little different) ?!?
1) The MPI attribute MPI_TAG_UB must be coded by 0 in the MPI implementation.
2) The compiler must be set up to throw an error when it can determine at compile time that the second argument to MOD is zero.
print *, "Couldn't find tag ub!"
The attached patch, though not completely up to the abinit coding standards, wants to do the job intended by the original code. It compiled successfully with my system, though, as per Marc's comment above, even if it is wrong it will not affect abinit's behavior.
Might want to remove .in extension.
I have also encountered the same problem on Ubuntu 18.04. Unfortunately, the patch from Xavier did not work out. Just to be sure that I exclude any stupid moves: how exactly should the patch be implemented during the installation?
then go to your build directory, and perform a standard configure+make , or just make .