[Wien] lapw0_mpi (MPI_Bcast) bug
Laurence Marks
L-marks at northwestern.edu
Wed Feb 3 13:34:08 CET 2010
Yes, thanks, that was a typo.
On Wed, Feb 3, 2010 at 2:01 AM, Pawel Lesniak <lesniak at ifmpan.poznan.pl> wrote:
> W dniu 02.02.2010 20:21, Laurence Marks pisze:
>>
>> There is a bug in some mpi implementations that can lead to a SIGSEV
>> in lapw0_mpi for large problems. The symptom is a SIGSEV at the
>> MPI_Bcast call
>> at about line 1574:
>> #ifdef Parallel
>> if (.not.coul) allocate(potk(nkk))
>> call MPI_Bcast(potk, NKK, MPI_DOUBLE_COMPLEX, 0,MPI_COMM_WORLD , ierr)
>> #endif
>>
>> A patch (works) is to not do the MPI_Bcase all at once:
>>
>> #ifdef Parallel
>> if (.not.coul) allocate(potk(nkk))
>> ibbuff=32768 ! Could be optimized
>> i2=NKK/ibbuff
>> it1=1
>> do i=1,i2
>> call MPI_Bcast(potk(it1), 1024, MPI_DOUBLE_COMPLEX ,
>> 0,MPI_COMM_WORLD , ierr)
>> it1=it1+ibbuff
>> enddo
>> if(it1 .lt. nkk)then
>> it2=nkk-it1+1
>> call MPI_Bcast(potk(it1), it2, MPI_DOUBLE_COMPLEX ,
>> 0,MPI_COMM_WORLD , ierr)
>> endif
>> call MPI_BARRIER(MPI_COMM_WORLD,ierr)
>> #endif
>>
>>
>>
>
> Are you sure that
> call MPI_Bcast(potk(it1), 1024, MPI_DOUBLE_COMPLEX ,
> 0,MPI_COMM_WORLD , ierr)
> is correct?
> Why length of 1024 when you split array by ibbuff ?
> I believe correct version is:
> call MPI_Bcast(potk(it1), ibbuff, MPI_DOUBLE_COMPLEX ,
> 0,MPI_COMM_WORLD , ierr)
>
>
> Pawel Lesniak
>
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
>
--
Laurence Marks
Department of Materials Science and Engineering
MSE Rm 2036 Cook Hall
2220 N Campus Drive
Northwestern University
Evanston, IL 60208, USA
Tel: (847) 491-3996 Fax: (847) 491-7820
email: L-marks at northwestern dot edu
Web: www.numis.northwestern.edu
Chair, Commission on Electron Crystallography of IUCR
www.numis.northwestern.edu/
Electron crystallography is the branch of science that uses electron
scattering and imaging to study the structure of matter.
More information about the Wien
mailing list