Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cbutenhoff opened this issue Nov 5, 2024 · 4 comments
Assignees
Labels
category: Bug Something isn't working TODO: Documentation Improvements or additions to documentation topic: Build Related to makefiles or the build sequence

Comments

@cbutenhoff
Copy link

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?

  • Load my environment modules.
  • Create a new build directory.
  • Cd into build directory.
  • Run cmake.
  • Compile using 'make -j'

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.

@cbutenhoff cbutenhoff added the category: Bug Something isn't working label Nov 5, 2024
@lizziel
Copy link
Contributor

lizziel commented Nov 5, 2024

Thanks @cbutenhoff for reporting this. I will update ReadTheDocs to specify we currently only support up to GCC 12. As discussed in #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.

@lizziel lizziel self-assigned this Nov 5, 2024
@lizziel lizziel added the topic: Build Related to makefiles or the build sequence label Nov 5, 2024
@yantosca yantosca added topic: Containers Relating to environment containers TODO: Documentation Improvements or additions to documentation and removed topic: Containers Relating to environment containers labels Nov 5, 2024
@yantosca
Copy link
Contributor

yantosca commented Nov 5, 2024

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
Copy link
Contributor

lizziel commented Nov 5, 2024

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

@lizziel lizziel closed this as completed Nov 5, 2024
@cbutenhoff
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Something isn't working TODO: Documentation Improvements or additions to documentation topic: Build Related to makefiles or the build sequence
Projects
None yet
Development

No branches or pull requests

3 participants