Skip to Content.
Sympa Menu

forum - Re: [abinit-forum] bug in 15common/fresid.F90 (abinit-5.3.3)?

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

Re: [abinit-forum] bug in 15common/fresid.F90 (abinit-5.3.3)?


Chronological Thread 
  • From: "Anglade Pierre-Matthieu" <anglade@gmail.com>
  • To: forum@abinit.org
  • Subject: Re: [abinit-forum] bug in 15common/fresid.F90 (abinit-5.3.3)?
  • Date: Mon, 26 Mar 2007 07:27:01 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ual7fZUdxdzWoXDJxKNJ3XXSIJm4Jx2V7dqBdUR02JrInvis/UElaUFGSub2gJB2pydMbZFnp8oN42H4CCwFNZmC0rlMkBU0Moq1/uKFdbVV7DPMolZwh/fYWyVQujMOiA7YSTvcWZlr8ZX+K8ZVjJq7M29UEF0AB1BY9qLx+uY=

Hi,

First, Yes this mailing list is appropriate for any type of comment,
questions, remarks ... Yet, there is also a developer@abinit.org
mailing list.
It is very nice from you to come with this bug report + solution.
Thank you very much. We would be very interesting in having an input
file enabling us to reproduce this bug. This way it may become an
automatic test and prevent the bug from popping up anytime in the
future. It would also help us confirm the bug (although your code
analysis looks very clear).

best regards
PMA

On 3/26/07, Masao ARAI <ARAI.Masao@nims.go.jp> wrote:
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



--
Pierre-Matthieu Anglade



Archive powered by MHonArc 2.6.16.

Top of Page