"bounds-checking" should be "bounds-check"  [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

"bounds-checking" should be "bounds-check"

Post by jzwanzig » Wed Jan 05, 2011 3:14 pm

Here is an issue in both 6.4.3 and 6.5.2, I can work around it but don't know exactly the best file(s) to fix it in:

the debug "naughty" option for gnu adds the flag "-fbounds-checking" but at least on my gcc/gfortran this is the wrong syntax, it should be "-fbounds-check". As far as I can tell this is set in three files:
config/debug/{fc,cc}_gnu_default-debug.conf
config/m4/auto-debug.m4

I guess all of these need to be changed but I would like Yann or another expert to verify.

BTW why does this option have to be called "naughty"? I am totally aware that lately I have no sense of humor about these things, but while I can live with (and smile about) "paranoid", "naughty" just seems weird. I don't think I'm breaking any rules by using bounds checking as part of the debug process.

Grimly yours,
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
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: "bounds-checking" should be "bounds-check"

Post by pouillon » Wed Jan 05, 2011 4:23 pm

You're right. Looks like -fbounds-checking was correct up to GCC 4.2 only. You should then update config/debug/{fc,cc}_gnu_default-debug.conf, which will allow for the regeneration of config/m4/auto-debug.m4. The latter should not be edited, as it is overwritten each time you run makemake (hence the "auto-" prefix).

The choice of "naughty" as level name comes from that using this option was breaking the build on most architectures when we started to practice this kind of debugging. And it might still do so. ;-)
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

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

Re: "bounds-checking" should be "bounds-check"

Post by jzwanzig » Wed Jan 05, 2011 4:29 pm

Thanks, Yann. Does this mean that additional options need to be added to check for which version of gcc/gfortran is in use, to make the code more portable?
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
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: "bounds-checking" should be "bounds-check"

Post by pouillon » Wed Jan 05, 2011 5:21 pm

You could indeed copy the files into *_gnu_4.2-debug.conf before changing the flags.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

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

Re: "bounds-checking" should be "bounds-check"  [SOLVED]

Post by jzwanzig » Fri Jan 07, 2011 12:33 pm

All done in my 6.5.2-public branch, which last night passed all tests.
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