debug mode gives memory overflow in memocc [SOLVED]
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.
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.
debug mode gives memory overflow in memocc
Hello all (Matteo? Yann? in particular?)
when turning on debug "naughty" you get segfaults inside memocc - the padding functions are being called with ndebug=5 on small arrays with less than 5 elements, which gives a negative address:
==4821== Invalid write of size 4
==4821== at 0x11C9DCB0: __m_profiling_NMOD_i_padding (memocc_cpp.f90:820)
==4821== by 0x11C9E280: __m_profiling_NMOD_mo_i1 (memocc_cpp.f90:1075)
==4821== by 0x11358BF0: __m_ab6_mixing_NMOD_ab6_mixing_new (m_ab6_mixing_cpp.f90:736)
==4821== by 0x10235F50: scfcv (scfcv_cpp.f90:1001)
==4821== by 0x100DD268: *scfcv_stub_in_scfcv_new (in /gpfs/storage/home/ulg32/ulg32347/CODES/ABINIT/6.7.1-private/tmp-seq/src/98_main/abinit)
==4821== by 0x100DEA64: scfcv_new (scfcv_new_cpp.f90:681)
==4821== by 0x101B46AC: gstate (gstate_cpp.f90:1374)
==4821== by 0x10041A0C: gstateimg (gstateimg_cpp.f90:840)
==4821== by 0x100110F4: driver (driver_cpp.f90:954)
==4821== by 0x100050FC: *driver_stub_in_abinit (abinit_cpp.f90:827)
==4821== by 0x10007290: main (abinit_cpp.f90:827)
ciao
Matthieu
when turning on debug "naughty" you get segfaults inside memocc - the padding functions are being called with ndebug=5 on small arrays with less than 5 elements, which gives a negative address:
==4821== Invalid write of size 4
==4821== at 0x11C9DCB0: __m_profiling_NMOD_i_padding (memocc_cpp.f90:820)
==4821== by 0x11C9E280: __m_profiling_NMOD_mo_i1 (memocc_cpp.f90:1075)
==4821== by 0x11358BF0: __m_ab6_mixing_NMOD_ab6_mixing_new (m_ab6_mixing_cpp.f90:736)
==4821== by 0x10235F50: scfcv (scfcv_cpp.f90:1001)
==4821== by 0x100DD268: *scfcv_stub_in_scfcv_new (in /gpfs/storage/home/ulg32/ulg32347/CODES/ABINIT/6.7.1-private/tmp-seq/src/98_main/abinit)
==4821== by 0x100DEA64: scfcv_new (scfcv_new_cpp.f90:681)
==4821== by 0x101B46AC: gstate (gstate_cpp.f90:1374)
==4821== by 0x10041A0C: gstateimg (gstateimg_cpp.f90:840)
==4821== by 0x100110F4: driver (driver_cpp.f90:954)
==4821== by 0x100050FC: *driver_stub_in_abinit (abinit_cpp.f90:827)
==4821== by 0x10007290: main (abinit_cpp.f90:827)
ciao
Matthieu
Matthieu Verstraete
University of Liege, Belgium
University of Liege, Belgium
Re: debug mode gives memory overflow in memocc
Do you mean on IBM architecture with XLF 12?
If yes, the naughty flags have not been tested very well there. Feel free to adjust them.
If yes, the naughty flags have not been tested very well there. Feel free to adjust them.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain
Simune Atomistics
Donostia-San Sebastián, Spain
Re: debug mode gives memory overflow in memocc
no - this has nothing to do with xlf I believe. The naughty level of abinit calls the debug routines, and the "5" is hard coded. If you pass it an array with less than 5 elements, it tries to pad them anyway and segfaults.
M.
M.
Matthieu Verstraete
University of Liege, Belgium
University of Liege, Belgium
Re: debug mode gives memory overflow in memocc
Then you just should remove the corresponding flag.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain
Simune Atomistics
Donostia-San Sebastián, Spain
Re: debug mode gives memory overflow in memocc
Yes - as far as I am concerned, I just stopped using debug=naughty and I am fine, but this is an authentic bug - the number of padded elements should be checked to be <= the total number of elements...
Matthieu Verstraete
University of Liege, Belgium
University of Liege, Belgium
Re: debug mode gives memory overflow in memocc [SOLVED]
Sorry, I had misunderstood your point. I thought the padding size was coming from the debug flags.
Damien has been informed.
Damien has been informed.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain
Simune Atomistics
Donostia-San Sebastián, Spain