From 7e8167f76d4dde5032cf44ebb4c680dac3466c13 Mon Sep 17 00:00:00 2001 From: Jorge Ejarque Date: Fri, 4 Aug 2023 19:22:15 +0200 Subject: [PATCH] fixes to run PTF container --- .../main/java/es/bsc/compss/invokers/binary/MPIInvoker.java | 4 ++-- compss/runtime/scripts/user/launch_compss | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/compss/runtime/adaptors/execution/src/main/java/es/bsc/compss/invokers/binary/MPIInvoker.java b/compss/runtime/adaptors/execution/src/main/java/es/bsc/compss/invokers/binary/MPIInvoker.java index 4c5d76030a..daad17390d 100644 --- a/compss/runtime/adaptors/execution/src/main/java/es/bsc/compss/invokers/binary/MPIInvoker.java +++ b/compss/runtime/adaptors/execution/src/main/java/es/bsc/compss/invokers/binary/MPIInvoker.java @@ -291,9 +291,9 @@ private Object runInvocation() throws InvokeExecutionException { this.context.getThreadErrStream(), null, this.mpiDef.isFailByEV()); } - private static boolean isOnContainer() { + private boolean isOnContainer() { String masterContImage = System.getenv(COMPSsConstants.MASTER_CONTAINER_IMAGE); - return masterContImage != null && !masterContImage.isEmpty(); + return masterContImage != null && !masterContImage.isEmpty() && this.numWorkers > 1; } @Override diff --git a/compss/runtime/scripts/user/launch_compss b/compss/runtime/scripts/user/launch_compss index 1b289712d9..a295cc1e26 100755 --- a/compss/runtime/scripts/user/launch_compss +++ b/compss/runtime/scripts/user/launch_compss @@ -1316,7 +1316,11 @@ get_args() { container_compss_path=${OPTARG//container_compss_path=/} ;; container_opts=*) - container_opts=${OPTARG//container_opts=/} + if [ -z "${container_opts}" ]; then + container_opts=${OPTARG//container_opts=/} + else + container_opts="${container_opts} ${OPTARG//container_opts=/}" + fi ;; elasticity=*) elasticity=${OPTARG//elasticity=/}