Page 1 of 1

ABI_UNUSED failing for intel 19 with debug mode

Posted: Fri Jan 31, 2020 5:27 pm
by jzwanzig
Hi, I can compile abinit 9.0.0 with gcc in debug mode "enhanced", but not with intel 19, because of the ABI_UNUSED macro. I believe the problem is that m_xmpi.F90 uses this macro, and is compiled under directory "12_hide_mpi", but the routine "unused_var" that the macro calls is not defined until directory "16_hideleave" so cannot be accessed. The compiler error message is that "unused_var" called from "m_xmpi" is not defined.

Can I move directory "16_hideleave" to earlier in the build chain?

thanks,
Joe

Re: ABI_UNUSED failing for intel 19 with debug mode  [SOLVED]

Posted: Mon Feb 03, 2020 3:44 pm
by gmatteo
Hi Joe,
Can I move directory "16_hideleave" to earlier in the build chain?

m_xmpi is a low-level module, a tiny wrapper around the MPI library.
In principle, m_xmpi should not use other Abinit modules except for basic stuff such as
defs_basis and m_profiling_abi.

Moving m_errors below 12_hide_mpi will lead to circular dependencies (m_errors uses m_xmpi)
so I would prefer to maintain the present organization of the modules.

I would suggest to replace all the occurrences of ABI_USED(var) in m_xmpi with e.g.

if (.False.) write(std_out, var)

This should be enough to make the abirules test happy and make the code compile in .debug mode.

Matteo

Re: ABI_UNUSED failing for intel 19 with debug mode

Posted: Mon Feb 03, 2020 7:46 pm
by jzwanzig
Thanks Matteo that work-around seems to be fine.

Joe