diff --git a/ns3 b/ns3 index 60d3d44bf..3b1994179 100755 --- a/ns3 +++ b/ns3 @@ -1506,7 +1506,11 @@ def run_step(args, target_to_run, target_args): if target_to_run in ["mpiexec", "mpirun"] and os.getenv("MPI_CI"): if shutil.which("ompi_info"): target_args = ["--oversubscribe"] + target_args - target_args = ["--allow-run-as-root"] + target_args + try: + subprocess.check_call([target_to_run, "--allow-run-as-root", "dir"]) + target_args = ["--allow-run-as-root"] + target_args + except subprocess.CalledProcessError: + pass program_arguments = [*debugging_software, target_to_run, *target_args]