Skip to content

Commit

Permalink
rank_max
Browse files Browse the repository at this point in the history
  • Loading branch information
scemama committed Jul 29, 2024
1 parent cb8bef2 commit edf3a27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ao_two_e_ints/cholesky.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ double precision function get_ao_integ_chol(i,j,k,l)
np = int(np8,4)
if (np <= 0) stop 'np<=0'

! rank_max = min(np,20*elec_num*elec_num)
rank_max = np
! Avoid too large arrays when there are many electrons
if (elec_num > 10) then
rank_max = min(np,20*elec_num*elec_num)
endif
call mmap(trim(ezfio_work_dir)//'cholesky_ao_tmp', (/ ndim8, rank_max /), 8, fd(1), .False., .True., c_pointer(1))
call c_f_pointer(c_pointer(1), L, (/ ndim8, rank_max /))

Expand Down

0 comments on commit edf3a27

Please sign in to comment.