mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-06-12 23:55:18 +02:00
added sleep 1 at the end of qp_run
This commit is contained in:
parent
cc0f226979
commit
e9166599ad
|
@ -6,7 +6,7 @@ open Qputils
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
|
||||||
let print_list () =
|
let print_list () =
|
||||||
Lazy.force Qpackage.executables
|
Lazy.force Qpackage.executables
|
||||||
|> List.iter (fun (x,_) -> Printf.printf " * %s\n" x)
|
|> 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 duration = Unix.time () -. time_start |> Unix.gmtime in
|
||||||
let open Unix in
|
let open Unix in
|
||||||
let d, h, m, s =
|
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
|
in
|
||||||
Printf.printf "Wall time: %d:%2.2d:%2.2d" (d*24+h) m s ;
|
Printf.printf "Wall time: %d:%2.2d:%2.2d" (d*24+h) m s ;
|
||||||
Printf.printf "\n\n";
|
Printf.printf "\n\n";
|
||||||
|
Unix.sleep 1;
|
||||||
if (exit_code <> 0) then
|
if (exit_code <> 0) then
|
||||||
exit exit_code
|
exit exit_code
|
||||||
|
|
||||||
|
@ -187,7 +188,7 @@ let () =
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(* Handle options *)
|
(* Handle options *)
|
||||||
let slave = Command_line.get_bool "slave"
|
let slave = Command_line.get_bool "slave"
|
||||||
and prefix = Command_line.get "prefix"
|
and prefix = Command_line.get "prefix"
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
|
@ -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)):
|
! TODO: Costs O(n^4), but can be improved to (2 n^2 * log(n)):
|
||||||
! - copy all values in a 1D array
|
! - copy all values in a 1D array
|
||||||
! - sort 1D array
|
! - sort 1D array
|
||||||
! - average nearby elements
|
! - average nearby elements
|
||||||
! - for all elements, find matching value in the sorted 1D array
|
! - for all elements, find matching value in the sorted 1D array
|
||||||
|
|
||||||
allocate(done(m,n))
|
allocate(done(m,n))
|
||||||
|
@ -1800,7 +1800,7 @@ end
|
||||||
! A_tmp(i,k) = A(i,k)
|
! A_tmp(i,k) = A(i,k)
|
||||||
! enddo
|
! enddo
|
||||||
! enddo
|
! enddo
|
||||||
!
|
!
|
||||||
! ! Find optimal size for temp arrays
|
! ! Find optimal size for temp arrays
|
||||||
! allocate(work(1))
|
! allocate(work(1))
|
||||||
! lwork = -1
|
! lwork = -1
|
||||||
|
@ -1836,7 +1836,7 @@ end
|
||||||
! endif
|
! endif
|
||||||
!
|
!
|
||||||
! deallocate(A_tmp,work)
|
! deallocate(A_tmp,work)
|
||||||
!
|
!
|
||||||
! !do j=1, m
|
! !do j=1, m
|
||||||
! ! do i=1, LDU
|
! ! do i=1, LDU
|
||||||
! ! if (dabs(U(i,j)) < 1.d-14) U(i,j) = 0.d0
|
! ! 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
|
! ! if (dabs(Vt(i,j)) < 1.d-14) Vt(i,j) = 0.d0
|
||||||
! ! enddo
|
! ! enddo
|
||||||
! !enddo
|
! !enddo
|
||||||
!
|
!
|
||||||
!end
|
!end
|
||||||
!
|
!
|
||||||
|
|
||||||
|
@ -1877,8 +1877,8 @@ subroutine diag_nonsym_right(n, A, A_ldim, V, V_ldim, energy, E_ldim)
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
JOBVL = "N" ! computes the left eigenvectors
|
JOBVL = "N" ! computes the left eigenvectors
|
||||||
JOBVR = "V" ! computes the right eigenvectors
|
JOBVR = "V" ! computes the right eigenvectors
|
||||||
BALANC = "B" ! Diagonal scaling and Permutation for optimization
|
BALANC = "B" ! Diagonal scaling and Permutation for optimization
|
||||||
SENSE = "V" ! Determines which reciprocal condition numbers are computed
|
SENSE = "V" ! Determines which reciprocal condition numbers are computed
|
||||||
lda = n
|
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) )
|
allocate( WORK(1), SCALE_array(n), RCONDE(n), RCONDV(n), IWORK(2*n-2) )
|
||||||
|
|
||||||
LWORK = -1 ! to ask for the optimal size of WORK
|
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
|
, n, Atmp, lda & ! MATRIX TO DIAGONALIZE
|
||||||
, WR, WI & ! REAL AND IMAGINARY PART OF EIGENVALUES
|
, WR, WI & ! REAL AND IMAGINARY PART OF EIGENVALUES
|
||||||
, VL, ldvl, VR, ldvr & ! LEFT AND RIGHT EIGENVECTORS
|
, VL, ldvl, VR, ldvr & ! LEFT AND RIGHT EIGENVECTORS
|
||||||
, ILO, IHI, SCALE_array, ABNRM, RCONDE, RCONDV & ! OUTPUTS OF OPTIMIZATION
|
, ILO, IHI, SCALE_array, ABNRM, RCONDE, RCONDV & ! OUTPUTS OF OPTIMIZATION
|
||||||
, WORK, LWORK, IWORK, INFO )
|
, WORK, LWORK, IWORK, INFO )
|
||||||
|
|
||||||
|
@ -1900,7 +1900,7 @@ subroutine diag_nonsym_right(n, A, A_ldim, V, V_ldim, energy, E_ldim)
|
||||||
stop
|
stop
|
||||||
endif
|
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)
|
deallocate(WORK)
|
||||||
allocate(WORK(LWORK))
|
allocate(WORK(LWORK))
|
||||||
call dgeevx( BALANC, JOBVL, JOBVR, SENSE &
|
call dgeevx( BALANC, JOBVL, JOBVR, SENSE &
|
||||||
|
@ -1982,4 +1982,6 @@ end subroutine diag_nonsym_right
|
||||||
|
|
||||||
! ---
|
! ---
|
||||||
|
|
||||||
|
! Taken from GammCor thanks to Michal Hapka :-)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user