neural-fortran icon indicating copy to clipboard operation
neural-fortran copied to clipboard

Some tests and examples fail with segmentation fault in serial production build, but not in debug build

Open asandrock opened this issue 1 year ago • 1 comments

I cloned the repository to my laptop and built with the flag -DSERIAL=1; however, several examples (including simple) failed with a segmentation fault, apparently always when calling the subroutine print_info of a new network. However, when I built with -DSERIAL=1 -DCMAKE_BUILD_TYPE=debug to investigate where it fails, the segmentation fault was gone.

System: Ubuntu 20.04.6 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64) Compiler: GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 Build system: CMake 3.26.3

asandrock avatar Sep 21 '23 11:09 asandrock

Hi @asandrock, thank you for reporting. Are you by any chance able to try this with a later version of gfortran? On Ubuntu 22.04 and gfortran 10, 11, 12, I'm unable to reproduce.

milancurcic avatar Dec 01 '23 02:12 milancurcic