Nested parallelism?

I’m also having this issue on a compile-from-source I’m doing with release 1.2. I’ve installed mkl using the academic license in the customary place for linux/ubuntu distributions (it is installed through the .deb intel distributes, if I recall correctly).

Recompiling doesn’t fix my issue on its own; I think that somewhere in the compilation process cmake is finding different libiomp5.so files, and is somehow linking both of them? I’m not sure how to hide the version not coming from my mkl install. Here’s my cmake script:

cmake -H. -Bobjdir \
    -DENABLE_ambit=ON \
    -DENABLE_CheMPS2=OFF \
    -DENABLE_dkh=ON \
    -DENABLE_libefp=ON \
    -DENABLE_erd=OFF \
    -DENABLE_simint=OFF \
    -DENABLE_gdma=ON \
    -DENABLE_PCMSolver=ON \
    -DLAPACK_LIBRARIES="/opt/intel/mkl/lib/intel64/libmkl_rt.so" \
    -DLAPACK_INCLUDE_DIRS="/opt/intel/mkl/include" \
    -DBLAS_TYPE=MKL \
    -DPYTHON_EXECUTABLE="/home/louis/anaconda3/bin/python" \
    -DCMAKE_INSTALL_PREFIX=/home/louis/bin/psi4

Following is a list of the ‘smoke’ tests my build fails:

The following tests FAILED:
7 - casscf-sp (Failed)
20 - cc1 (Failed)
129 - dfmp2-1 (Failed)
191 - fcidump (Failed)
315 - sapt1 (Failed)
339 - scf-property (Failed)
353 - tu1-h2o-energy (Failed)
389 - python-energy (Failed)
407 - dkh-molpro-2order (Failed)
409 - libefp-qchem-qmefp-sp (Failed)
413 - gdma-gdma1 (Failed)
416 - pcmsolver-scf (Failed)
417 - pcmsolver-opt-fd (Failed)

Peculiarly, some tests succeed. Based on the names of the tests, I suspect these are the tests that do not need compiled parallelism to execute, for example ones using psi4-numpy. Here’s an example output from a test that failed:

20/418 Testing: cc1
20/418 Test: cc1
Command: “/home/louis/anaconda3/bin/python” “/home/louis/psi4/tests/runtest.py” “/home/louis/psi4/tests/cc1/input.dat” “/home/louis/psi4/objdir/testresults.log” “false” “/home/louis/psi4” “false” “/home/louis/psi4/objdir/tests/cc1/output.dat” “/home/louis/psi4/objdir/stage/home/louis/bin/psi4/bin/psi4” “/home/louis/psi4/objdir/stage/home/louis/bin/psi4/share/psi4” “/home/louis/psi4/objdir/stage/home/louis/bin/psi4/lib/”
Directory: /home/louis/psi4/objdir/tests/cc1
“cc1” start time: Dec 28 17:15 EST
Output:

OMP: Error #15: Initializing libiomp5.so, but found libomp.so.5 already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.
Exit Status: infile ( -6 ); autotest ( None ); sowreap ( None ); overall ( 1 )

Test time = 1.00 sec

Test Failed.
“cc1” end time: Dec 28 17:15 EST
“cc1” time elapsed: 00:00:00

I’d be happy to provide any additional information, but without knowing what might be useful it’s hard for me to know what else I should include. I have the entire compile process output logged, if that seems useful (it’s a lot of text so not copying it here).