precice / calculix-adapter

preCICE-adapter for the CSM code CalculiX
GNU General Public License v3.0
52 stars 20 forks source link

ccx_preCICE just crashes with segmentation fault #53

Closed BenjaminRodenberg closed 3 years ago

BenjaminRodenberg commented 3 years ago

If I run ccx_preCICE -i somenonsenseinput it just crashes with the following error:

$ ccx_preCICE -i somenonsenseinput

************************************************************

CalculiX Version 2.16, Copyright(C) 1998-2019 Guido Dhondt
CalculiX comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
certain conditions, see gpl.htm

************************************************************

You are using an executable made on Mo 25. Nov 18:56:47 CET 2019
ccx_preCICE: malloc.c:4036: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.
Aborted (core dumped)

Note that the vanilla CalculiX (I used the version installed via apt) gives me a different error which is for a user much easier to understand:

$ ccx -i somenonsenseinput

************************************************************

CalculiX Version 2.11, Copyright(C) 1998-2015 Guido Dhondt
CalculiX comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
certain conditions, see gpl.htm

************************************************************

You are using an executable made on So 31. Jul 13:26:31 CEST 2016
*ERROR in readinput: cannot open file somenonsenseinput.inp
BenjaminRodenberg commented 3 years ago

Some more information on this issue:

I've built the adapter on my system installing the required dependencies from apt. It's a Ubuntu 20.04 system. If I run the same command on the docker container precice/calculix-adapter-ubuntu1804.package-develop the error message is good.

I used precice/precice-ubuntu2004.package-develop as a basis for building the CalculiX adapter with this modified Dockerfile.calculix-adapter. Again: The error message looks good. So it looks like there is a system specific problem on my computer.

$ docker build -t benjaminrodenberg/calculix-adapter-ubuntu2004.home-develop -f Dockerfile.calculix-adapter .
$ docker run -ti benjaminrodenberg/calculix-adapter-ubuntu2004.home-develop
BenjaminRodenberg commented 3 years ago

I ran a make clean and another make and now everything seems to work. So: Obviously false alarm.