Skip to content

back_spawn tests failing with SEGFAULT #18

@boegel

Description

@boegel

When building the latest version of NECI (commit 558e88c) with GCC 12.3.0, we're consistently seeing segfaults in the tests, even when a lot of memory is available on the system (~185GB, with 36 cores).

94% tests passed, 6 tests failed out of 96

Total Test time (real) = 372.92 sec

The following tests FAILED:
         22 - test_neci_back_spawn_excit_gen (SEGFAULT)
         23 - test_kneci_back_spawn_excit_gen (SEGFAULT)
         24 - test_dneci_back_spawn_excit_gen (SEGFAULT)
         25 - test_mneci_back_spawn_excit_gen (SEGFAULT)
         26 - test_kdneci_back_spawn_excit_gen (SEGFAULT)
         27 - test_kmneci_back_spawn_excit_gen (SEGFAULT)

More details on test_neci_back_spawn_excit_gen below incl. backtrace, the actual full error is "Program received signal SIGSEGV: Segmentation fault - invalid memory reference." (other tests fail in a very similar way, and always in back_spawn.F90:593):

Details
      Start 22: test_neci_back_spawn_excit_gen
22/96 Test #22: test_neci_back_spawn_excit_gen .............***Exception: SegFault  0.21 sec

 Test module initialized

    . : successful assert,   F : failed assert


 testing: calc_pgen_back_spawn_ueg
 with necessary global data:
 nel:            2
 nOccBeta:            1
 nOccAlpha:            1
 tUEG:  T
 tNoFailAb:  F
 projedet:            1           2
 dSFMT_init()
 niftot:            2
 n_int:            8
 set_flag()
 get_initiator_flag()
 flag:            1
 nBasis:            4
.........
 testing: calc_pgen_back_spawn_hubbard

 testing: calc_pgen_back_spawn_hubbard
 with necessary global data:
 nel:            2
 nOccBeta:            1
 nOccAlpha:            1
 tHub:  T
 projedet:            1           2
 dSFMT_init()
 niftot:            2
 n_int:            8
 set_flag()
 get_initiator_flag()
 IlutBits%ind_flag:            1
 nBasis:            4
.......
 testing: calc_pgen_back_spawn_ueg
 with necessary global data:
 nel:            2
 nBasis:            4
 niftot:            1
 encodebitdet()
 dSFMT_init
......
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x147aa063e6ef in ???
#1  0x420ebe in __back_spawn_MOD_pick_occupied_orbital_ueg
        at /tmp/easybuild_build/NECI/20230620/foss-2023a/NECI_STABLE/src/back_spawn.F90:593
#2  0x425a68 in __back_spawn_excit_gen_MOD_calc_pgen_back_spawn_ueg_new
        at /tmp/easybuild_build/NECI/20230620/foss-2023a/NECI_STABLE/src/back_spawn_excit_gen.F90:284
#3  0x407c4e in calc_pgen_back_spawn_ueg_new_test
        at /tmp/easybuild_build/NECI/20230620/foss-2023a/NECI_STABLE/unit_tests/back_spawn_excit_gen/test_back_spawn_excit_gen.F90:487
#4  0x785d3d in __fruit_MOD_run_test_case_named_
        at /tmp/easybuild_build/NECI/20230620/foss-2023a/NECI_STABLE/unit_tests/fruit_src/fruit.f90:909
#5  0x407108 in back_spawn_excit_gen_test_driver
        at /tmp/easybuild_build/NECI/20230620/foss-2023a/NECI_STABLE/unit_tests/back_spawn_excit_gen/test_back_spawn_excit_gen.F90:29
#6  0x407108 in test_back_spawn_excit_gen
        at /tmp/easybuild_build/NECI/20230620/foss-2023a/NECI_STABLE/unit_tests/back_spawn_excit_gen/test_back_spawn_excit_gen.F90:16
#7  0x407108 in main
        at /tmp/easybuild_build/NECI/20230620/foss-2023a/NECI_STABLE/unit_tests/back_spawn_excit_gen/test_back_spawn_excit_gen.F90:5

Are there any known problems when NECI is built with a recent compiler?
Any suggestions on how to get to the bottom of this, could it be a bug in back_spawn.F90?

Although we've seen very similar problems before with an older version of NECI and GCC 11.3.0 (see easybuilders/easybuild-easyconfigs#17164), we didn't observe these problems when using GCC 12.2.0 to build NECI commit 558e88c, which seems strange to me...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions