ADC(2) calculation does not run with auxiliary basis

Hi all,

I’m trying to perform a single point calculation with ADC(2) and the cc-pVTZ basis, to obtain the first 2 singlet excited states and their transition densities, for a 34 atom system (852 basis functions).

I’ve tried this calculation without the resolution of the identity approximation and the SCF part of the calculation works, but then the next step fails, I’m assuming because of the memory cost of the ADC(2) calculation (> 32 GB).

To solve this, I thought I could specify an auxiliary basis to reduce the memory cost. The only difference between the inputs is the addition of this line to the $rem section:

aux basis rimp2-cc-pvtz

This calculation results in the calculation failing with the error:

line 126: 19741 Segmentation fault ${QCPROG_S} ${inp} ${scr}

There is no error message printed in the Q-chem output file, but the calculation seems to stop within a second of starting. The last part of the output mentions the number of basis functions in the auxiliary basis, without reaching the SCF part. The last line of the Q-chem output is:

There are 442 shells and 1286 basis functions

I have tried repeating the calculation with the same input options and a smaller molecule (chloromethane) to check that there isn’t a mistake in the input. This ran fine. I then tried to run a calculation on anthracene, which failed. I also tried to reduce the basis set size to def2-SVP with RIMP2-VDZ which also failed to run.

Are there any troubleshooting steps I can go through to try and get these calculations to work? I am not sure if these systems are too large for the method or if I am making a mistake somewhere.

This is the input file I am using:

$molecule
0 1
H        2.496318000      5.579435000      1.053660000
C        3.404145000      5.039206000      0.813716000
C        3.556114000      4.493421000     -0.456670000
C        4.398258000      4.908217000      1.795344000
C        4.709962000      3.788624000     -0.798407000
H        2.769817000      4.617341000     -1.190637000
C        5.548841000      4.223713000      1.471578000
H        4.255511000      5.337193000      2.779483000
C        5.681855000      3.673939000      0.182562000
H        4.850785000      3.355161000     -1.780609000
C        6.777796000      3.881610000      2.196514000
N        6.893548000      2.996210000      0.097053000
C        7.574598000      3.143905000      1.301068000
C        7.243219000      4.121510000      3.470825000
C        7.461408000      2.478130000     -1.112478000
C        8.822726000      2.640365000      1.629744000
H        6.656254000      4.680514000      4.189623000
C        8.507013000      3.622847000      3.821343000
C        7.275617000      1.116664000     -1.513985000
O        8.094532000      3.382704000     -1.737915000
C        9.281702000      2.898500000      2.921083000
H        9.408673000      2.081190000      0.911168000
H        8.887325000      3.807719000      4.818697000
C        7.865004000      0.748632000     -2.752163000
C        6.580365000      0.087071000     -0.839195000
H       10.254288000      2.531954000      3.224472000
C        7.770892000     -0.521152000     -3.273925000
H        8.406174000      1.514326000     -3.293703000
C        6.477472000     -1.198214000     -1.355563000
Cl       5.793331000      0.346078000      0.711212000
C        7.070563000     -1.497261000     -2.567737000
H        8.235587000     -0.757516000     -4.223032000
H        5.934551000     -1.954825000     -0.804273000
Cl       6.938640000     -3.120066000     -3.216681000
$end

$rem
jobtype SP
method adc(2)
basis cc-pvtz
ee_singlets 2
make_cube_files true
cc_symmetry false
state_analysis true
SOLVENT_METHOD PCM
mem_total 30000
mem_static 4000
ADC_prop_ES2ES true
aux_basis rimp2-cc-pvtz
$end

$solvent
   Dielectric 8.93
$end

$plots
grid information and request to plot 2 densities
40 -5.0 11.0
40 -5.0 11.0
40 -5.0 11.0
0 0 2 0
1 2
$end

This is the last part of the Q-chem output:

 Nuclear Repulsion Energy =        2061.32549856 hartrees
 There are       87 alpha and       87 beta electrons
 Requested basis set is cc-pVTZ
 There are 300 shells and 852 basis functions
WARNING: MEM_STATIC is adjusted to be 2000 MB!
 Total memory of 30000 MB is distributed as follows:
   MEM_STATIC is set to 2000 MB
   QALLOC/CCMAN JOB total memory use is  28000 MB
 Warning: actual memory use might exceed 30000 MB

 Total QAlloc Memory Limit  30000 MB
 Mega-Array Size      1956 MB
 MEM_STATIC part      2000 MB
 Discretize the solute cavity surface with Lebedev spheres
        Using 110 Lebedev grid points for each H atom
        Using 194 Lebedev grid points for other atoms
        Atomic van der Waals radii will be scaled by 1.20
 Remove points where switching function is < 1.0e-08
 Keep 2345 surface tesserae and discard 3327 interior tesserae
 Molecular Surface Area = 346.843 Angst**2
 Requested basis set is rimp2-cc-pVTZ
 There are 657 shells and 2275 basis functions

