diff --git a/src/ao_two_e_ints/map_integrals.irp.f b/src/ao_two_e_ints/map_integrals.irp.f index b95821a2..5272096d 100644 --- a/src/ao_two_e_ints/map_integrals.irp.f +++ b/src/ao_two_e_ints/map_integrals.irp.f @@ -389,13 +389,13 @@ BEGIN_PROVIDER [ complex*16, ao_integrals_cache_periodic, (0:64*64*64*64) ] if (idx_re /= idx_im) then call map_get(ao_integrals_map,idx_im,tmp_im) if (idx1 < idx2) then - integral = cmplx(tmp_re,tmp_im) + integral = dcmplx(tmp_re,tmp_im) else - integral = cmplx(tmp_re,-tmp_im) + integral = dcmplx(tmp_re,-tmp_im) endif else tmp_im = 0.d0 - integral = cmplx(tmp_re,tmp_im) + integral = dcmplx(tmp_re,tmp_im) endif ii = l-ao_integrals_cache_min @@ -448,13 +448,13 @@ complex*16 function get_ao_two_e_integral_periodic(i,j,k,l,map) result(result) if (idx_re /= idx_im) then call map_get(ao_integrals_map,idx_im,tmp_im) if (idx1 < idx2) then - tmp = cmplx(tmp_re,tmp_im) + tmp = dcmplx(tmp_re,tmp_im) else - tmp = cmplx(tmp_re,-tmp_im) + tmp = dcmplx(tmp_re,-tmp_im) endif else tmp_im = 0.d0 - tmp = cmplx(tmp_re,tmp_im) + tmp = dcmplx(tmp_re,tmp_im) endif else ii = l-ao_integrals_cache_min diff --git a/src/utils/linear_algebra.irp.f b/src/utils/linear_algebra.irp.f index 593a98d5..93b367aa 100644 --- a/src/utils/linear_algebra.irp.f +++ b/src/utils/linear_algebra.irp.f @@ -609,9 +609,9 @@ subroutine lapack_diagd_complex(eigvalues,eigvectors,H,nmax,n) print *, irp_here, ': ZHEEVD: the ',-info,'-th argument had an illegal value' stop 2 endif - lwork = int( work( 1 ) ) + lwork = max(int( work( 1 ) ),lwork) liwork = iwork(1) - lrwork = rwork(1) + lrwork = max(int(rwork(1),4),lrwork) deallocate (work,iwork,rwork) allocate (work(lwork),iwork(liwork),rwork(lrwork))