Added __USE_3D_FFT option for testing purposes. In serial execution, it

does not use 'sticks' in the fft for wavefunctions; in parallel execution,
it uses the 3d serial fft (valid for one processor per pool only!)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2843 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
giannozz 2006-02-21 16:15:32 +00:00
parent 0c5d50105e
commit a58954ea14
5 changed files with 23 additions and 26 deletions

View File

@ -916,7 +916,7 @@ SUBROUTINE gfftindex( np, nm, ng, mill_l, nr1, nr2, nr3, isind, nr1x, nr2x, nr3x
! for the parallel case: columns along z are stored contiguously ! for the parallel case: columns along z are stored contiguously
! !
#if defined __PARA #if defined __PARA && !defined __USE_3D_FFT
isp = isind( n1p + ( n2p - 1 ) * nr1x ) isp = isind( n1p + ( n2p - 1 ) * nr1x )
IF( isp <= 0 ) & IF( isp <= 0 ) &

View File

@ -68,7 +68,7 @@ CONTAINS
call errore( ' invfft ', ' unknown grid: '//grid_type , 1 ) call errore( ' invfft ', ' unknown grid: '//grid_type , 1 )
END IF END IF
#ifdef __PARA #if defined __PARA && !defined __USE_3D_FFT
IF( grid_type == 'Box' ) THEN IF( grid_type == 'Box' ) THEN
call parabox( nr3, irb3, nr3_big, imin3, imax3 ) call parabox( nr3, irb3, nr3_big, imin3, imax3 )
@ -87,22 +87,19 @@ CONTAINS
#else #else
# if defined __AIX || __FFTW
IF( grid_type == 'Dense' ) THEN # if defined __COMPLIB || __SCSL || __SX6 || __USE_3D_FFT
call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,1)
ELSE IF( grid_type == 'Smooth' ) THEN
call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,1)
ELSE IF( grid_type == 'Wave' ) THEN
call cfft3ds(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,1,dffts%isind, dffts%iplw)
ELSE IF( grid_type == 'Box' ) THEN
call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,1)
END IF
# elif defined __COMPLIB || __SCSL || __SX6
call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,1) call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,1)
# elif defined __AIX || __FFTW
IF( grid_type == 'Dense' .OR. grid_type == 'Smooth' .OR. &
grid_type == 'Box' ) THEN
call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,1)
ELSE IF( grid_type == 'Wave' ) THEN
call cfft3ds(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,1,dffts%isind, dffts%iplw)
END IF
# endif # endif
#endif #endif
@ -156,7 +153,7 @@ CONTAINS
call errore( ' fwfft ', ' unknown grid: '//grid_type , 1 ) call errore( ' fwfft ', ' unknown grid: '//grid_type , 1 )
END IF END IF
#ifdef __PARA #if defined __PARA && !defined __USE_3D_FFT
IF( grid_type == 'Dense' ) THEN IF( grid_type == 'Dense' ) THEN
call cfft_cp(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,-1,dfftp) call cfft_cp(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,-1,dfftp)
@ -168,7 +165,11 @@ CONTAINS
#else #else
# if defined __AIX || __FFTW # if defined __COMPLIB || __SCSL || __SX6 || __USE_3D_FFT
call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,-1)
# elif defined __AIX || __FFTW
IF( grid_type == 'Dense' .OR. grid_type == 'Smooth' ) THEN IF( grid_type == 'Dense' .OR. grid_type == 'Smooth' ) THEN
call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,-1) call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,-1)
@ -176,10 +177,6 @@ CONTAINS
call cfft3ds(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,-1,dffts%isind, dffts%iplw) call cfft3ds(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,-1,dffts%isind, dffts%iplw)
END IF END IF
# elif defined __COMPLIB || __SCSL || __SX6
call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,-1)
# endif # endif
#endif #endif

View File

@ -7,7 +7,7 @@
! !
#include "f_defs.h" #include "f_defs.h"
! !
#if defined (__PARA) #if defined (__PARA) && ! defined (__USE_3D_FFT)
! !
!---------------------------------------------------------------------------- !----------------------------------------------------------------------------
SUBROUTINE cft3( f, n1, n2, n3, nx1, nx2, nx3, sign ) SUBROUTINE cft3( f, n1, n2, n3, nx1, nx2, nx3, sign )

