focus icon indicating copy to clipboard operation
focus copied to clipboard

`gfortran` segementation fault on compilation

Open robbmcleod opened this issue 7 years ago • 1 comments

Installing Focus on Ubuntu 16.04 results in some segmentation fault in building the CCP-EM Fortran backend. I suspect it is a version issue as I don't remember having similar problems in the past with 2dx in older Ubuntu versions. From 14.04 to 16.04, the default compiler went from gcc 4.8 to 5. so perhaps there is some problems with the newer gfortran that comes with it?

* sudo apt-get install gfortran-5 gfortran-5-multilib

[  9%] Built target 2dx_stack_processor
[ 10%] Built target add_noise
[ 10%] Built target fsplit
[ 10%] Generating miscsubs.for
e02daf.f
e02daz.f
e02dbf.f
e02zaf.f
e02zaz.f
ea06c.f
ea08c.f
ea09c.f
fa01as.f
Segmentation fault (core dumped)
kernel/mrc/lib/CMakeFiles/misc.dir/build.make:73: recipe for target 'kernel/mrc/lib/miscsubs.for' failed
make[2]: *** [kernel/mrc/lib/miscsubs.for] Error 139
CMakeFiles/Makefile2:874: recipe for target 'kernel/mrc/lib/CMakeFiles/misc.dir/all' failed
make[1]: *** [kernel/mrc/lib/CMakeFiles/misc.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
Build failed for Focus

$ gfortran --version
GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

Attempting direct compilation of the offending file gives the following errors:

gfortran -std=legacy kernel/mrc/lib/miscsubs.for 
kernel/mrc/lib/miscsubs.for:1907:11:

      *  ' =',I6)
           1
Error: Unexpected element ‘=’ in format string at (1)
kernel/mrc/lib/miscsubs.for:1907:6:

      *  ' =',I6)
      1
Error: Bad continuation line at (1)
kernel/mrc/lib/miscsubs.for:1907:9:

      *  ' =',I6)
         1
Error: Invalid character in name at (1)
kernel/mrc/lib/miscsubs.for:940:8:

 10    W(2)=A(2,2)
        1

Error: FORMAT label 99999 at (1) not defined
kernel/mrc/lib/miscsubs.for:2664:8:

       W(7)=0.D0

robbmcleod avatar May 16 '17 20:05 robbmcleod