modern-fortran / neural-fortran

A parallel framework for deep learning
MIT License
395 stars 82 forks source link

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

Open asandrock opened 11 months ago

asandrock commented 11 months ago

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

milancurcic commented 9 months ago

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.