Failure to converge DFT

I’m having trouble converging DFT calculations for some simple molecules. E.g. CO2 with the data file below gives the output also below, where the energy oscillates wildly from the start. The same system converges easily with NWChem. This is with a recent version of Psi4 (22 May), after a problem with libderiv.h was fixed following a previous post to this forum. Is there a bug, or am I doing something wrong?

memory 8 GB
# Molecule A
molecule {
  no_reorient
  no_com
  units bohr
  O1        0.00000000      0.00000000      2.19605057
  C         0.00000000      0.00000000      0.00000000
  O2        0.00000000      0.00000000     -2.19605057
}
set {
  basis aug-cc-pVTZ
  reference rhf
  ints_tolerance 1.0E-08
  s_tolerance    1.0E-08

energy, wfn = energy(‘PBE0’, return_wfn=True)
}

This leads to the following output (truncated):

    -----------------------------------------------------------------------
          Psi4: An Open-Source Ab Initio Electronic Structure Package
                               Psi4 1.3rc3.dev29 

                         Git: Rev {master} 766b7e2 


    R. M. Parrish, L. A. Burns, D. G. A. Smith, A. C. Simmonett,
    A. E. DePrince III, E. G. Hohenstein, U. Bozkaya, A. Yu. Sokolov,
    R. Di Remigio, R. M. Richard, J. F. Gonthier, A. M. James,
    H. R. McAlexander, A. Kumar, M. Saitow, X. Wang, B. P. Pritchard,
    P. Verma, H. F. Schaefer III, K. Patkowski, R. A. King, E. F. Valeev,
    F. A. Evangelista, J. M. Turney, T. D. Crawford, and C. D. Sherrill,
    J. Chem. Theory Comput. 13(7) pp 3185--3197 (2017).
    (doi: 10.1021/acs.jctc.7b00174)


                         Additional Contributions by
    P. Kraus, H. Kruse, M. H. Lechner, M. C. Schieber, R. A. Shaw,
    A. Alenaizan, R. Galvelis, Z. L. Glick, S. Lehtola, and J. P. Misiewicz

    -----------------------------------------------------------------------


    Psi4 started on: Monday, 27 May 2019 03:15PM

    Process ID: 12476
    Host:       whirligig
    PSIDATADIR: /usr/local/psi4/share/psi4
    Memory:     500.0 MiB
    Threads:    6
    
  ==> Input File <==

--------------------------------------------------------------------------
memory 8 GB
# Molecule A
molecule {
  no_reorient
  no_com
  units bohr
  O1        0.00000000      0.00000000      2.19605057
  C         0.00000000      0.00000000      0.00000000
  O2        0.00000000      0.00000000     -2.19605057
}
set {
  basis aug-cc-pVTZ
  reference rhf
  ints_tolerance 1.0E-08
  s_tolerance    1.0E-08
}

energy, wfn = energy('PBE0', return_wfn=True)

fchk_writer = psi4.FCHKWriter(wfn)
fchk_writer.write('CO2_A.fchk')
--------------------------------------------------------------------------

  Memory set to   7.451 GiB by Python driver.

*** tstart() called on whirligig
*** at Mon May 27 15:15:54 2019

   => Loading Basis Set <=

    Name: AUG-CC-PVTZ
    Role: ORBITAL
    Keyword: BASIS
    atoms 1, 3 entry O          line   344 file /home/ajs1/CamCASP/basis/psi4/aug-cc-pvtz.gbs 
    atoms 2    entry C          line   232 file /home/ajs1/CamCASP/basis/psi4/aug-cc-pvtz.gbs 


         ---------------------------------------------------------
                                   SCF
               by Justin Turney, Rob Parrish, Andy Simmonett
                          and Daniel G. A. Smith
                              RKS Reference
                        6 Threads,   7629 MiB Core
         ---------------------------------------------------------

  ==> Geometry <==

    Molecular point group: d2h
    Full point group: D_inf_h

    Geometry (in Bohr), charge = 0, multiplicity = 1:

       Center              X                  Y                   Z               Mass       
    ------------   -----------------  -----------------  -----------------  -----------------
         O            0.000000000000     0.000000000000     2.196050570000    15.994914619570
         C            0.000000000000     0.000000000000     0.000000000000    12.000000000000
         O            0.000000000000     0.000000000000    -2.196050570000    15.994914619570

  Running in d2h symmetry.

  Rotational constants: A = ************  B =      0.39021  C =      0.39021 [cm^-1]
  Rotational constants: A = ************  B =  11698.18105  C =  11698.18105 [MHz]
  Nuclear repulsion =   58.286453758667307

  Charge       = 0
  Multiplicity = 1
  Electrons    = 22
  Nalpha       = 11
  Nbeta        = 11

  ==> Algorithm <==

  SCF Algorithm Type is DF.
  DIIS enabled.
  MOM disabled.
  Fractional occupation disabled.
  Guess Type is SAD.
  Energy threshold   = 1.00e-06
  Density threshold  = 1.00e-06
  Integral threshold = 1.00e-08

  ==> Primary Basis <==

  Basis Set: AUG-CC-PVTZ
    Blend: AUG-CC-PVTZ
    Number of shells: 42
    Number of basis function: 138
    Number of Cartesian functions: 165
    Spherical Harmonics?: true
    Max angular momentum: 3

  ==> DFT Potential <==

   => Composite Functional: PBE0 <= 

    PBE0 Hyb-GGA Exchange-Correlation Functional

    C. Adamo and V. Barone, J. Chem. Phys. 110, 6158 (1999)
    M. Ernzerhof and G. E. Scuseria, J. Chem. Phys. 110, 5029 (1999)

    Deriv               =              1
    GGA                 =           TRUE
    Meta                =          FALSE

    Exchange Hybrid     =           TRUE
    MP2 Hybrid          =          FALSE

   => Exchange Functionals <=

    0.7500   Perdew, Burke & Ernzerhof

   => Exact (HF) Exchange <=

    0.2500               HF 

   => Correlation Functionals <=

    1.0000   Perdew, Burke & Ernzerhof

   => Molecular Quadrature <=

    Radial Scheme          =       TREUTLER
    Pruning Scheme         =           FLAT
    Nuclear Scheme         =       TREUTLER

    BS radius alpha        =              1
    Pruning alpha          =              1
    Radial Points          =             75
    Spherical Points       =            302
    Total Points           =          67950
    Total Blocks           =            594
    Max Points             =            256
    Max Functions          =            138

   => Loading Basis Set <=

    Name: (AUG-CC-PVTZ AUX)
    Role: JKFIT
    Keyword: DF_BASIS_SCF
    atoms 1, 3 entry O          line   286 file /usr/local/psi4/share/psi4/basis/aug-cc-pvtz-jkfit.gbs 
    atoms 2    entry C          line   162 file /usr/local/psi4/share/psi4/basis/aug-cc-pvtz-jkfit.gbs 

  ==> Pre-Iterations <==

   -------------------------------------------------------
    Irrep   Nso     Nmo     Nalpha   Nbeta   Ndocc  Nsocc
   -------------------------------------------------------
     Ag        30      30       0       0       0       0
     B1g        8       8       0       0       0       0
     B2g       14      14       0       0       0       0
     B3g       14      14       0       0       0       0
     Au         7       7       0       0       0       0
     B1u       27      27       0       0       0       0
     B2u       19      19       0       0       0       0
     B3u       19      19       0       0       0       0
   -------------------------------------------------------
    Total     138     138      11      11      11       0
   -------------------------------------------------------

  ==> Integral Setup <==

  DFHelper Memory: AOs need 0.050 GiB; user supplied 5.338 GiB. Using in-core AOs.

  ==> MemDFJK: Density-Fitted J/K Matrices <==

    J tasked:                   Yes
    K tasked:                   Yes
    wK tasked:                   No
    OpenMP threads:               6
    Memory [MiB]:              5466
    Algorithm:                 Core
    Schwarz Cutoff:           1E-08
    Mask sparsity (%):       0.2310
    Fitting Condition:        1E-10

   => Auxiliary Basis Set <=

  Basis Set: (AUG-CC-PVTZ AUX)
    Blend: AUG-CC-PVTZ-JKFIT
    Number of shells: 90
    Number of basis function: 312
    Number of Cartesian functions: 393
    Spherical Harmonics?: true
    Max angular momentum: 4

  Cached 100.0% of DFT collocation blocks in 0.250 [GiB].

  Minimum eigenvalue in the overlap matrix is 3.4919999955E-04.
  Using Symmetric Orthogonalization.

  SCF Guess: Superposition of Atomic Densities via on-the-fly atomic UHF.

  ==> Iterations <==

                           Total Energy        Delta E     RMS |[F,P]|

   @DF-RKS iter SAD:  -193.65505999068546   -1.93655e+02   0.00000e+00 
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     4,    0,    1,    1,    0,    3,    1,    1 ]

   @DF-RKS iter   1:   -82.72623937759155    1.10929e+02   2.12202e-01 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     5,    0,    1,    0,    0,    4,    0,    1 ]

   @DF-RKS iter   2:  -169.77301905817976   -8.70468e+01   2.72590e-01 DIIS
   @DF-RKS iter   3:  -691.50680729198166   -5.21734e+02   2.54102e+01 DIIS
   @DF-RKS iter   4:  -196.18808205872338    4.95319e+02   3.89882e+00 DIIS
   @DF-RKS iter   5:  -105.15909543468698    9.10290e+01   1.69359e+01 DIIS
   @DF-RKS iter   6:  -583.50494346248877   -4.78346e+02   5.07427e+01 DIIS
   @DF-RKS iter   7:  -552.80349855043198    3.07014e+01   2.02533e+00 DIIS
   @DF-RKS iter   8:  -484.62840934046704    6.81751e+01   4.90974e+00 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     4,    0,    1,    1,    0,    4,    0,    1 ]

   @DF-RKS iter   9:  -480.90360748547522    3.72480e+00   1.29184e+01 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     4,    0,    1,    0,    0,    4,    1,    1 ]

   @DF-RKS iter  10:  -760.67028878671329   -2.79767e+02   1.72667e+01 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     5,    0,    1,    0,    0,    4,    0,    1 ]

   @DF-RKS iter  11:  -875.58203036718976   -1.14912e+02   1.22873e+01 DIIS
   @DF-RKS iter  12:  -781.97605261568060    9.36060e+01   1.16342e+01 DIIS
   @DF-RKS iter  13:  -517.94856964410405    2.64027e+02   2.13046e+01 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     4,    0,    1,    0,    0,    4,    1,    1 ]

   @DF-RKS iter  14:  -481.17516375602611    3.67734e+01   2.44152e+01 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     5,    0,    1,    0,    0,    4,    0,    1 ]

   @DF-RKS iter  15:  -577.71506897349252   -9.65399e+01   2.73706e+01 DIIS
   @DF-RKS iter  16:  -978.51799708334067   -4.00803e+02   3.02588e+01 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     4,    0,    1,    0,    0,    4,    1,    1 ]

   @DF-RKS iter  17:  -482.13708574470041    4.96381e+02   4.16479e+01 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     5,    0,    1,    0,    0,    4,    0,    1 ]

   @DF-RKS iter  18:  -308.32266087927644    1.73814e+02   1.65591e+01 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     4,    0,    1,    0,    0,    4,    1,    1 ]

   @DF-RKS iter  19:  -939.81534748010665   -6.31493e+02   1.97846e+01 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     3,    0,    1,    1,    0,    4,    1,    1 ]

   @DF-RKS iter  20: -2550.94293258592961   -1.61113e+03   2.93213e+01 DIIS
    Occupation by irrep:
             Ag   B1g   B2g   B3g    Au   B1u   B2u   B3u 
    DOCC [     5,    0,    1,    0,    0,    4,    0,    1 ]

converges with my development version without problems, even with the arguably rather low integral accuracy.

Do the normal psi4 tests pass?

I have run all the tests. Some failed:

 85 - cdomp2-1 (Failed)
 86 - cdomp2-2 (Failed)
 93 - cepa-module (Failed)
172 - dft-b3lyp (Failed)
209 - frac-ip-fitting (Failed)
210 - frac-traverse (Failed)
219 - mints3 (Failed)
275 - opt-lindep-change (Failed)
343 - scf-guess-read1 (Failed)
387 - scf-coverage (Failed)

and most of the tests from 393 to 421. If any of these are relevant I can provide more details.
I’m using the master branch, commit 0220a93.

Thanks for running the tests.
This is very concerning. These should all pass. The mints3 is a very basic test that tests various angular momentum integrals for correctness.

Makes me wonder if the fix with the libderiv library causes trouble and produces wrong integrals. Though why it would I cannot say…

Can you post some error messages from the output files the tests generated? Those will hopefully give us a clue as to the problem.

You can find these in:

build directory -> tests -> name of failed test -> output.dat

I find that the failure of the cdomp2-1, cdomp2-2 and mints3 tests was due to having PSIPATH set to use an equivalent but differently formulated aug-cc-pvtz basis. When I ran the tests again with PSIPATH unset, the mints3 test, and also cdomp2-1, cdomp2-2, scf-coverage, cepa-module, cc-module and a few others, all passed, but the rest still failed.

The CO2 calculation still oscillated wildly and failed to converge, as before.

Below is the tail of tests/scf-guess-read1/output.dat. The calculation appears to have been successful, with the error occurring in the analysis of the output. It doesn’t seem to be relevant to the failure of the CO2 calculation.

*** tstop() called on whirligig at Tue May 28 15:19:00 2019
Module time:
	user time   =       0.52 seconds =       0.01 minutes
	system time =       0.51 seconds =       0.01 minutes
	total time  =          1 seconds =       0.02 minutes
Total time:
	user time   =       0.52 seconds =       0.01 minutes
	system time =       0.51 seconds =       0.01 minutes
	total time  =          1 seconds =       0.02 minutes
    SCF energy........................................................PASSED

*** tstart() called on whirligig
*** at Tue May 28 15:19:00 2019


Traceback (most recent call last):
  File "/home/ajs1/psi4/build2/stage/bin/psi4", line 287, in <module>
    exec(content)
  File "<string>", line 34, in <module>
  File "/home/ajs1/psi4/build2/stage/lib/psi4/driver/driver.py", line 561, in energy
    wfn = procedures['energy'][lowername](lowername, molecule=molecule, **kwargs)
  File "/home/ajs1/psi4/build2/stage/lib/psi4/driver/procrouting/proc.py", line 2045, in run_scf
    scf_wfn = scf_helper(name, post_scf=False, **kwargs)
  File "/home/ajs1/psi4/build2/stage/lib/psi4/driver/procrouting/proc.py", line 1276, in scf_helper
    base_wfn = core.Wavefunction.build(scf_molecule, core.get_global_option('BASIS'))
  File "/home/ajs1/psi4/build2/stage/lib/psi4/driver/p4util/python_helpers.py", line 115, in _core_wavefunction_build
    basis = core.BasisSet.build(mol, "ORBITAL", basis)
  File "/home/ajs1/psi4/build2/stage/lib/psi4/driver/p4util/python_helpers.py", line 80, in _pybuild_basis
    mol.to_dict(), key, resolved_target, fitrole, other, return_dict=True, return_atomlist=return_atomlist)
  File "/home/ajs1/psi4/build2/stage/lib/psi4/driver/qcdb/molecule.py", line 1480, in to_dict
    compare_molrecs(validated_molrec, molrec, 'to_dict', atol=1.e-6, forgive=forgive, verbose=0)
  File "/home/ajs1/psi4/build2/stage/lib/psi4/driver/qcdb/testing.py", line 127, in _mergedapis_compare_molrecs
    return qcel.testing.compare_molrecs(expected, computed, **kwargs)
  File "/home/ajs1/psi4/build2/stage/lib/qcelemental/testing.py", line 472, in compare_molrecs
    return_handler=return_handler)
  File "/home/ajs1/psi4/build2/stage/lib/qcelemental/testing.py", line 349, in compare_recursive
    errors = _compare_recursive(expected, computed, atol=atol, rtol=rtol)
  File "/home/ajs1/psi4/build2/stage/lib/qcelemental/testing.py", line 276, in _compare_recursive
    errors.extend(_compare_recursive(expected[k], computed[k], _prefix=name, atol=atol, rtol=rtol))
  File "/home/ajs1/psi4/build2/stage/lib/qcelemental/testing.py", line 263, in _compare_recursive
    errors.extend(_compare_recursive(item1, item2, _prefix=prefix + str(i), atol=atol, rtol=rtol))
  File "/home/ajs1/psi4/build2/stage/lib/qcelemental/testing.py", line 278, in _compare_recursive
    passfail, msg = compare_values(expected, computed, atol=atol, rtol=rtol, return_message=True, quiet=True)
  File "/home/ajs1/psi4/build2/stage/lib/qcelemental/testing.py", line 129, in compare_values
    xptd_str = f'{xptd:.{digits1}f}'

TypeError: unsupported format string passed to numpy.ndarray.__format__


Printing out the relevant lines from the Psithon --> Python processed input file:
    clean()
    h2o.set_multiplicity(2)
    h2o.set_molecular_charge(1)
    core.set_local_option("SCF", "REFERENCE", "uhf")
    core.set_local_option("SCF", "GUESS", "read")
--> energy('scf')
    compare_values(-75.63211086688469, variable('SCF TOTAL ENERGY'), 6, 'SCF energy') 

    Psi4 stopped on: Tuesday, 28 May 2019 03:19PM
    Psi4 wall time for execution: 0:00:00.80

@loriab would probably know more about the QCElemental output parsing error.

Are there any other test failures with output worth reporting?

I really hope I’m wrong about this, but can you try the troublesome CO2 computation single-threaded?

Sorry to have to tell you this, but you’re right. Running the calculation single-threaded worked with no trouble at all.

I’ll look at the other test failures.

The tests dft-b3lyp, frac-ip-fitting, frac-traverse and scf-guess-read1 all failed with
TypeError: unsupported format string passed to numpy.ndarray.__format__

Tests pywrap-align and pywrap-align-chiral failed because I didn’t have the networkx module installed.

The psi4numpy, python and json-schema-1tests (398-403 and 407-421) didn’t produce an output.dat file. It isn’t clear to me why they failed.

I hope this is useful though it isn’t related to my original problem.

The scf-guess-read1 error reproduced locally on Mac but not on Linux. It has to do with switching over testing machinery. Other tests likely affected. Our CI did catch it, but I neglected to look at its logs. Investigating …

@ajs I tried to reproduce your CO2 troubles with my cluster’s version of Psi, which was last updated May 7. Even with 6 threads, CO2 works fine for me. There may have been a bug introduced after then but before May 22. Still, debugging threading problems is far beyond my skillset, so I’ll leave this to our more senior devs. Good luck.

