mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
Removed Core from qp_run
This commit is contained in:
commit
a145334269
2
configure
vendored
2
configure
vendored
@ -60,7 +60,7 @@ function execute () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PACKAGES=""
|
PACKAGES=""
|
||||||
OCAML_PACKAGES="ocamlbuild cryptokit zmq core sexplib ppx_sexp_conv ppx_deriving getopt"
|
OCAML_PACKAGES="ocamlbuild cryptokit zmq core.v0.11.3 sexplib ppx_sexp_conv ppx_deriving getopt"
|
||||||
|
|
||||||
while true ; do
|
while true ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -46,7 +46,7 @@ let run slave ?prefix exe ezfio_file =
|
|||||||
in
|
in
|
||||||
|
|
||||||
let time_start =
|
let time_start =
|
||||||
Core.Time.now ()
|
Unix.time ()
|
||||||
in
|
in
|
||||||
|
|
||||||
if (not (Sys.file_exists ezfio_file)) then
|
if (not (Sys.file_exists ezfio_file)) then
|
||||||
@ -65,7 +65,15 @@ let run slave ?prefix exe ezfio_file =
|
|||||||
failwith ("Executable "^exe^" not found")
|
failwith ("Executable "^exe^" not found")
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Printf.printf "%s\n" (Core.Time.to_string time_start);
|
let tm = Unix.localtime time_start in
|
||||||
|
Printf.printf "Date: %2.2d/%2.2d/%4d %2.2d:%2.2d:%2.2d\n"
|
||||||
|
tm.Unix.tm_mday
|
||||||
|
(tm.Unix.tm_mon+1)
|
||||||
|
(tm.Unix.tm_year+1900)
|
||||||
|
(tm.Unix.tm_hour + if tm.Unix.tm_isdst then 1 else 0)
|
||||||
|
tm.Unix.tm_min
|
||||||
|
tm.Unix.tm_sec
|
||||||
|
;
|
||||||
Printf.printf "===============\nQuantum Package\n===============\n\n";
|
Printf.printf "===============\nQuantum Package\n===============\n\n";
|
||||||
Printf.printf "Git Commit: %s\n" Git.message;
|
Printf.printf "Git Commit: %s\n" Git.message;
|
||||||
Printf.printf "Git Date : %s\n" Git.date;
|
Printf.printf "Git Date : %s\n" Git.date;
|
||||||
@ -89,10 +97,12 @@ let run slave ?prefix exe ezfio_file =
|
|||||||
if slave then
|
if slave then
|
||||||
try
|
try
|
||||||
let address =
|
let address =
|
||||||
Core.In_channel.read_all qp_run_address_filename
|
let ic = open_in qp_run_address_filename in
|
||||||
|> String.trim
|
let result = input_line ic in
|
||||||
|
close_in ic;
|
||||||
|
String.trim result
|
||||||
in
|
in
|
||||||
Unix.putenv "QP_RUN_ADDRESS_MASTER" address
|
Unix.putenv "QP_RUN_ADDRESS_MASTER" address;
|
||||||
with Sys_error _ -> failwith "No master is not running"
|
with Sys_error _ -> failwith "No master is not running"
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -110,8 +120,11 @@ let run slave ?prefix exe ezfio_file =
|
|||||||
Unix.putenv "QP_RUN_ADDRESS" address;
|
Unix.putenv "QP_RUN_ADDRESS" address;
|
||||||
let () =
|
let () =
|
||||||
if (not slave) then
|
if (not slave) then
|
||||||
Core.Out_channel.with_file qp_run_address_filename ~f:(
|
begin
|
||||||
fun oc -> Core.Out_channel.output_lines oc [address])
|
let oc = open_out qp_run_address_filename in
|
||||||
|
Printf.fprintf oc "%s\n" address;
|
||||||
|
close_out oc;
|
||||||
|
end
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
||||||
@ -135,9 +148,13 @@ let run slave ?prefix exe ezfio_file =
|
|||||||
if (not slave) then
|
if (not slave) then
|
||||||
Sys.remove qp_run_address_filename;
|
Sys.remove qp_run_address_filename;
|
||||||
|
|
||||||
let duration = Core.Time.diff (Core.Time.now()) time_start
|
let duration = Unix.time () -. time_start |> Unix.gmtime in
|
||||||
|> Core.Time.Span.to_string in
|
let open Unix in
|
||||||
Printf.printf "Wall time : %s\n\n" duration;
|
let d, h, m, s =
|
||||||
|
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";
|
||||||
if (exit_code <> 0) then
|
if (exit_code <> 0) then
|
||||||
exit exit_code
|
exit exit_code
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ program fci
|
|||||||
else
|
else
|
||||||
PROVIDE mo_two_e_integrals_in_map
|
PROVIDE mo_two_e_integrals_in_map
|
||||||
|
|
||||||
!call run_slave_cipsi
|
call run_slave_cipsi
|
||||||
|
|
||||||
endif
|
endif
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user