GithubHelp home page GithubHelp logo

Comments (4)

awvwgk avatar awvwgk commented on July 30, 2024 1

Did you set the stacksize for the system as well ulimit -s unlimited?

from dftd4.

iloncaric avatar iloncaric commented on July 30, 2024

I tested it also with executable: "dftd4 --func r2scan --grad dftd4.txt POSCAR" and it also gives segfault. Is there a hardcoded limit to the number of atoms in the unit cell?

from dftd4.

e-kwsm avatar e-kwsm commented on July 30, 2024

Segmentation fault occurs at

dftd4/src/dftd4/ncoord.f90

Lines 171 to 173 in 3844dc1

!$omp parallel do default(none) reduction(+:cn, dcndr, dcndL) &
!$omp shared(mol, trans, cutoff2, rcov, en) &
!$omp private(jat, itr, izp, jzp, r2, rij, r1, rc, countf, countd, sigma, den)

even if OMP_NUM_THREADS is set to 1, and OMP_STACKSIZE to 1G (gfortran 13.2.1, ifort 2021.10.0, and ifx 2023.2.0).

from dftd4.

iloncaric avatar iloncaric commented on July 30, 2024

When I noticed this problem "ulimit -s unlimited" was set, but then when I was making minimal test on PC it was not set. So minimal test could actually work if "ulimit -s unlimited" is set. But if you try to increase the size of the system a bit more, then again there is the segfault. This can be apparently solved by increasing OMP_STACKSIZE.
Since OMP_STACKSIZE cannot be set to unlimited, one might get segfaults until OMP_STACKSIZE is large enough.

You might want to check if there is another way of managing memory to avoid the need for a very large OMP_STACKSIZE. For 10 000 atoms cell OMP_STACKSIZE has to be on the order of OMP_STACKSIZE=3G with 8 threads.

In any case, thanks a lot for the prompt help!

from dftd4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.