forum@abinit.org
Subject: The ABINIT Users Mailing List ( CLOSED )
List archive
- From: Masao ARAI <ARAI.Masao@nims.go.jp>
- To: forum@abinit.org
- Subject: bugs in wrtout and kpgsph?
- Date: Wed, 27 Dec 2006 16:55:06 +0900
- Organization: NIMS
Dear, Abinit developers and users
When I tried abinit-5.2.4 on Hitachi sr11000, The program
was abnormally terminated.
If I understand the problem correctly, It was caused by several
bugs. I would like to explain them here. If these are not bugs but my
misunderstanding, please forgive me.
(1) src/01managempi/wrtout.F90
In subroutine wrtout, the string message is splitted at
the position of carridge return (ch10).
rtnpos=index(messtmp,ch10)
do while(rtnpos/=0)
string=messtmp(1:rtnpos-1)
write(unit, '(a)' ) trim(string)
messtmp=messtmp(rtnpos+1:len(message)) <----
rtnpos=index(messtmp,ch10)
end do
write(unit, '(a)' ) trim(messtmp)
else
write(unit,*)
At the possion indcated by "<----", the string messtmp is trancated
from position rtnpos+1 to len(message). However, for each do-loop,
the length of messtmp will vary. Therefore, using the length fo string message
as an end point of string messtmp is curious. The line may be replaced by
the following.
messtmp=messtmp(rtnpos+1:len(messtmp))
(2) src/03recipspace/kpgsph.F90
The source code structure about allocation of array_ipw is as follows.
allocate(array_ipw(-ig2pmax:ig2pmax))
...
if(exchn2n3==0)then
...
if (mpi_enreg%paral_compil_fft==1) then
...
deallocate(array_ipw_1_n2,array_ipw)
...
endif
else
...
endif
Thus, array_ipw may not be freed in some cases. When kpgsph routine is called
several times, the array_ipw will be allocated multiply. It causes the
termination of execution on Hitachi SR11000.
The above may be corrected as
allocate(array_ipw(-ig2pmax:ig2pmax))
...
if(exchn2n3==0)then
...
if (mpi_enreg%paral_compil_fft==1) then
...
deallocate(array_ipw_1_n2)
...
endif
else
...
endif
deallocate(array_ipw)
--
Masao Arai
arai.masao@nims.go.jp
Computational Materials Science Center
National Institute for Materials Science
Tsukuba Japan
- bugs in wrtout and kpgsph?, Masao ARAI, 12/27/2006
Archive powered by MHonArc 2.6.16.