Commit b2150113 authored by Govoni's avatar Govoni
Browse files

Use wstat_restart_dir.

parent 5f31d9f5
......@@ -14,7 +14,6 @@
MODULE pdep_db
!----------------------------------------------------------------------------
!
USE iotk_module
USE kinds, ONLY : DP
USE io_files, ONLY : tmp_dir
!
......@@ -32,7 +31,6 @@ MODULE pdep_db
SUBROUTINE pdep_db_write( )
!------------------------------------------------------------------------
!
USE xml_io_base, ONLY : create_directory
USE mp, ONLY : mp_bcast,mp_barrier
USE mp_world, ONLY : mpime,root,world_comm
USE mp_global, ONLY : my_image_id
......
......@@ -14,7 +14,6 @@
MODULE pdep_io
!----------------------------------------------------------------------------
!
USE iotk_module
USE kinds, ONLY : DP
USE mp_global, ONLY : me_bgrp,root_bgrp,nproc_bgrp,intra_bgrp_comm,my_pool_id,my_bgrp_id,inter_bgrp_comm,inter_pool_comm
USE westcom, ONLY : npwq0, npwq0_g, npwq0x
......@@ -64,8 +63,6 @@ MODULE pdep_io
! ONLY ROOT W/IN BGRP WRITES
!
IF(me_bgrp==root_bgrp) THEN
!
! ... open XML descriptor
!
ndim = npwq0_g
nbytes = SIZEOF(tmp_vec(1)) * ndim
......@@ -88,15 +85,6 @@ MODULE pdep_io
CLOSE( iunit )
!
DEALLOCATE( charbase64 )
!
!CALL iotk_free_unit( iun, ierr )
!CALL iotk_open_write( iun, FILE = TRIM(fname), BINARY = .TRUE.)
!CALL iotk_write_begin( iun, 'PDEP_GSPACE' )
!CALL iotk_write_dat( iun, "ndim" , npwq0_g )
!CALL iotk_write_dat( iun, "pdep" , tmp_vec(1:npwq0_g) )
!CALL iotk_write_end( iun, 'PDEP_GSPACE' )
!
!CALL iotk_close_write( iun )
!
END IF
!
......@@ -146,8 +134,6 @@ MODULE pdep_io
ndim = npwq0_g
nbytes = SIZEOF(tmp_vec(1)) * ndim
nlen = lenbase64(nbytes)
!CALL get_lenbase64( nbytes, lenbase64 )
!ALLOCATE(CHARACTER(LEN=lenbase64) :: charbase64)
!
IF(me_bgrp==root_bgrp) THEN
!
......@@ -160,29 +146,11 @@ MODULE pdep_io
READ( iunit, '(a)' ) charbase64
CLOSE( iunit )
CALL base64_decode_complex(charbase64(2:(nlen+1)), ndim, tmp_vec(1:ndim))
DEALLOCATE( charbase64 )
!
CALL json%load_from_string("{"//TRIM(line)//"}")
CALL json%get('meta.islittleendian', isle, found)
!
! CALL json%initialize()
! CALL json%load_file( filename = TRIM(fname) )
! !
! CALL json%get('meta.islittleendian', isle, found)
! CALL json%get('data', charbase64, found)
! !
CALL json%destroy()
! CALL base64_decode_complex(charbase64, ndim, tmp_vec(1:ndim))
!
DEALLOCATE( charbase64 )
!
! ... open XML descriptor
!
!CALL iotk_free_unit( iun, ierr )
!CALL iotk_open_read( iun, FILE = TRIM(fname), BINARY = .TRUE., IERR = ierr)
!CALL iotk_scan_begin( iun, 'PDEP_GSPACE' )
!CALL iotk_scan_dat( iun, "pdep" , tmp_vec(1:npwq0_g) )
!CALL iotk_scan_end( iun, 'PDEP_GSPACE' )
!CALL iotk_close_read( iun )
!
IF (islittleendian() .NEQV. isle) CALL base64_byteswap_complex(nbytes,tmp_vec(1:ndim))
!
......
......@@ -45,7 +45,6 @@ SUBROUTINE davidson_diago_gamma ( )
& n_pdep_restart_from_itr,n_pdep_read_from_file,n_steps_write_restart,n_pdep_times,npwq0x,&
& trev_pdep_rel,tr2_dfpt,l_is_wstat_converged
USE pdep_db, ONLY : pdep_db_write,pdep_db_read
! USE write_xml, ONLY : wstat_xml_dump
USE wstat_restart, ONLY : wstat_restart_write, wstat_restart_clear, wstat_restart_read
USE mp_world, ONLY : mpime
USE mp_global, ONLY : inter_image_comm
......@@ -425,7 +424,6 @@ SUBROUTINE davidson_diago_gamma ( )
!
END DO iterate
!
! CALL wstat_xml_dump( )
!
DEALLOCATE( conv )
DEALLOCATE( ew )
......@@ -459,7 +457,6 @@ SUBROUTINE davidson_diago_k ( )
& n_pdep_restart_from_itr,n_pdep_read_from_file,n_steps_write_restart,n_pdep_times,npwq0x,&
& trev_pdep_rel,tr2_dfpt,l_is_wstat_converged
USE pdep_db, ONLY : pdep_db_write,pdep_db_read
! USE write_xml, ONLY : wstat_xml_dump
USE wstat_restart, ONLY : wstat_restart_write, wstat_restart_clear, wstat_restart_read
USE mp_world, ONLY : mpime
USE mp_global, ONLY : inter_image_comm
......@@ -838,7 +835,6 @@ SUBROUTINE davidson_diago_k ( )
!
END DO iterate
!
! CALL wstat_xml_dump( )
!
DEALLOCATE( conv )
DEALLOCATE( ew )
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment