When generating Libint with the compiler, the struct Libint_t in libint2_types.h doesn't always contain the right number of aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up* fields. The index at the end of the field name is expected to run from 0 to LIBINT_MAX_AM_4 + max(INCLUDE_ERI, INCLUDE_ERI2, INCLUDE_ERI3). Instead, the fields are present only up to LIBINT_MAX_AM_4 + INCLUDE_ERI, which causes problems if INCLUDE_ERI2 > INCLUDE_ERI or INCLUDE_ERI3 > INCLUDE_ERI.
The config parameters we were using were ../libint/configure '--with-cxx=g++ -std=c++0x' '--with-cxx-optflags=-O2 -fPIC' '--enable-eri=1' '--enable-eri2=3' '--enable-eri3=1' '--with-max-am=5' '--with-opt-am=4' '--disable-unrolling' '--enable-generic-code' '--enable-contracted-ints' '--with-pic'. As a workaround, we increased --enable-eri to 3, which solved the problem, but increased compilation time considerably.
When generating Libint with the compiler, the struct Libint_t in libint2_types.h doesn't always contain the right number of aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up* fields. The index at the end of the field name is expected to run from 0 to LIBINT_MAX_AM_4 + max(INCLUDE_ERI, INCLUDE_ERI2, INCLUDE_ERI3). Instead, the fields are present only up to LIBINT_MAX_AM_4 + INCLUDE_ERI, which causes problems if INCLUDE_ERI2 > INCLUDE_ERI or INCLUDE_ERI3 > INCLUDE_ERI.
The config parameters we were using were ../libint/configure '--with-cxx=g++ -std=c++0x' '--with-cxx-optflags=-O2 -fPIC' '--enable-eri=1' '--enable-eri2=3' '--enable-eri3=1' '--with-max-am=5' '--with-opt-am=4' '--disable-unrolling' '--enable-generic-code' '--enable-contracted-ints' '--with-pic'. As a workaround, we increased --enable-eri to 3, which solved the problem, but increased compilation time considerably.