ABI_UNUSED failing for intel 19 with debug mode  [SOLVED]

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
User avatar
jzwanzig
Posts: 504
Joined: Mon Aug 17, 2009 9:25 am

ABI_UNUSED failing for intel 19 with debug mode

Post by jzwanzig » Fri Jan 31, 2020 5:27 pm

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
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

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

Post by gmatteo » Mon Feb 03, 2020 3:44 pm

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

User avatar
jzwanzig
Posts: 504
Joined: Mon Aug 17, 2009 9:25 am

Re: ABI_UNUSED failing for intel 19 with debug mode

Post by jzwanzig » Mon Feb 03, 2020 7:46 pm

Thanks Matteo that work-around seems to be fine.

Joe
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com

Locked