View File

@ -7,7 +7,7 @@
! !
#include "f_defs.h" #include "f_defs.h"
! !
#if defined (__PARA) #if defined (__PARA) && !defined(__USE_3D_FFT)
! !
! ... parallel case ! ... parallel case
! !
@ -263,7 +263,7 @@ SUBROUTINE cft3s( f, n1, n2, n3, nx1, nx2, nx3, sign )
! !
ELSE IF ( sign == 2 ) THEN ELSE IF ( sign == 2 ) THEN
! !
#if defined __AIX || defined __FFTW #if (defined __AIX || defined __FFTW) && !defined(__USE_3D_FFT)
! !
CALL cfft3ds( f, n1, n2, n3, nx1, nx2, nx3, 1, dffts%isind, dffts%iplw ) CALL cfft3ds( f, n1, n2, n3, nx1, nx2, nx3, 1, dffts%isind, dffts%iplw )
! !
@ -275,7 +275,7 @@ SUBROUTINE cft3s( f, n1, n2, n3, nx1, nx2, nx3, sign )
! !
ELSE IF ( sign == -2 ) THEN ELSE IF ( sign == -2 ) THEN
! !
#if defined __AIX || defined __FFTW #if (defined __AIX || defined __FFTW) && !defined(__USE_3D_FFT)
! !
CALL cfft3ds( f, n1, n2, n3, nx1, nx2, nx3, -1, dffts%isind, dffts%iplw ) CALL cfft3ds( f, n1, n2, n3, nx1, nx2, nx3, -1, dffts%isind, dffts%iplw )
! !

View File

@ -272,7 +272,7 @@ SUBROUTINE ggen()
IF (n3.LT.1) n3 = n3 + nr3 IF (n3.LT.1) n3 = n3 + nr3
IF (n3s.LT.1) n3s = n3s + nr3s IF (n3s.LT.1) n3s = n3s + nr3s
IF (n1.LE.nr1.AND.n2.LE.nr2.AND.n3.LE.nr3) THEN IF (n1.LE.nr1.AND.n2.LE.nr2.AND.n3.LE.nr3) THEN
#ifdef __PARA #if defined (__PARA) && !defined (__USE_3D_FFT)
nl (ng) = n3 + ( dfftp%isind (n1 + (n2 - 1) * nrx1) - 1) * nrx3 nl (ng) = n3 + ( dfftp%isind (n1 + (n2 - 1) * nrx1) - 1) * nrx3
IF (ng.LE.ngms) nls (ng) = n3s + ( dffts%isind (n1s + (n2s - 1) & IF (ng.LE.ngms) nls (ng) = n3s + ( dffts%isind (n1s + (n2s - 1) &
* nrx1s) - 1) * nrx3s * nrx1s) - 1) * nrx3s
@ -370,7 +370,7 @@ SUBROUTINE index_minusg()
IF (n3 < 1) n3 = n3 + nr3 IF (n3 < 1) n3 = n3 + nr3
IF (n3s < 1) n3s = n3s + nr3s IF (n3s < 1) n3s = n3s + nr3s
IF (n1.LE.nr1 .AND. n2.LE.nr2 .AND. n3.LE.nr3) THEN IF (n1.LE.nr1 .AND. n2.LE.nr2 .AND. n3.LE.nr3) THEN
#ifdef __PARA #if defined (__PARA) && !defined (__USE_3D_FFT)
nlm(ng) = n3 + (dfftp%isind (n1 + (n2 - 1) * nrx1) - 1) * nrx3 nlm(ng) = n3 + (dfftp%isind (n1 + (n2 - 1) * nrx1) - 1) * nrx3
IF (ng.LE.ngms) nlsm(ng) = n3s + (dffts%isind (n1s + (n2s - 1) & IF (ng.LE.ngms) nlsm(ng) = n3s + (dffts%isind (n1s + (n2s - 1) &
* nrx1s) - 1) * nrx3s * nrx1s) - 1) * nrx3s