added sleep 1 at the end of qp_run

This commit is contained in:
Anthony Scemama 2022-12-02 11:26:36 +01:00
parent cc0f226979
commit e9166599ad
2 changed files with 16 additions and 13 deletions

View File

@ -6,7 +6,7 @@ open Qputils
*)
let print_list () =
Lazy.force Qpackage.executables
|> List.iter (fun (x,_) -> Printf.printf " * %s\n" x)
@ -151,10 +151,11 @@ let run slave ?prefix exe ezfio_file =
let duration = Unix.time () -. time_start |> Unix.gmtime in
let open Unix in
let d, h, m, s =
duration.tm_yday, duration.tm_hour, duration.tm_min, duration.tm_sec
duration.tm_yday, duration.tm_hour, duration.tm_min, duration.tm_sec
in
Printf.printf "Wall time: %d:%2.2d:%2.2d" (d*24+h) m s ;
Printf.printf "\n\n";
Unix.sleep 1;
if (exit_code <> 0) then
exit exit_code
@ -187,7 +188,7 @@ let () =
end;
(* Handle options *)
let slave = Command_line.get_bool "slave"
let slave = Command_line.get_bool "slave"
and prefix = Command_line.get "prefix"
in

View File

@ -1697,7 +1697,7 @@ subroutine restore_symmetry(m,n,A,LDA,thresh)
! TODO: Costs O(n^4), but can be improved to (2 n^2 * log(n)):
! - copy all values in a 1D array
! - sort 1D array
! - average nearby elements
! - average nearby elements
! - for all elements, find matching value in the sorted 1D array
allocate(done(m,n))
@ -1800,7 +1800,7 @@ end
! A_tmp(i,k) = A(i,k)
! enddo
! enddo
!
!
! ! Find optimal size for temp arrays
! allocate(work(1))
! lwork = -1
@ -1836,7 +1836,7 @@ end
! endif
!
! deallocate(A_tmp,work)
!
!
! !do j=1, m
! ! do i=1, LDU
! ! if (dabs(U(i,j)) < 1.d-14) U(i,j) = 0.d0
@ -1847,7 +1847,7 @@ end
! ! if (dabs(Vt(i,j)) < 1.d-14) Vt(i,j) = 0.d0
! ! enddo
! !enddo
!
!
!end
!
@ -1877,8 +1877,8 @@ subroutine diag_nonsym_right(n, A, A_ldim, V, V_ldim, energy, E_ldim)
enddo
enddo
JOBVL = "N" ! computes the left eigenvectors
JOBVR = "V" ! computes the right eigenvectors
JOBVL = "N" ! computes the left eigenvectors
JOBVR = "V" ! computes the right eigenvectors
BALANC = "B" ! Diagonal scaling and Permutation for optimization
SENSE = "V" ! Determines which reciprocal condition numbers are computed
lda = n
@ -1888,10 +1888,10 @@ subroutine diag_nonsym_right(n, A, A_ldim, V, V_ldim, energy, E_ldim)
allocate( WORK(1), SCALE_array(n), RCONDE(n), RCONDV(n), IWORK(2*n-2) )
LWORK = -1 ! to ask for the optimal size of WORK
call dgeevx( BALANC, JOBVL, JOBVR, SENSE & ! CHARACTERS
call dgeevx( BALANC, JOBVL, JOBVR, SENSE & ! CHARACTERS
, n, Atmp, lda & ! MATRIX TO DIAGONALIZE
, WR, WI & ! REAL AND IMAGINARY PART OF EIGENVALUES
, VL, ldvl, VR, ldvr & ! LEFT AND RIGHT EIGENVECTORS
, WR, WI & ! REAL AND IMAGINARY PART OF EIGENVALUES
, VL, ldvl, VR, ldvr & ! LEFT AND RIGHT EIGENVECTORS
, ILO, IHI, SCALE_array, ABNRM, RCONDE, RCONDV & ! OUTPUTS OF OPTIMIZATION
, WORK, LWORK, IWORK, INFO )
@ -1900,7 +1900,7 @@ subroutine diag_nonsym_right(n, A, A_ldim, V, V_ldim, energy, E_ldim)
stop
endif
LWORK = max(int(work(1)), 1) ! this is the optimal size of WORK
LWORK = max(int(work(1)), 1) ! this is the optimal size of WORK
deallocate(WORK)
allocate(WORK(LWORK))
call dgeevx( BALANC, JOBVL, JOBVR, SENSE &
@ -1982,4 +1982,6 @@ end subroutine diag_nonsym_right
! ---
! Taken from GammCor thanks to Michal Hapka :-)