geoschem / GCHP

The "superproject" wrapper repository for GCHP, the high-performance instance of the GEOS-Chem chemical-transport model.
https://gchp.readthedocs.io
Other
23 stars 27 forks source link

GCHP 14.3.1/gcc-13.2.0 compilation error - f951: internal compiler error: Segmentation fault #458

Closed cbutenhoff closed 3 weeks ago

cbutenhoff commented 3 weeks ago

Your name

Chris Butenhoff

Your affiliation

Portland State University

What happened? What did you expect to happen?

When compiling GCHP 14.3.1 with the GNU compilers v13.2.0, I get the following compilation error:

...
[ 60%] Built target MAPL.profiler
[ 64%] Built target MAPL.pfio
[ 64%] Building Fortran object src/MAPL/base/CMakeFiles/MAPL.base.dir/MAPL_LatLonToLatLonRegridder.F90.o
[ 64%] Building Fortran object src/MAPL/base/CMakeFiles/MAPL.base.dir/MAPL_VotingRegridder.F90.o
f951: internal compiler error: Segmentation fault
0xd0a31f crash_signal
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/toplev.cc:314
0x794185 gfc_expression_rank(gfc_expr*)
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/resolve.cc:5643
0x794334 gfc_op_rank_conformable(gfc_expr*, gfc_expr*)
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/resolve.cc:5676
0x6da637 eval_intrinsic
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/arith.cc:1674
0x752506 match_add_operand
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/matchexp.cc:394
0x75273f match_level_2
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/matchexp.cc:480
0x752906 match_level_3
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/matchexp.cc:551
0x752a42 match_level_4
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/matchexp.cc:599
0x752a42 match_and_operand
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/matchexp.cc:693
0x752c26 match_or_operand
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/matchexp.cc:722
0x752d36 match_equiv_operand
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/matchexp.cc:765
0x752e48 match_level_5
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/matchexp.cc:811
0x751f54 gfc_match_expr(gfc_expr**)
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/matchexp.cc:870
0x748b73 gfc_match(char const*, ...)
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/match.cc:1131
0x74ab91 gfc_match_assignment()
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/match.cc:1330
0x779582 match_word
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/parse.cc:67
0x779582 decode_statement
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/parse.cc:363
0x77f9cc next_free
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/parse.cc:1406
0x77f9cc next_statement
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/parse.cc:1638
0x783bd0 parse_executable
        /tmp/spack/spack-stage/spack-stage-gcc-13.2.0-nwlx3a7vw22szxlxoaw7ulh3ehhcjgvu/spack-src/gcc/fortran/parse.cc:6024
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://github.com/spack/spack/issues> for instructions.
make[2]: *** [src/MAPL/base/CMakeFiles/MAPL.base.dir/build.make:634: src/MAPL/base/CMakeFiles/MAPL.base.dir/MAPL_LatLonToLatLonRegridder.F90.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:4756: src/MAPL/base/CMakeFiles/MAPL.base.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

What are the steps to reproduce the bug?

Please attach any relevant configuration and log files.

compile.log CMakeCache.txt

What GCHP version were you using?

14.3.1

What environment were you running GCHP on?

Local cluster

What compiler and version were you using?

gcc 13.2.0

What MPI library and version were you using?

openmpi 4.1.4

Will you be addressing this bug yourself?

No

Additional information

Our cluster OS and packages were recently updated. Before the upgrade I was able to successfully compile GCHP 14.3.1 with gcc-12.1.0 so I suspect it might be a compiler bug.

lizziel commented 3 weeks ago

Thanks @cbutenhoff for reporting this. I will update ReadTheDocs to specify we currently only support up to GCC 12. As discussed in https://github.com/geoschem/GCHP/issues/326, NASA GMAO has reported that GCC 13 does not work well with their libraries, including MAPL. This will change when we update to MAPL3 in GCHP v15.0 next year.

yantosca commented 3 weeks ago

Thanks @cbutenhoff and @lizziel. I suspect it is that the GCC 13 might have deprecated/removed some type of feature that is still in use, and that is the error. The newer compilers skew towards the newer C-language and Fortran-language standards, which can make backwards compatibility challenging.

lizziel commented 3 weeks ago

Docs are now updated in GCHP branch docs/dev which will be merged into 14.5.0.

cbutenhoff commented 2 weeks ago

Thanks for confirming my suspicion @lizziel and @yantosca. I missed that similar report in the previous issue. I'll go back to the earlier GCC version.