GithubHelp home page GithubHelp logo

Comments (14)

WHUweiqingzhou avatar WHUweiqingzhou commented on August 23, 2024

@maki49 could you have a look?

from abacus-develop.

maki49 avatar maki49 commented on August 23, 2024

No such problem in my environment (commit bec5e64) with symmetry_prec=1e-4, 1e-5, 1e-6, 1e-7.
1e-4.txt
1e-5.txt
1e-6.txt
1e-7.txt

from abacus-develop.

hongriTianqi avatar hongriTianqi commented on August 23, 2024

The same commit was used in my calculation, as can be seen here:
https://app.bohrium.dp.tech/abacustest/?request=GET%3A%2Fapplications%2Fabacustest%2Fjobs%2Fjob-abacustest-v0.3.113-903c30
in a directory like: /outputs/results/Co2/LCAO1/eos0

The image of registry.dp.tech/deepmodeling/abacus-intel:latest was used with the command of:

OMP_NUM_THREADS=1 mpirun -np 16 abacus | tee out.log

from abacus-develop.

maki49 avatar maki49 commented on August 23, 2024

The image of registry.dp.tech/deepmodeling/abacus-intel:latest was used with the command of:

OMP_NUM_THREADS=1 mpirun -np 16 abacus | tee out.log

I cannot reproduce this problem using docker with the same image and command on my server. Everything goes well with symmetry=1, 0 and above values of symmetry_prec.

from abacus-develop.

hongriTianqi avatar hongriTianqi commented on August 23, 2024

But I can reproduce the error on my local machine with the same commit ...

from abacus-develop.

hongriTianqi avatar hongriTianqi commented on August 23, 2024

The debug line:

                    restrict_kpt(kvec_rot_k);

                    std::cout << kvec_rot.x << " " << kvec_rot_k.x << std::endl;

                    assert(symm.equal(kvec_rot.x, kvec_rot_k.x));

gives result of:

-0.499999 -0.499999
0.5 -0.499999

from abacus-develop.

maki49 avatar maki49 commented on August 23, 2024

-0.499999 -0.499999
0.5 -0.499999

"-0.499999" is abnormal after restrict_kpt and does not appear in my debug. This function restricts the k-point direct coordinate to (-0.5, 0.5] with a small positive symmetry_prec.
Are you using a zero or negative symmetry_prec? It can reproduce this problem. Maybe a range check with symmetry_prec should be added to Input::Check.

from abacus-develop.

hongriTianqi avatar hongriTianqi commented on August 23, 2024

No, the symmetry_prec is default value 1e-6. I did not set this key in the INPUT.

from abacus-develop.

hongriTianqi avatar hongriTianqi commented on August 23, 2024

Actually, the output value is also 1e-6:

UNIFORM GRID DIM        : 30 * 30 * 30
 UNIFORM GRID DIM(BIG)   : 10 * 10 * 10
 DONE(0.165567   SEC) : SETUP UNITCELL
symm.epsilon = 1e-06
-0.499999 -0.499999
0.5 -0.499999

from abacus-develop.

maki49 avatar maki49 commented on August 23, 2024

Does this problem still appear on your machine with symmetry_prec=1e-5 or 1e-4?
I have no other idea... May this result from a 32-bit system?

from abacus-develop.

hongriTianqi avatar hongriTianqi commented on August 23, 2024

Thanks. I making an image on Bohrium for you to reproduce this error. I have added more debug lines according to your information:

    auto restrict_kpt = [&symm](ModuleBase::Vector3<double> &kvec){
        // in (-0.5, 0.5]
        std::cout << "initial = " << kvec.x << std::endl;
        kvec.x = fmod(kvec.x + 100.5-0.5*symm.epsilon, 1)-0.5+0.5*symm.epsilon;
        std::cout << "after = " << kvec.x << std::endl;
        kvec.y = fmod(kvec.y + 100.5-0.5*symm.epsilon, 1)-0.5+0.5*symm.epsilon;
        kvec.z = fmod(kvec.z + 100.5-0.5*symm.epsilon, 1)-0.5+0.5*symm.epsilon;
        // in [0, 1)
        // kvec.x = fmod(kvec.x + 100 + symm.epsilon, 1) - symm.epsilon;
        // kvec.y = fmod(kvec.y + 100 + symm.epsilon, 1) - symm.epsilon;
        // kvec.z = fmod(kvec.z + 100 + symm.epsilon, 1) - symm.epsilon;
        if(std::abs(kvec.x) < symm.epsilon) kvec.x = 0.0;
        if(std::abs(kvec.y) < symm.epsilon) kvec.y = 0.0;
        if(std::abs(kvec.z) < symm.epsilon) kvec.z = 0.0;
        return;
    };

Gives the results of:

symm.epsilon = 1e-06
initial = 2.83324e+179
after = -0.499999
initial = -0.499999
after = -0.499999
initial = 2.83324e+179
after = -0.499999
-0.499999 -0.499999
initial = 0.499999
after = 0.5
initial = -2.83324e+179
after = -0.499999
0.5 -0.499999

from abacus-develop.

maki49 avatar maki49 commented on August 23, 2024

So the problem lies in the initial value. Neither -2.83324e+179 nor -0.499999 appears in my debug.
(with kspacing=0.13 or 12 12 7 in KPT file)

from abacus-develop.

hongriTianqi avatar hongriTianqi commented on August 23, 2024

So the problem lies in the initial value. Neither -2.83324e+179 nor -0.499999 appears in my debug. (with kspacing=0.13 or 12 12 7 in KPT file)

OK. My setting of KPT is:

K_POINTS
0
Gamma
13 13 13 0 0 0

If I set kspacing 0.13, the bug disappears.

from abacus-develop.

hongriTianqi avatar hongriTianqi commented on August 23, 2024

@maki49 I have found the problem, the KPT file is set as:

K_POINTS
0
Gamma
13 13 13

This is an wrong KPT file. Thanks for your help along the way.

from abacus-develop.

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.