How to use single precision in CC/EOM-CC calculations

The calculations can run considerably faster when using single-precision execution for the correlated part, as documented here:
https://pubs.acs.org/doi/abs/10.1021/acs.jctc.8b00321
Most of the keywords are described in the manual. Eventually, we plan to make single precision a default, but for now we still consider this feature as experimental. Below we describe some common scenarios.

The full list of features in ccman2 module is the following:

  1. CCSD: T,L amplitudes; indermediates, opdm, tpdm, S^2
  2. EOM-CCSD and EOM-MP2: right and left vectors for EE,SF,IP,EA; opdm, tpdm, S^2
  3. EOM-MP2T right vectors
  4. Amplitude response (DIIS) in EOM-CCSD: EE, IP, EA
  5. Mixed-precision (T) correction in libpt for CCSD

Both canonical and CD/RI versions of the listed features are supported. At the moment only real-valued code has single precision (sp) features, and only with VM and XM backends.

CCSD T and L amplitude solvers support two types of exploitation of single precision: Once the calculation in single precision is done, the code can finish calculation or continue clean-up iterations in double precision (dp).
Note1: sp all the way works well even for geometry optimization
Note2: if left vectors are requested, their precision will be the same as for right vectors

Caution : for finite difference calculations you may need to increase the step size or use clean up (CCSD).

Caution : sometimes the results depend on the block size, which may show up in XM backend, which use block size = 32 by default. Block size can be changed for both backends by CC_ORBS_PER_BLOCK keyword.

Job options:
cc_sp_t_conv = 4 ! T convergence in sp
cc_sp_e_conv = 6 ! E convergence in sp
cc_erase_dp_integrals = 1 ! constrols storage of dp oblects: 0 - store; 1 - do not store
cc_single_prec = 1 ! activates single precision for CCSD: 0 - dp; 1 - sp; 2 - sp with cleanup
eom_single_prec = 1 ! ativates single precision for EOM: 0 - dp; 1 - sp
cc_sp_dm = 1 ! controls precision for intermediate/density matrix evaluation: 0 - dp; 1 - sp. S^2 (if requested) is controlled by this keyword as well.
eom_aresp_single_prec = 1 ! controls precision for amplitude response: 0 - dp, 1 - sp
libpt_mixed_precision = 1 ! activates mixed-precision (T) for CCSD(T)

Efficient usage of CC_ERASE_DP_INTEGRALS is the following: to save disk storage it should be set to 1, but it will slightly increase computational time due to a higher number of converge calls. SInce for RI/CD jobs the storage requirements are typically low, it will work fine for cc_erase_dp_integrals = 0.

We are currently experimenting with the default settings; for results consistent with the defaults in double precision it is recommended to set CC_SP_T_CONV and CC_SP_E_CONV as listed above . Do not put the thresholds too tight, since too tight thresholds will go beyond sp capabilities, and the calculation may not converge. Use cleanup if you really want tight convergence criteria. For very large jobs (>1000 basis functions) these thresholds may be relaxed since the calculation may not converge due to a lack of precision.

Example: CD EOM-EA-CCSD job, illustrating “all way through in sp”

$molecule
0 1
C
H 1 1.127888
H 1 1.127888 2 100.546614
$end

$rem
basis = cc-pvdz
method = ccsd
EA_STATES = [1,0,0,0]
cc_sp_t_conv = 4
cc_sp_e_conv = 6
cc_erase_dp_integrals = 0 ! set 1 to save disk space
cc_single_prec = 1
eom_single_prec = 1
cc_ref_prop = 1
CC_SP_DM = 1
cholesky_tol = 3
$end

Here is an example of input for single precision CCSD(T) calculation - I recently used it for rather large molecules:

$rem
BASIS = aug-cc-pVTZ
method = ccsd(t)
n_frozen_core = FC
use_libpt = true
cc_backend = xm !no need to worry about CC_MEMORY
! use SP code
cc_single_prec=1
cc_sp_t_conv = 4
cc_sp_e_conv = 6
cc_erase_dp_integrals = 1
libpt_mixed_precision = 1
$end

1 Like