Size of WF disk file?

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

Locked
dima
Posts: 4
Joined: Fri Jun 11, 2010 2:07 pm

Size of WF disk file?

Post by dima » Fri Jun 11, 2010 2:20 pm

Hello dear Abinitiers. Sorry for my poor english
Then nkpt, mpw and mband are rather large, for example 2800, 2110, 24, WF disk file becomes negative = -1973 Mb. This is because nkpt, mpw and mband are integer*4 and during the calculation of WF disk file (mbdiskwf in memory.F90) from them, mbdiskwf becomes negative.
Is it a bug? or it is connected with my computer?

mverstra
Posts: 655
Joined: Wed Aug 19, 2009 12:01 pm

Re: Size of WF disk file?

Post by mverstra » Sat Jun 12, 2010 10:42 am

no, this is a small bug - your analysis is correct - the integers are being "overflowed" and give negative results.
Could you try the following patch to see if it works?

--- src/57_iovars/memory.F90 2010-01-17 21:50:15 +0000
+++ src/57_iovars/memory.F90 2010-06-12 08:39:29 +0000
@@ -870,7 +870,7 @@
!in the WF group. For the time being, nprocwf=1
nprocwf=mpi_enreg%nproc_fft

- mbdiskwf=(8*2*mpw*nprocwf*sum(nband(1:nkpt*nsppol)))/1024._dp**2 + 0.002_dp
+ mbdiskwf=(8*two*mpw*nprocwf*sum(nband(1:nkpt*nsppol)))/1024._dp**2 + 0.002_dp
mbdiskpd=(8*nfftf*nsppol)/1024._dp**2 + 0.002_dp

!Determine the largest array out of cg (cg_disk), f_fftgr (f_fftgr_disk), or pawfgrtab%gylm


recompile abinit, and run with your old test case which gave negative memory.

matthieu
Matthieu Verstraete
University of Liege, Belgium

dima
Posts: 4
Joined: Fri Jun 11, 2010 2:07 pm

Re: Size of WF disk file?

Post by dima » Sat Jun 12, 2010 1:37 pm

Thank you! Your patch is working and now WF disk file is positive.
I also try such string: mbdiskwf=(8*2._dp*mpw*nprocwf*sum(nband(1:nkpt*nsppol)))/1024._dp**2 + 0.002_dp and it is working too.

Locked