Thank you for your time.

Can you tell me what version of Q-Chem you are running? I just tried your input with the latest (5.4), and the SCF+PCM runs successfully. On 14 cores, output is here:

>    15   -1774.5279824168      1.16E-08
> 
> Marcus partition will be performed
>     16   -1774.5279824187      4.13E-09 Convergence criterion met
>  ---------------------------------------
> 
> ************** Final PCM Free Energy Summary **************
>  G_electrostatic  =      -0.01983785 hartree =     -12.44843584 kcal/mol
>  G_cavitation     =       0.00000000 hartree =       0.00000000 kcal/mol
>  G_dispersion     =       0.00000000 hartree =       0.00000000 kcal/mol
>  G_repulsion      =       0.00000000 hartree =       0.00000000 kcal/mol
>  --------------------------------------------------
>  Non-electrostatic Free Energy =       0.00000000 hartree =       0.00000000 kcal/mol
>  Total                         =      -0.01983785 hartree =     -12.44843584 kcal/mol
>  --------------------------------------------------
>  SCF Energy (H0 + V/2)                       =   -1774.52798242 
>  Solute Internal Energy (H0)                 =   -1774.50814457 
>  Total Free Energy (H0 + V/2 + non-elec)     =   -1774.52798242 hartree
>                                              = -1113533.11552226 kcal/mol
> ***********************************************************
> 
>  SCF time:  CPU 7449.47 s  wall 695.38 s

However, the job does crash at the ADC step:

libvmm::evmm<T>::allocate(size_t), /fs/project/PAS0291/herbert/qchem-trunk/libvmm/libvmm/evmm/evmm.h (411), bad_size
bad_size


 Q-Chem error occurred in module liblegacy/liblegacy/qcimport_mo_ri_qints.C, line 79:

 Insufficient memory to evaluate RI integrals (minimum 8192MB required).
 Increase MEM_TOTAL or CC_MEMORY.

For the 2nd issue, you need to increase the memory as indicated. However, it’s not clear to me why your job crashes prior to the SCF.

1 Like

Thanks for the reply.

I’m using version 5.3.

Hmmmm… I ran your input with an old copy of 5.3.0 that I have, and on my hardware that also successfully completes the SCF step. (Dies at the ADC step, presumably for the same lack of memory reason, albeit with a no helpful error message like I got with 5.4.) I wonder if you can try some stripped-down input files to see what crashes, e.g., remove the plotting keywords and all the ADC stuff to see if the SCF+PCM will run without it, if that crashes too then omit the PCM.

Any insight from someone at the Q-Chem office would be appreciated, I’m at a loss here.

So I have tried this job in 5.4 as written and also experienced the SCF running to convergence but then crashing without notice before ADC.

I have also tried this job with the mem_total = 60000 and got the follow errors:

 Q-Chem error occurred in module liblegacy/liblegacy/qcimport_mo_ri_qints.C, line 79: 
                                                                                
 Insufficient memory to evaluate RI integrals (minimum 8192MB required).        
 Increase MEM_TOTAL or CC_MEMORY. 

When I run the original job with no PCM and no plots I get the same error. So maybe there is additional memory variables that need to be tweaked? I am going to try some additional jobs, but there may be an allocation issue in the reported module.

ADC memory issue is one thing, but this user seems to be experiencing a crash during shell pair formation, which I cannot reproduce even with 5.3

There is a slight chance of stack overflow. Could you set stacksize to unlimited by “limit stacksize unlimited” (csh) or “ulimit -s unlimited” (bash) and see if it works?

Apologies for the late response, I was unable to run Q-Chem to test these solutions because of an unrelated problem.

I tried running the calculation again with and without parts of the input in turn. It seems like the problem is the PCM part. Removing the PCM part (keeping the ADC and plots) allows the program to get past shell pair formation.

I also tried setting the stacksize with ulimit -s unlimited which resulted in the calculation stopping at the shell pair formation step (with the same input as above).

This is very odd and I am unable to reproduce it with either the current (5.4) release or with Q-Chem 5.3. Your number of surface discretization points (“tesserae”) = 2345, which is not particularly large, but I wonder what happens if you adjust that way down, say, using:

$pcm
HPoints 50
HeavyPoints 50
$end

Note that I don’t recommend these settings for production calculations, I’m just trying to diagnose your problem. A second suggestion: Can you try running ADC+PCM without an auxiliary basis for ADC? (Use a toy basis set like STO-3G if you have to, in order to make it run.) Wondering if somehow it’s shell-pair formation in the aux basis set that is the problem.

Adding the PCM section you suggested lets the calculation get to the SCF part (with the auxiliary basis). Your second suggestion of running ADC + PCM without an auxiliary basis also gets to the SCF part. It does seem like something in the aux basis is causing the problem.

Would you please send your failing outputs to Q-Chem support as a bug report? Ordinarily I would do it myself and save you the trouble, but in this case I am unable to reproduce your bug. Thanks in advance.