From 072682204711682a9b41f07373b26a9e235ee0c2 Mon Sep 17 00:00:00 2001 From: Jonathan Yates Date: Sat, 2 Dec 2017 21:46:50 +0000 Subject: [PATCH] Fix for restarts: parallel (plotting), serial and paralllel (site symmetry) --- src/wannier_prog.F90 | 1 + src/wannierise.F90 | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wannier_prog.F90 b/src/wannier_prog.F90 index 4885ad034..4d06733f4 100644 --- a/src/wannier_prog.F90 +++ b/src/wannier_prog.F90 @@ -153,6 +153,7 @@ program wannier else ! restart a previous calculation if(on_root) call param_read_chkpt() call param_chkpt_dist + if (lsitesymmetry) call sitesym_read() ! update this to read on root and bcast - JRY select case (restart) case ('default') ! continue from where last checkpoint was written diff --git a/src/wannierise.F90 b/src/wannierise.F90 index 88528db11..842f9097c 100644 --- a/src/wannierise.F90 +++ b/src/wannierise.F90 @@ -532,7 +532,7 @@ subroutine wann_main do nn = 1, nntot m_matrix_1b_loc=m_matrix_loc(:,:,nn,:) call comms_gatherv(m_matrix_1b_loc,num_wann*num_wann*counts(my_node_id),& - m_matrix,num_wann*num_wann*counts,num_wann*num_wann*displs) + m_matrix_1b,num_wann*num_wann*counts,num_wann*num_wann*displs) call comms_bcast(m_matrix_1b(1,1,1),num_wann*num_wann*num_kpts) m_matrix(:,:,nn,:)=m_matrix_1b(:,:,:) end do!nn @@ -2514,11 +2514,11 @@ subroutine wann_main_gamma if (ierr/=0) call io_error('Error in allocating cz in wann_main_gamma') cz=cmplx_0 - - ! Set up the MPI arrays for a serial run. + allocate( counts(0:0), displs(0:0), stat=ierr ) if (ierr/=0) call io_error('Error in allocating counts and displs in wann_main_gamma') - counts(0)=0; displs(0)=0 + counts(0)=0;displs(0)=0 + ! store original U before rotating !~ ! phase factor ph_g is applied to u_matrix !~ ! NB: ph_g is applied to u_matrix_opt if (have_disentangled)