Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Error: /opt/source/forte/forte/_forte.cpython-39-x86_64-linux-gnu.so: undefined symbol:zheev #347

Open
Chikakoyanagida opened this issue Sep 28, 2023 · 1 comment

Comments

@Chikakoyanagida
Copy link

Hi,

I was trying to compile forte and psi4 with Apptainer. After finishing installing forte and I used pytest. It returns the import error as shown in the title. I thought it was due to a LAPACK problem so I apt installed libblas and liblapack, and also conda installed blas and lapack. The error persisted.

To reproduce my problem, create an Apptainer and install forte as said in the manual.

Thanks in advance!

@fevangelista
Copy link
Member

Thank you for reporting this and sorry for the delay. This is a naming convention issue that depends on the compiler, options, and the operating system. You should be able to fix this issue by renaming zheev to zheev_ in these two places in the file forte/forte/sci/tdci.cc (lines 49 and 971)

/* CHEEV prototype */
extern "C" {
extern void zheev(char* jobz, char* uplo, int* n, std::complex<double>* a, int* lda, double* w,
                  std::complex<double>* work, int* lwork, double* rwork, int* info);
}

and

        zheev(&jobz, &uplo, &n, Hs.data(), &lda, w.data(), work.data(), &lwork, rwork.data(),
              &info);

There is a way to avoid this issue using LAPACKE, but it will need a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants