I’m using psi4 1.2.1 on a Linux Fedora 25 machine. The following input hangs in the calculation of the DFJK gradients:

```
memory 3 gb
molecule {
0 1
S1
B2 S1 1.35
S3 B2 1.45 S1 120.
B4 S3 1.45 B2 120. S1 180.
S5 B4 1.35 S3 120. B2 180.
}
set basis sto-3g
hessian('hf')
```

The job hangs in DFJKGrad:

```
==> DFJKGrad: Density-Fitted SCF Gradients <==
Gradient: 2
J tasked: Yes
K tasked: Yes
wK tasked: No
OpenMP threads: 1
Integrals threads: 1
Memory (MB): 2145
Schwarz Cutoff: 0E+00
Fitting Condition: 1E-12
=> Auxiliary Basis Set <=
Basis Set: (STO-3G AUX)
Blend: DEF2-SVP-JKFIT
Number of shells: 164
Number of basis function: 534
Number of Cartesian functions: 643
Spherical Harmonics?: true
Max angular momentum: 4
```

The next line ought to be about memory allocation, something like this:

`DFHelper Memory: AOs need 0.001 [GiB]; user supplied 2.515 [GiB]. Using in-core AOs.`

The job will run if I add

`scf_type direct`

So perhaps something is wrong with the algorithm that tries to determine the memory for density-fitted JK gradients.