From 9dd786daffaff74b4456a6a424d86a56fa386ac1 Mon Sep 17 00:00:00 2001 From: Ioanna-Maria Lygatsika Date: Mon, 11 Sep 2023 13:10:58 +0200 Subject: [PATCH] Update cint4c1e.c int4c1e segfault fix --- src/cint4c1e.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cint4c1e.c b/src/cint4c1e.c index 1fa81d3b..98d648df 100644 --- a/src/cint4c1e.c +++ b/src/cint4c1e.c @@ -271,7 +271,7 @@ CACHE_SIZE_T CINT4c1e_drv(double *out, FINT *dims, CINTEnvVars *envs, CINTOpt *o CACHE_SIZE_T leng = envs->g_size*3*((1<gbits)+1); CACHE_SIZE_T len0 = envs->nf*n_comp; CACHE_SIZE_T cache_size = MAX(leng+len0+nc*n_comp*3 + pdata_size, - nc*n_comp+envs->nf*4); + nc*n_comp+envs->nf*32*OF_CMPLX); return cache_size; } double *stack = NULL; @@ -280,7 +280,7 @@ CACHE_SIZE_T CINT4c1e_drv(double *out, FINT *dims, CINTEnvVars *envs, CINTOpt *o size_t leng = envs->g_size*3*((1<gbits)+1); size_t len0 = envs->nf*n_comp; size_t cache_size = MAX(leng+len0+nc*n_comp*3 + pdata_size, - nc*n_comp+envs->nf*4); + nc*n_comp+envs->nf*32*OF_CMPLX); stack = malloc(sizeof(double)*cache_size); cache = stack; }