Std::bad_array_new_length in DF-CCSD(T)

Dear developers,

There seems to be an issue with the DF-CCSD(T) code for large species dealing with:

    Memory requirement for CC contractions: -61635.66 MB
    Total memory requirement for DF+CC int: -56117.84 MB

which throws an exception here:
Traceback (most recent call last):
File “/work/emmanous/apps/notused/psi4-compiled-on-cfk002/psi4/objdir/stage/bin/psi4”, line 337, in
exec(content)
File “”, line 111, in
File “/work/emmanous/apps/notused/psi4-compiled-on-cfk002/psi4/objdir/stage/lib/psi4/driver/driver.py”, line 576, in energy
wfn = procedures[‘energy’][lowername](lowername, molecule=molecule, **kwargs)
File “/work/emmanous/apps/notused/psi4-compiled-on-cfk002/psi4/objdir/stage/lib/psi4/driver/procrouting/proc.py”, line 957, in select_ccsd_t_
return func(name, **kwargs)
File “/work/emmanous/apps/notused/psi4-compiled-on-cfk002/psi4/objdir/stage/lib/psi4/driver/procrouting/proc.py”, line 1796, in run_dfocc
dfocc_wfn = core.dfocc(ref_wfn)

MemoryError: std::bad_array_new_length


Printing out the relevant lines from the Psithon --> Python processed input file:
    core.set_global_option("E_CONVERGENCE", 1e-9)
    core.set_global_option("MAXITER", 1000)
    core.set_global_option("QC_MODULE", "occ")
    core.set_global_option("CC_TYPE", "df")
    core.set_global_option("DF_BASIS_CC", "def2-svp-ri")
--> energy("ccsd(t)")
    print_variables()

!--------------------------------!
!                                !
!  std::bad_array_new_length     !
!                                !
!--------------------------------!

Do we have any updates on the DF-CCSD(T) code for large molecules, I am using Psi4 1.4a1 9c877d0 on a node with 382 Gb of RAM and Intel(R) Xeon(R) Gold 6140 CPU.
I am grateful to you for any help or suggestions for code modifications to fix this.

Here comes my input - not able to upload because I signed up today:
memory 315000 mb

molecule EDPR41 {
0 1
Ru 1.394123 -0.813591 0.179325
Cl 3.327531 -1.249489 1.417405
P -0.817008 -0.022639 -0.010922
Cl 0.412133 -2.436038 1.619030
C 1.143525 -1.953002 -1.226059
H 1.454518 -1.790105 -2.263124
H 0.712215 -2.940147 -1.019702
C -1.182884 0.518216 1.729031
C -1.951098 -1.444016 -0.414074
C -2.424781 1.383654 1.994321
H -1.306975 -0.454755 2.226726
C -2.615945 1.585451 3.505868
H -2.299403 2.365215 1.519650
H -3.319228 0.928084 1.560922
C -1.374992 2.222140 4.143632
H -3.501104 2.207354 3.685928
H -2.807781 0.610437 3.974735
C -0.119138 1.390407 3.855199
H -1.241394 3.235161 3.736816
H -1.517017 2.330761 5.225189
C 0.069437 1.172000 2.348955
H 0.769945 1.876576 4.272464
H -0.205868 0.409217 4.339763
H 0.274361 2.131062 1.854802
H 0.952828 0.530034 2.199533
C -1.291836 1.333524 -1.208654
C -2.014880 -1.725156 -1.925374
H -1.391297 -2.266660 0.049426
C -2.689815 -3.080157 -2.179899
H -2.579677 -0.942388 -2.446520
H -1.002209 -1.723912 -2.348571
C -4.085775 -3.124220 -1.545102
H -2.752610 -3.268570 -3.258343
H -2.067755 -3.875632 -1.747996
C -4.018055 -2.820302 -0.043490
H -4.730275 -2.381437 -2.037876
H -4.546907 -4.104698 -1.712186
C -3.347671 -1.464006 0.230718
H -5.023319 -2.830094 0.394523
H -3.439612 -3.606455 0.460080
H -3.981587 -0.659597 -0.160659
H -3.260625 -1.314826 1.311535
C -0.591749 2.678217 -0.937591
H -0.914151 0.946067 -2.168597
C -0.847942 3.674455 -2.077623
H -0.971362 3.097007 0.002903
H 0.482463 2.540083 -0.816304
C -2.346612 3.896206 -2.305937
H -0.348142 4.624488 -1.854781
H -0.391972 3.283556 -2.998412
C -3.063104 2.561490 -2.536357
H -2.777723 4.388174 -1.422344
H -2.508403 4.569613 -3.155701
C -2.805974 1.581169 -1.381839
H -4.142384 2.719917 -2.648444
H -2.707348 2.112310 -3.474661
H -3.215675 1.999634 -0.456959
H -3.336638 0.647272 -1.571823
C 2.581679 1.241012 -0.419661
C 2.203415 0.640627 -1.603735
H 1.856862 1.840159 0.126081
C 3.230504 0.068896 -2.546957
H 1.221286 0.844351 -2.019509
C 4.567910 -0.199128 -1.852119
H 2.853452 -0.841392 -3.029223
H 3.370976 0.794673 -3.364404
C 5.026585 1.061274 -1.111651
H 4.446691 -1.019466 -1.135915
H 5.316076 -0.504917 -2.592024
C 4.019240 1.470893 -0.023139
H 6.010670 0.904942 -0.657503
H 5.135357 1.877443 -1.839550
H 4.233098 0.941051 0.909406
H 4.116795 2.544103 0.194002
symmetry c1
}

set globals {
basis def2-svp
df_basis_scf def2-svp-jkfit
df_basis_sapt def2-svp-ri
guess sad
scf_type df
freeze_core = true
num_frozen_docc =40
e_convergence 1e-9
maxiter = 1000
qc_module occ
cc_type df
df_basis_cc def2-svp-ri
}

energy(“ccsd(t)”)

print_variables()

Thanks

This looks like a known issue in the dfocc module. Fixing that will require developers to re-evaluate such things as when we use size_t and when we use int as the length of various arrays. It can be done, but nobody has volunteered to do it.

Have you tried using the DF-CCSD(T) code in fnocc instead? To use that, just remove the qc_module occ line.

Also, I’ll ping @bozkaya in case he has anything to add, since he wrote the dfocc module.

1 Like