evaleev / libint

Libint: high-performance library for computing Gaussian integrals in quantum mechanics
Other
225 stars 95 forks source link

Intel 19.1.1.217 issues #178

Closed ambmax00 closed 4 years ago

ambmax00 commented 4 years ago

Hi, I am using libint2 in my quantum chemistry program. Until now, I have developed it using gcc. Recently, I have compiled everything using the intel compiler (version 19.1.1.217).

It can compute 1-body integrals correctly. However, when I try to compute 2 electron repulsion integrals, it only spits out zeros.

It reminded me of issue #118, but the intel bug seems to have been fixed. Disabling constexpr does not seem to help.

I am computing the integrals in an openmp parallel environment, similar to mpqc, creating a thread pool with intel tbb, and then accessing the local engine.

#pragma omp parallel 
{   
    auto& loc_eng = engine->local();
        const auto &results = loc_eng.results();
                ... 
        loc_eng.compute(sh1,sh2,sh3);

    auto ints_shellsets = results[0];

        if (ints_shellsets != nullptr) {
        size_t idx = 0;
        for (int i = 0; i != sh1.size(); ++i) {
         for (int j = 0; j != sh2.size(); ++j) {
          for (int k = 0; k != sh3.size(); ++k) {
                 blk(i + locblkoff1, j + locblkoff2, k + locblkoff3) // shellblock object
                    = ints_shellsets[idx++]; // <- only outputs zeroes.
            }}}
    }//endif shellsets
         ....
}

Any help would be appreciated.

ambmax00 commented 4 years ago

Nevermind, disabling constexpr statics via LIBINT2_CONSTEXPR_STATICS actually makes it work.