Skip to content

Segfault for large systems #23

@marvinfriede

Description

@marvinfriede

If one does not increase the stack size for large systems (ulimit -s unlimited), a segmentation fault occurs.

The problem seems to stem from the parallel region in get_amat_0d.

gdb log
(gdb) bt
#0  0x0000000000412d81 in get_amat_0d::L_multicharge_model_mp_get_amat_0d__135__par_loop0_2_6 ()
    at ../src/multicharge/model.F90:135
#1  0x0000000002294eb3 in __kmp_invoke_microtask ()
#2  0x000000000225750c in __kmp_fork_call ()
#3  0x0000000002226ff8 in __kmpc_fork_call ()
#4  0x000000000041298a in multicharge_model::get_amat_0d (self=..., mol=..., amat=...)
    at ../src/multicharge/model.F90:135
#5  0x000000000041e3b7 in multicharge_model::solve (self=0x7fffffffd148, mol=..., cn=..., 
    dcndr=<Fehler beim Lesen der Variable: Location address is not set.>, 
    dcndl=<Fehler beim Lesen der Variable: Location address is not set.>, energy=..., 
    gradient=<Fehler beim Lesen der Variable: Location address is not set.>, 
    sigma=<Fehler beim Lesen der Variable: Location address is not set.>, qvec=..., 
    dqdr=<Fehler beim Lesen der Variable: Location address is not set.>, 
    dqdl=<Fehler beim Lesen der Variable: Location address is not set.>)
    at ../src/multicharge/model.F90:468
#6  0x00000000004089e6 in main () at ../app/main.f90:76
#7  0x00000000004056f2 in main ()

The error vanishes upon removing the OMP directives.

The problem was first raised in dftd4/dftd4#218.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions