mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-03 20:54:00 +01:00
Changed mpirun into gaspi_run
This commit is contained in:
parent
4845b14fdc
commit
fe76bd313a
@ -15,7 +15,7 @@ let print_list () =
|
||||
let () =
|
||||
Random.self_init ()
|
||||
|
||||
let run slave mpi_command exe ezfio_file =
|
||||
let run slave gaspi_command exe ezfio_file =
|
||||
|
||||
|
||||
(** Check availability of the ports *)
|
||||
@ -115,9 +115,9 @@ let run slave mpi_command exe ezfio_file =
|
||||
match Sys.getenv "QP_PREFIX" with
|
||||
| Some x -> x^" "
|
||||
| None -> ""
|
||||
and mpi_command =
|
||||
match mpi_command with
|
||||
| Some mpirun -> mpirun^" "
|
||||
and gaspi_command =
|
||||
match gaspi_command with
|
||||
| Some gaspi_run -> gaspi_run^" "
|
||||
| None -> ""
|
||||
and exe =
|
||||
match (List.find ~f:(fun (x,_) -> x = exe) executables) with
|
||||
@ -125,7 +125,7 @@ let run slave mpi_command exe ezfio_file =
|
||||
| None -> assert false
|
||||
in
|
||||
let exit_code =
|
||||
match (Sys.command (prefix^mpi_command^exe^ezfio_file)) with
|
||||
match (Sys.command (prefix^gaspi_command^exe^ezfio_file)) with
|
||||
| 0 -> 0
|
||||
| i -> (Printf.printf "Program exited with code %d.\n%!" i; i)
|
||||
in
|
||||
@ -146,7 +146,7 @@ let spec =
|
||||
empty
|
||||
+> flag "slave" no_arg
|
||||
~doc:(" Needed for slave tasks")
|
||||
+> flag "mpirun" (optional string)
|
||||
+> flag "gaspi_run" (optional string)
|
||||
~doc:(" mpi launcher with its options")
|
||||
+> anon ("executable" %: string)
|
||||
+> anon ("ezfio_file" %: string)
|
||||
@ -165,8 +165,8 @@ Executes a Quantum Package binary file among these:\n\n"
|
||||
)
|
||||
)
|
||||
spec
|
||||
(fun slave mpi_command exe ezfio_file () ->
|
||||
run slave mpi_command exe ezfio_file
|
||||
(fun slave gaspi_command exe ezfio_file () ->
|
||||
run slave gaspi_command exe ezfio_file
|
||||
)
|
||||
|> Command.run ~version: Git.sha1 ~build_info: Git.message
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user