mirror of https://gitlab.com/QEF/q-e.git
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:
parent
0c5d50105e
commit
a58954ea14
|
@ -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
|
||||
!
|
||||
|
||||
#if defined __PARA
|
||||
#if defined __PARA && !defined __USE_3D_FFT
|
||||
|
||||
isp = isind( n1p + ( n2p - 1 ) * nr1x )
|
||||
IF( isp <= 0 ) &
|
||||
|
|
35
CPV/fft.f90
35
CPV/fft.f90
|
@ -68,7 +68,7 @@ CONTAINS
|
|||
call errore( ' invfft ', ' unknown grid: '//grid_type , 1 )
|
||||
END IF
|
||||
|
||||
#ifdef __PARA
|
||||
#if defined __PARA && !defined __USE_3D_FFT
|
||||
|
||||
IF( grid_type == 'Box' ) THEN
|
||||
call parabox( nr3, irb3, nr3_big, imin3, imax3 )
|
||||
|
@ -87,22 +87,19 @@ CONTAINS
|
|||
|
||||
#else
|
||||
|
||||
# if defined __AIX || __FFTW
|
||||
|
||||
IF( grid_type == 'Dense' ) THEN
|
||||
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
|
||||
# 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' .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
|
||||
|
@ -156,7 +153,7 @@ CONTAINS
|
|||
call errore( ' fwfft ', ' unknown grid: '//grid_type , 1 )
|
||||
END IF
|
||||
|
||||
#ifdef __PARA
|
||||
#if defined __PARA && !defined __USE_3D_FFT
|
||||
|
||||
IF( grid_type == 'Dense' ) THEN
|
||||
call cfft_cp(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,-1,dfftp)
|
||||
|
@ -168,7 +165,11 @@ CONTAINS
|
|||
|
||||
#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
|
||||
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)
|
||||
END IF
|
||||
|
||||
# elif defined __COMPLIB || __SCSL || __SX6
|
||||
|
||||
call cfft3d(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,-1)
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
!
|
||||
#include "f_defs.h"
|
||||
!
|
||||
#if defined (__PARA)
|
||||
#if defined (__PARA) && ! defined (__USE_3D_FFT)
|
||||
!
|
||||
!----------------------------------------------------------------------------
|
||||
SUBROUTINE cft3( f, n1, n2, n3, nx1, nx2, nx3, sign )
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
!
|
||||
#include "f_defs.h"
|
||||
!
|
||||
#if defined (__PARA)
|
||||
#if defined (__PARA) && !defined(__USE_3D_FFT)
|
||||
!
|
||||
! ... parallel case
|
||||
!
|
||||
|
@ -263,7 +263,7 @@ SUBROUTINE cft3s( f, n1, n2, n3, nx1, nx2, nx3, sign )
|
|||
!
|
||||
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 )
|
||||
!
|
||||
|
@ -275,7 +275,7 @@ SUBROUTINE cft3s( f, n1, n2, n3, nx1, nx2, nx3, sign )
|
|||
!
|
||||
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 )
|
||||
!
|
||||
|
|
|
@ -272,7 +272,7 @@ SUBROUTINE ggen()
|
|||
IF (n3.LT.1) n3 = n3 + nr3
|
||||
IF (n3s.LT.1) n3s = n3s + nr3s
|
||||
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
|
||||
IF (ng.LE.ngms) nls (ng) = n3s + ( dffts%isind (n1s + (n2s - 1) &
|
||||
* nrx1s) - 1) * nrx3s
|
||||
|
@ -370,7 +370,7 @@ SUBROUTINE index_minusg()
|
|||
IF (n3 < 1) n3 = n3 + nr3
|
||||
IF (n3s < 1) n3s = n3s + nr3s
|
||||
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
|
||||
IF (ng.LE.ngms) nlsm(ng) = n3s + (dffts%isind (n1s + (n2s - 1) &
|
||||
* nrx1s) - 1) * nrx3s
|
||||
|
|
Loading…
Reference in New Issue