Skip to content
  • Home
  • Recent
Collapse
Brand Logo
CRYSTAL23
Latest v1.0.1
Tutorials Try the Demo Get a License
Tutorials Try the Demo Get a License Instagram
  1. Home
  2. Technical Aspects
  3. Bug Reports
  4. segmentation fault with double free or corruption during SCF

segmentation fault with double free or corruption during SCF

Scheduled Pinned Locked Moved Bug Reports
6 Posts 3 Posters 50 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • andrejscundefined Offline
    andrejscundefined Offline
    andrejsc
    wrote last edited by
    #1

    Hello!
    I was running several jobs with different combinations of FDOCCUP, SPINLOCK, and EIGSHIFT. I abandoned most of them, but two crashed with an error message that I have never seen before. All jobs were using the same external geometry file.

    alpo4_186_mn_conf_01_ddd.out

    alpo4_186_mn_conf_22_ddd.out

    1 Reply Last reply
    0
    • Aleksundefined Offline
      Aleksundefined Offline
      Aleks Expert
      wrote last edited by
      #2

      Dear andrejsc,

      If you have a closer look at the behaviour of the SCF itself, you will notice the following:

      CYC   0 ETOT(AU) -3.272838998405E+04 DETOT -3.27E+04 tst  0.00E+00 PX  1.00E+00
      CYC   1 ETOT(AU) -3.265246918926E+04 DETOT  7.59E+01 tst  0.00E+00 PX  1.00E+00
      CYC   2 ETOT(AU) -3.265127076720E+04 DETOT  1.20E+00 tst  2.43E-01 PX  1.08E+00
      CYC   3 ETOT(AU) -3.251404571451E+04 DETOT  1.37E+02 tst  2.32E+01 PX  1.52E+01
      CYC   4 ETOT(AU) -2.643556189218E+04 DETOT  6.08E+03 tst  2.15E+01 PX  7.55E+02
      CYC   5 ETOT(AU)  7.316550078797E+03 DETOT  3.38E+04 tst  9.30E+03 PX  1.32E+03
      

      The "CYC 5" line is the last that was printed before the simulation crashed and it points to the source of the error - the SCF energy went into the positive. This is not entirely uncommon for larger systems with a somewhat complex magnetic structure. A few things things could be tried based on your input file: i) increasing the mixing percentage of the Fock/KS matrix (keyword FMIXING) or ii) increasing the last two numbers of the integral tolerance (TOLINTEG).
      But if you abandoned the case, might not of immediate use to you, but hopefully to someone else stumbling upon similar errors 🙂

      Cheers,
      Aleks

      Aleksandar Živković, Scientific Assistant
      Department of Earth and Environmental Sciences, LMU Munich, Germany
      Crystal enthusiast

      1 Reply Last reply
      1
      • andrejscundefined Offline
        andrejscundefined Offline
        andrejsc
        wrote last edited by
        #3

        Dear Aleks,
        thank you for helpful suggestoins! The issue of divergence slipped past my attention, as a very similar calculation -- started from the same geometry, with the same values of FDOCCUP and SPINLOCK, but without NODIIS and EIGSHIFT -- converged in just 31 SCF cycles.

        I tested your suggestion of adding to this input FMIXING (I went with 65%) and increasing TOLINTEG to 9 9 9 11 20, but it still diverges:

         CYC   0 ETOT(AU) -3.272838921072E+04 DETOT -3.27E+04 tst  0.00E+00 PX  1.00E+00
         CYC   1 ETOT(AU) -3.265248439176E+04 DETOT  7.59E+01 tst  0.00E+00 PX  1.00E+00
         CYC   2 ETOT(AU) -3.264532086387E+04 DETOT  7.16E+00 tst  3.64E-01 PX  9.98E-01
         CYC   3 ETOT(AU) -3.265874325232E+04 DETOT -1.34E+01 tst  1.16E+00 PX  2.45E+00
         CYC   4 ETOT(AU) -3.264891945690E+04 DETOT  9.82E+00 tst  7.87E-01 PX  2.27E+00
         CYC   5 ETOT(AU) -3.254860144024E+04 DETOT  1.00E+02 tst  4.49E-01 PX  2.71E+01
         CYC   6 ETOT(AU) -3.058859793674E+04 DETOT  1.96E+03 tst  3.20E+00 PX  3.32E+02
         CYC   7 ETOT(AU) -2.155342398855E+04 DETOT  9.04E+03 tst  3.59E+03 PX  1.30E+03
         CYC   8 ETOT(AU) -1.061409920226E+04 DETOT  1.09E+04 tst  6.90E+03 PX  6.97E+02
         CYC   9 ETOT(AU) -1.534233758958E+04 DETOT -4.73E+03 tst  6.48E+03 PX  6.91E+02
         CYC  10 ETOT(AU) -2.109155329839E+04 DETOT -5.75E+03 tst  2.31E+04 PX  5.40E+02
        ...
         CYC  20 ETOT(AU) -2.714221021396E+04 DETOT  1.99E+01 tst  1.56E+02 PX  3.07E+02
         CYC  21 ETOT(AU) -2.682694963926E+04 DETOT  3.15E+02 tst  7.09E+01 PX  2.97E+02
        

        I guess, there is just no simple way of forcing a particular spin configuration AND a particular charge state to an ion 🙂

        1 Reply Last reply
        0
        • Aleksundefined Offline
          Aleksundefined Offline
          Aleks Expert
          wrote last edited by
          #4

          Dear andrejsc,
          Indeed, every system behaves slightly different and there is no "one size fits all" rule as to how to stabilize the SCF 🙂 I would suggest testing further increasing the last two TOLINTEG numbers, as they are crucial. Something like 8 8 8 20 40 might be needed. A higher FMIXING could be tested as well, but one has to be careful not to get stuck in an unphysical solution then.
          Cheers,
          Aleks

          Aleksandar Živković, Scientific Assistant
          Department of Earth and Environmental Sciences, LMU Munich, Germany
          Crystal enthusiast

          1 Reply Last reply
          0
          • andrejscundefined Offline
            andrejscundefined Offline
            andrejsc
            wrote last edited by
            #5

            What is the point of setting any value of TOLINTEG past 20?
            A quote from the manual:

            CRYSTAL adopts truncation criteria for Coulomb and exchange sums: to remove them,
            in input block 3 insert:
            TOLINTEG
            20 20 20 20 20
            

            Or is this particular set of values a hard-coded switch, like the line "99 0" that terminates the basis set input?

            1 Reply Last reply
            😮
            0
            • GiacomoAmbrogioundefined Offline
              GiacomoAmbrogioundefined Offline
              GiacomoAmbrogio Developer
              wrote last edited by
              #6

              Hi andrejsc,
              There is no "hardcoded" switch in the TOLINTEG keyword, I suspect that the quote from the manual comes from the "old days", when a threshold of \( 10^{-20} \) was considered absurdly small. However, with advances in hardware and the increasingly complex structures we want to compute, such thresholds are sometimes necessary.

              A small note: don't warry about going past machine precision with these small numbers. All evaluations of integral thresholds in the code are performed at the logaritmic level (ie only on the exponent), so you should be fine even with a value of 1 million in TOLINTEG (though maybe not fine in terms of computation time)

              Giacomo Ambrogio, PhD Student
              Department of Chemistry - University of Torino
              V. Giuria 5, 10125 Torino (Italy)

              1 Reply Last reply
              2

              Powered by Crystal Solutions
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Home
              • Recent