Skip to Content.
Sympa Menu

forum - bug in 15common/fresid.F90 (abinit-5.3.3)?

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

bug in 15common/fresid.F90 (abinit-5.3.3)?


Chronological Thread 
  • From: Masao ARAI <ARAI.Masao@nims.go.jp>
  • To: forum@abinit.org
  • Subject: bug in 15common/fresid.F90 (abinit-5.3.3)?
  • Date: Mon, 26 Mar 2007 12:23:49 +0900

Dear all,

When I tested abinit-5.3.3 on Hitachi SR-11000, I got following error from
abinip.

KCHF503R allocatable array is already allocated.
0x0000000100008194 _hf_err+0x554
0x00000001000998bc _hf_alloc+0x2ac
0x0000000100454c54 fresid+0x854

This message indicates that some arrays are allocated multiple times.
I checked "15common/fresid.F90".

At line 241, two arrays "rhor" and "work" are allocated.

allocate(rhor(nfftot,dtset%nspden),work(nfftot,dtset%nspden))

These arrays are deallocated at line 679 only when (mpi_enreg%mode_para=='b').

+677 if(mpi_enreg%mode_para=='b') then
+678 call pre_scatter(work_slice,work,ngfft(1),ngfft(2),ngfft(3),mpi_enreg,'scatter')
+679 deallocate(rhor,work)
+680 else
+681 work_slice(:,:)=work(:,:)
+682 end if

So, if (mpi_enreg%mode_para != 'b"), the fresid will try to allocate the same arrays each time
it is called.

If the deallocate is moved after if-endif block,

if(mpi_enreg%mode_para=='b') then
call pre_scatter(work_slice,work,ngfft(1),ngfft(2),ngfft(3),mpi_enreg,'scatter')
else
work_slice(:,:)=work(:,:)
end if
deallocate(rhor,work)

the abinip seems to work fine.

Best regards,
Masao Arai

P.S.
Is this ML appropriate for sending these reports? Or, should I send to developer ML?

--
Masao Arai
CMSC, NIMS, JAPAN



Archive powered by MHonArc 2.6.16.

Top of Page