Skip to content

Commit

Permalink
Merge pull request merzlab#389 from hovo1990/cpu_molden_fix
Browse files Browse the repository at this point in the history
Fixes Segmentation error during  MOLDEN export on CPU run
  • Loading branch information
agoetz authored Jan 28, 2025
2 parents 4fffa46 + 65f8533 commit d827934
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/modules/quick_scf_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -807,12 +807,15 @@ subroutine electdiis(jscf,ierr)
#endif
if (quick_method%debug) call debug_SCF(jscf)
enddo
#if (defined CUDA || defined CUDA_MPIV) && !defined(HIP)


if(master .and. write_molden) then
quick_molden%nscf_snapshots(quick_molden%iexport_snapshot)=jscf
endif

#if (defined CUDA || defined CUDA_MPIV) && !defined(HIP)


! sign of the coefficient matrix resulting from cusolver is not consistent
! with rest of the code (e.g. gradients). We have to correct this.
call scalarMatMul(quick_qm_struct%co,nbasis,nbasis,-1.0d0)
Expand Down
6 changes: 4 additions & 2 deletions src/modules/quick_uscf_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -908,12 +908,14 @@ subroutine uelectdiis(jscf,ierr)
#endif
!if (quick_method%debug) call debug_SCF(jscf)
enddo

#if (defined CUDA || defined CUDA_MPIV) && !defined(HIP)

if(master .and. write_molden) then
quick_molden%nscf_snapshots(quick_molden%iexport_snapshot)=jscf
endif

#if (defined CUDA || defined CUDA_MPIV) && !defined(HIP)


! sign of the coefficient matrix resulting from cusolver is not consistent
! with rest of the code (e.g. gradients). We have to correct this.
call scalarMatMul(quick_qm_struct%co,nbasis,nbasis,-1.0d0)
Expand Down

0 comments on commit d827934

Please sign in to comment.