Guys,
I’m having trouble compiling Psi4 using AOCC. So far I have installed and enabled a virtual environment for python (3.10.10) in order to separate it from the system python. I have installed numpy, scipy and matplotlib from pip for what it matters. I have downloaded Psi4 from git. AOCC and AOCL are obviously installed as well.
I am using this command to configure:
(venv) kirimu /epyc/aocc/psi4/src/psi4/build # cmake -DCMAKE_INSTALL_PREFIX=/epyc/aocc/psi4 -S. -Bbuild -DLAPACK_LIBRARIES="/epyc/aocc/compat/lib_LP64/libblis-mt.a;/epyc/aocc/compat/lib_LP64/libflame.a" -DCMAKE_Fortran_COMPILER=flang -DCMAKE_Fortran_FLAGS="-mp -fopenmp" -DMAX_AM_ERI=7 --fresh
AOCL libs seem to be found and enabled correctly. I also get the information that OpenMP is found. Then the build and install commands are pretty straightforward:
cd build/
cmake --build . -j24
cmake --install . --prefix /epyc/aocc/psi4
Compilation finishes without error, but when I try to load the psi4 module in python I get this:
(venv) kirimu:~ $ python
Python 3.10.10 (main, Apr 3 2023, 00:38:34) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psi4
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/epyc/aocc/psi4/lib/psi4/__init__.py", line 71, in <module>
from . import core
ImportError: /epyc/aocc/psi4/lib/psi4/core.cpython-310-x86_64-linux-gnu.so: undefined symbol: __kmpc_end_critical
>>>
It looks like OpenMP libraries do not get linked. Anything I am missing? Any help would be greatly appreciated.