xmalloc.h not found and segmentation fault
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.
xmalloc.h not found and segmentation fault
I tried to compile abinit 6.12.3 with default settings (mpi not enable) and got an error with "xmalloc.h" not found. Then I tried to download "xmalloc.h" from internet and copied to {abinit-src}/fallbacks/exports/include/. the compilation finished without error. However when i run abinit i got an "segmentation fault" error.
Tried it on both ubuntu and scientific linux and got the same error.
Can anyone help?
Thanks.
Tried it on both ubuntu and scientific linux and got the same error.
Can anyone help?
Thanks.
Re: xmalloc.h not found and segmentation fault
There should be no error because xmalloc.h is within the sources of Abinit. The segmentation fault you get is normal because you have downloaded an incompatible version.
You'll find xmalloc.h in ~abinit/src/02_clib/. If your problem persists, try configuring with the following option:
We'll not be able to help you more without more information about your build environment.
You'll find xmalloc.h in ~abinit/src/02_clib/. If your problem persists, try configuring with the following option:
Code: Select all
CPPFLAGS_EXTRA='-I$(abinit_srcdir)/src/02_clib'
We'll not be able to help you more without more information about your build environment.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain
Simune Atomistics
Donostia-San Sebastián, Spain
Re: xmalloc.h not found and segmentation fault
pouillon,
Thank you for your help. I just checked the source code directory and found there's no xmalloc.h included within the source code tree. Only xmalloc.c is under src/02_clib. The source code i used to compile abinit is from abinit-6.12.3.tar.gz, which was downloaded from abinit web site. This is quite strange. In the mean time I am downloading the source package abinit-6.12.3.tar.gz again from the web site. I will let you know whether xmalloc.h is included or not.
By the way, if it's possible could you please reply with xmalloc.h as attachment?
Thanks a lot.
Thank you for your help. I just checked the source code directory and found there's no xmalloc.h included within the source code tree. Only xmalloc.c is under src/02_clib. The source code i used to compile abinit is from abinit-6.12.3.tar.gz, which was downloaded from abinit web site. This is quite strange. In the mean time I am downloading the source package abinit-6.12.3.tar.gz again from the web site. I will let you know whether xmalloc.h is included or not.
By the way, if it's possible could you please reply with xmalloc.h as attachment?
Thanks a lot.
Re: xmalloc.h not found and segmentation fault
pouillon,
it's confirmed that xmalloc.h is not included in the abinit-6.12.3.tar.gz from abinit website, only xmalloc.c is included.
Could you please reply with xmalloc.h as an attachment?
By the way, could anyone from abinit team check this issue?
thanks.
it's confirmed that xmalloc.h is not included in the abinit-6.12.3.tar.gz from abinit website, only xmalloc.c is included.
Could you please reply with xmalloc.h as an attachment?
By the way, could anyone from abinit team check this issue?
thanks.
Re: xmalloc.h not found and segmentation fault
/* xmalloc.h -- memory allocation that aborts on errors. */
/*
* Copyright (C) 2009-2012 ABINIT group (MG)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _XMALLOC_H_
#define _XMALLOC_H_
extern void* xmalloc (size_t);
extern void* xrealloc (void *, size_t);
extern void xfree (void *);
#endif /* _XMALLOC_H_ */
/*
* Copyright (C) 2009-2012 ABINIT group (MG)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _XMALLOC_H_
#define _XMALLOC_H_
extern void* xmalloc (size_t);
extern void* xrealloc (void *, size_t);
extern void xfree (void *);
#endif /* _XMALLOC_H_ */
Re: xmalloc.h not found and segmentation fault
Thank you, gmatteo.
copy xmalloc.h into src/02_clib/ then everything works OK.
This xmalloc.h nightmare wastes me around a week's time. How can xmalloc.h not be in the source code package abinit-6.12.3.tar.gz while xmalloc.c is? What a mystery! But I'll leave that to the abinit team to figure it out.
gmatteo & pouillon, thanks a lot for your help.
copy xmalloc.h into src/02_clib/ then everything works OK.
This xmalloc.h nightmare wastes me around a week's time. How can xmalloc.h not be in the source code package abinit-6.12.3.tar.gz while xmalloc.c is? What a mystery! But I'll leave that to the abinit team to figure it out.
gmatteo & pouillon, thanks a lot for your help.