From 5803482a6045eacf2f04b9c5dda20c174dea14c3 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 25 May 2020 23:27:38 +0200 Subject: [PATCH] Fixed NaN in SCF --- src/scf_utils/roothaan_hall_scf.irp.f | 29 +++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/scf_utils/roothaan_hall_scf.irp.f b/src/scf_utils/roothaan_hall_scf.irp.f index 8c76501e..d332a75c 100644 --- a/src/scf_utils/roothaan_hall_scf.irp.f +++ b/src/scf_utils/roothaan_hall_scf.irp.f @@ -284,19 +284,22 @@ END_DOC ! Solve the linear system C = B.X - call dsysvx('N','U',dim_DIIS+1,1, & - B_matrix_DIIS,size(B_matrix_DIIS,1), & - AF, size(AF,1), & - ipiv, & - C_vector_DIIS,size(C_vector_DIIS,1), & - X_vector_DIIS,size(X_vector_DIIS,1), & - rcond, & - ferr, & - berr, & - scratch,size(scratch), & - iwork, & - info & - ) + X_vector_DIIS = C_vector_DIIS + call dgesv ( dim_DIIS+1 , 1, B_matrix_DIIS, size(B_matrix_DIIS,1), & + ipiv , X_vector_DIIS , size(X_vector_DIIS,1), info) +! call dsysvx('N','U',dim_DIIS+1,1, & +! B_matrix_DIIS,size(B_matrix_DIIS,1), & +! AF, size(AF,1), & +! ipiv, & +! C_vector_DIIS,size(C_vector_DIIS,1), & +! X_vector_DIIS,size(X_vector_DIIS,1), & +! rcond, & +! ferr, & +! berr, & +! scratch,size(scratch), & +! iwork, & +! info & +! ) deallocate(scratch,AF,iwork)