2004-11-25 22:51:47 +08:00
|
|
|
!
|
2005-05-17 03:19:04 +08:00
|
|
|
! Copyright (C) 2002-2005 FPMD-CPV groups
|
2004-11-25 22:51:47 +08:00
|
|
|
! This file is distributed under the terms of the
|
|
|
|
! GNU General Public License. See the file `License'
|
|
|
|
! in the root directory of the present distribution,
|
|
|
|
! or http://www.gnu.org/copyleft/gpl.txt .
|
|
|
|
!
|
|
|
|
MODULE turbo
|
|
|
|
|
|
|
|
USE kinds
|
|
|
|
IMPLICIT NONE
|
|
|
|
SAVE
|
|
|
|
|
|
|
|
PRIVATE
|
|
|
|
|
|
|
|
LOGICAL :: TTURBO
|
|
|
|
INTEGER :: NTURBO
|
2006-01-10 22:04:13 +08:00
|
|
|
COMPLEX(DP), ALLOCATABLE :: turbo_states(:,:)
|
2004-11-25 22:51:47 +08:00
|
|
|
|
2005-01-15 18:53:46 +08:00
|
|
|
PUBLIC :: tturbo, nturbo, turbo_states, turbo_init, allocate_turbo
|
2004-11-25 22:51:47 +08:00
|
|
|
PUBLIC :: deallocate_turbo
|
|
|
|
|
|
|
|
CONTAINS
|
|
|
|
|
2005-01-15 18:53:46 +08:00
|
|
|
SUBROUTINE turbo_init(tturbo_inp, nturbo_inp)
|
2004-11-25 22:51:47 +08:00
|
|
|
USE io_global, ONLY: ionode
|
|
|
|
USE io_global, ONLY: stdout
|
|
|
|
LOGICAL, INTENT(IN) :: tturbo_inp
|
|
|
|
INTEGER, INTENT(IN) :: nturbo_inp
|
|
|
|
tturbo = tturbo_inp
|
|
|
|
nturbo = nturbo_inp
|
|
|
|
IF( ionode .AND. tturbo ) THEN
|
|
|
|
WRITE( stdout,fmt='(/,3X,"TURBO setup, nturbo = ",I10)') nturbo
|
|
|
|
END IF
|
|
|
|
RETURN
|
2005-01-15 18:53:46 +08:00
|
|
|
END SUBROUTINE turbo_init
|
2004-11-25 22:51:47 +08:00
|
|
|
|
2006-01-10 22:04:13 +08:00
|
|
|
SUBROUTINE allocate_turbo( nnr )
|
2006-03-23 17:19:43 +08:00
|
|
|
USE io_global, ONLY: ionode, stdout
|
|
|
|
USE mp_global, ONLY: intra_image_comm
|
2004-11-25 22:51:47 +08:00
|
|
|
USE mp, ONLY: mp_sum
|
2006-01-10 22:04:13 +08:00
|
|
|
INTEGER :: nnr
|
2004-11-25 22:51:47 +08:00
|
|
|
INTEGER :: ierr
|
|
|
|
IF( ionode ) THEN
|
|
|
|
WRITE( stdout,fmt='(/,3X,"TURBO: allocating ",I10," bytes ")') &
|
2006-01-10 22:04:13 +08:00
|
|
|
16*nnr*nturbo
|
2004-11-25 22:51:47 +08:00
|
|
|
END IF
|
- FPMD: pseudopotential variable wsg, wnl, fnl substituted with
dion, beta, bec everyware.
- subroutines formfn, compute_beta, nlsm1, nlsm2, ecc ... now are common
between FPMD and CPV, a lot of clean ups!
- Changes in stdout: relevant physical quantities ( positions velocities an cell )
are now printed with the seme format of the corresponding input card,
like in PW, as was suggested by SdG.
- exemple23 updated to reflect the new input namelist "wannier"
- Subroutine init_run now is used in FPMD too.
- WARNING in the stress computed with CP, for a pseudo with core-corrections,
a contribution is missing! Not yet fixed, I need to talk with PG for the
box staff.
- WARNING the examples reference are not updated, I'm on the IBM sp, and
I prefer to update them from a linux machine.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2110 c92efa57-630b-4861-b058-cf58834340f0
2005-08-22 22:14:13 +08:00
|
|
|
IF( .NOT. ALLOCATED( turbo_states ) ) THEN
|
2006-01-10 22:04:13 +08:00
|
|
|
ALLOCATE( turbo_states( nnr, nturbo ), STAT = ierr)
|
2006-03-23 17:19:43 +08:00
|
|
|
CALL mp_sum( ierr, intra_image_comm )
|
- FPMD: pseudopotential variable wsg, wnl, fnl substituted with
dion, beta, bec everyware.
- subroutines formfn, compute_beta, nlsm1, nlsm2, ecc ... now are common
between FPMD and CPV, a lot of clean ups!
- Changes in stdout: relevant physical quantities ( positions velocities an cell )
are now printed with the seme format of the corresponding input card,
like in PW, as was suggested by SdG.
- exemple23 updated to reflect the new input namelist "wannier"
- Subroutine init_run now is used in FPMD too.
- WARNING in the stress computed with CP, for a pseudo with core-corrections,
a contribution is missing! Not yet fixed, I need to talk with PG for the
box staff.
- WARNING the examples reference are not updated, I'm on the IBM sp, and
I prefer to update them from a linux machine.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2110 c92efa57-630b-4861-b058-cf58834340f0
2005-08-22 22:14:13 +08:00
|
|
|
IF( ierr /= 0 ) THEN
|
|
|
|
IF( ionode ) THEN
|
|
|
|
WRITE( stdout,fmt='(3X,"TURBO: insufficient memory, turbo is switched off ")')
|
|
|
|
END IF
|
|
|
|
tturbo = .FALSE.
|
|
|
|
nturbo = 0
|
2004-11-25 22:51:47 +08:00
|
|
|
END IF
|
|
|
|
END IF
|
|
|
|
RETURN
|
2005-01-15 18:53:46 +08:00
|
|
|
END SUBROUTINE allocate_turbo
|
2004-11-25 22:51:47 +08:00
|
|
|
|
|
|
|
SUBROUTINE deallocate_turbo
|
|
|
|
INTEGER :: ierr
|
|
|
|
IF( ALLOCATED(turbo_states) ) THEN
|
|
|
|
DEALLOCATE(turbo_states, STAT=ierr)
|
|
|
|
IF( ierr /= 0 ) CALL errore(' deallocate_turbo ', ' deallocating turbo_states ', ierr)
|
|
|
|
END IF
|
|
|
|
RETURN
|
|
|
|
END SUBROUTINE deallocate_turbo
|
|
|
|
|
|
|
|
END MODULE turbo
|