I have a fix in for the test cases (https://github.com/MolSSI/QCElemental/pull/67), though that won’t propagate instantly to psi4. Thanks for the alert.

I’ve run the co2 with 1 and 6 threads on a recent psi4 on Linux and the output files and fchk files match to a comfortable number of decimals. Could you send the below, perhaps, and I’ll see if anything looks suspicious?

conda list
python -c "import numpy;print(numpy.version.version)"
ldd -v <objdir>/stage/lib/psi4/core<tab-complete>  # on linux
otool -L <objdir>/stage/lib/psi4/core<tab-complete>  # on mac

I don’t have conda.

 $ python -c "import numpy;print(numpy.version.version)"
1.13.3
 $ ldd -v build2/stage/lib/psi4/core.cpython-36m-x86_64-linux-gnu.so 
	linux-vdso.so.1 (0x00007ffc0615b000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f233f3d1000)
	libopenblas.so.0 => /usr/lib/x86_64-linux-gnu/libopenblas.so.0 (0x00007f233d12b000)
	libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f233cefc000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f233ccdd000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f233c954000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f233c5b6000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f233c39e000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f233bfad000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f23455cd000)
	libgfortran.so.4 => /usr/lib/x86_64-linux-gnu/libgfortran.so.4 (0x00007f233bbce000)
	libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f233b98e000)

	Version information:
	build2/stage/lib/psi4/core.cpython-36m-x86_64-linux-gnu.so:
		libgcc_s.so.1 (GCC_3.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
		libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0
		libgomp.so.1 (OMP_2.0) => /usr/lib/x86_64-linux-gnu/libgomp.so.1
		libgomp.so.1 (GOMP_4.0) => /usr/lib/x86_64-linux-gnu/libgomp.so.1
		libgomp.so.1 (OMP_1.0) => /usr/lib/x86_64-linux-gnu/libgomp.so.1
		libgomp.so.1 (OMP_3.0) => /usr/lib/x86_64-linux-gnu/libgomp.so.1
		libgomp.so.1 (GOMP_1.0) => /usr/lib/x86_64-linux-gnu/libgomp.so.1
		libgomp.so.1 (GOMP_2.0) => /usr/lib/x86_64-linux-gnu/libgomp.so.1
		libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
		libc.so.6 (GLIBC_2.16) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
		libdl.so.2 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libdl.so.2
		libstdc++.so.6 (GLIBCXX_3.4.14) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (GLIBCXX_3.4.18) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (CXXABI_1.3.1) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (CXXABI_1.3.8) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (GLIBCXX_3.4.19) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (CXXABI_1.3.5) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (GLIBCXX_3.4.22) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (GLIBCXX_3.4.11) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (CXXABI_1.3.3) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (GLIBCXX_3.4.15) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (GLIBCXX_3.4.9) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (CXXABI_1.3) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (GLIBCXX_3.4.20) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (GLIBCXX_3.4) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (GLIBCXX_3.4.21) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
		libstdc++.so.6 (CXXABI_1.3.9) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
	/lib/x86_64-linux-gnu/libdl.so.2:
		ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
		libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
	/usr/lib/x86_64-linux-gnu/libopenblas.so.0:
		libgfortran.so.4 (GFORTRAN_7) => /usr/lib/x86_64-linux-gnu/libgfortran.so.4
		libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
		libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0
		libpthread.so.0 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libpthread.so.0
		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.6) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
	/usr/lib/x86_64-linux-gnu/libgomp.so.1:
		libdl.so.2 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libdl.so.2
		libpthread.so.0 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libpthread.so.0
		libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0
		libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.6) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
	/lib/x86_64-linux-gnu/libpthread.so.0:
		ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2
		ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
	/usr/lib/x86_64-linux-gnu/libstdc++.so.6:
		libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
		ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
		libgcc_s.so.1 (GCC_4.2.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
		libgcc_s.so.1 (GCC_3.3) => /lib/x86_64-linux-gnu/libgcc_s.so.1
		libgcc_s.so.1 (GCC_3.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.18) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.16) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
	/lib/x86_64-linux-gnu/libm.so.6:
		ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
	/lib/x86_64-linux-gnu/libgcc_s.so.1:
		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
	/lib/x86_64-linux-gnu/libc.so.6:
		ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
		ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
	/usr/lib/x86_64-linux-gnu/libgfortran.so.4:
		libm.so.6 (GLIBC_2.27) => /lib/x86_64-linux-gnu/libm.so.6
		libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
		libgcc_s.so.1 (GCC_4.2.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
		libgcc_s.so.1 (GCC_3.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
		libgcc_s.so.1 (GCC_3.3) => /lib/x86_64-linux-gnu/libgcc_s.so.1
		libgcc_s.so.1 (GCC_4.3.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
		libquadmath.so.0 (QUADMATH_1.0) => /usr/lib/x86_64-linux-gnu/libquadmath.so.0
		libc.so.6 (GLIBC_2.6) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
	/usr/lib/x86_64-linux-gnu/libquadmath.so.0:
		libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.10) => /lib/x86_64-linux-gnu/libc.so.6
		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
		libm.so.6 (GLIBC_2.23) => /lib/x86_64-linux-gnu/libm.so.6
		libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6

Aha, openblas. There’s different ways of building openblas, but the summary is that it does not play nicely with Psi4 (gory supporting details; deeply buried warning)).

MKL is the only threaded BLAS/LAPACK we have confidence in and test regularly. Fortunately, one can get it for free through conda, either the pre-compiled conda package or to link against if you build psi yourself (options). Please let me know if I can offer advice on how to proceed.

The procedure for compiling from source under conda given in the options link in the previous post works nicely and builds psi4-core, but it doesn’t appear to produce an executable or even a bin directory. How do I run the program? Do I have to run make install?

When I compile from source on my Mac, the executable is in objdir/stage/bin.

So it is. Thank you.

Just to make sure - are you able to use Psi to get reliable answers, even with threading, or is there still an issue? If things look fine to you, I can mark the topic as solved.

Same for me.

Compiled from source psi4 passes all tests, but with multi-process routines such as psi4 -n 16 the energy raises widely.
It was started after updating Fedora 30 from Fedora 28. Code was compiled with Intel’s MKL with the following script:

source /opt/intel/bin/compilervars.sh intel64
source /opt/intel/mkl/bin/mklvars.sh intel64 ilp64
cmake \
  -H. \
  -Bbuild  \
  -DMAX_AM_ERI=7 \
  -DCMAKE_BUILD_TYPE=release \
  -DENABLE_OPENMP=ON \
  -DOpenMP_LIBRARY_DIRS=/opt/intel/compilers_and_libraries_2019.0.117/linux/compiler/lib/intel64 \
  -Dpybind11_DIR=/usr \
  -DENABLE_ambit=ON \
  -DBLAS_TYPE=MKL \
  -DLAPACK_TYPE=MKL \
  -DPYTHON_EXECUTABLE=/usr/bin/python3.7 \
  -DPYTHON_LIBRARY="/usr/lib64/libpython3.7m.so.1.0" \
  -DPYTHON_INCLUDE_DIR="/usr/include/python3.7m" \
  -DENABLE_CheMPS2=OFF \
  -DENABLE_PCMSolver=ON \
  -DBUILD_SHARED_LIBS=ON \
  -DENABLE_XHOST=ON \
  -DENABLE_SCALAPACK=OFF \
  -DENABLE_GPU_DFCC=OFF \
  -DENABLE_simint=ON \
  -DSIMINT_VECTOR=avx \
  -DENABLE_v2rdm_casscf=OFF \
  -DENABLE_dkh=ON

From Conda repo Psi4 works nicely, but not so fast as compiled on my host.

@MadChem Just to be safe, can you run the same commands @loriab suggested for debug purposes here?