From b4b1d23f64f0514156ac3816dad6976aa28b572a Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sat, 22 Jul 2017 13:15:09 +0200 Subject: [PATCH] Fixed gaspi_command --- bin/qp_gaspi_run | 6 ++++++ ocaml/qp_run.ml | 14 ++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100755 bin/qp_gaspi_run diff --git a/bin/qp_gaspi_run b/bin/qp_gaspi_run new file mode 100755 index 00000000..ec54afdc --- /dev/null +++ b/bin/qp_gaspi_run @@ -0,0 +1,6 @@ +#!/bin/bash + +QP_ROOT=$( cd $(dirname "${BASH_SOURCE}")/.. ; pwd -P ) +source $HOME/.bashrc +source $QP_ROOT/quantum_package.rc +exec $QP_ROOT/ocaml/qp_run $@ diff --git a/ocaml/qp_run.ml b/ocaml/qp_run.ml index e0ec5a4a..5a656d2d 100644 --- a/ocaml/qp_run.ml +++ b/ocaml/qp_run.ml @@ -15,7 +15,7 @@ let print_list () = let () = Random.self_init () -let run slave gaspi_command exe ezfio_file = +let run slave exe ezfio_file = (** Check availability of the ports *) @@ -115,17 +115,13 @@ let run slave gaspi_command exe ezfio_file = match Sys.getenv "QP_PREFIX" with | Some x -> x^" " | None -> "" - 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 | Some (_,x) -> x^" " | None -> assert false in let exit_code = - match (Sys.command (prefix^gaspi_command^exe^ezfio_file)) with + match (Sys.command (prefix^exe^ezfio_file)) with | 0 -> 0 | i -> (Printf.printf "Program exited with code %d.\n%!" i; i) in @@ -146,8 +142,6 @@ let spec = empty +> flag "slave" no_arg ~doc:(" Needed for slave tasks") - +> flag "gaspi_run" (optional string) - ~doc:(" mpi launcher with its options") +> anon ("executable" %: string) +> anon ("ezfio_file" %: string) ;; @@ -165,8 +159,8 @@ Executes a Quantum Package binary file among these:\n\n" ) ) spec - (fun slave gaspi_command exe ezfio_file () -> - run slave gaspi_command exe ezfio_file + (fun slave exe ezfio_file () -> + run slave exe ezfio_file ) |> Command.run ~version: Git.sha1 ~build_info: Git.message