Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion install/install_ibcdfo.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

git clone --recurse-submodules -b develop https://github.com/POptUS/IBCDFO.git
git clone --recurse-submodules -b main https://github.com/POptUS/IBCDFO.git
pushd IBCDFO/minq/py/minq5/
export PYTHONPATH="$PYTHONPATH:$(pwd)"
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
Expand Down
14 changes: 10 additions & 4 deletions libensemble/executors/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,16 @@ def set_worker_info(self, comm=None, workerid=None) -> None:
self.workerID = workerid
self.comm = comm

def _check_app_exists(self, full_path: str) -> None:
def _check_app_exists(self, app: Application) -> None:
"""Allows submit function to check if app exists and error if not"""
if not os.path.isfile(full_path):
raise ExecutorException(f"Application does not exist {full_path}")
if app.precedent is not None:
# Could be a container call in precedent. In that case,
# the executable is not available on the host system and
# we just forward what the user provided.
return

if not os.path.isfile(app.full_path):
raise ExecutorException(f"Application does not exist {app.full_path}")

def submit(
self,
Expand Down Expand Up @@ -745,7 +751,7 @@ def submit(
task = Task(app, app_args, default_workdir, stdout, stderr, self.workerID, dry_run)

if not dry_run:
self._check_app_exists(task.app.full_path)
self._check_app_exists(task.app)

runline = task.app.app_cmd.split()
if task.app_args is not None:
Expand Down
2 changes: 1 addition & 1 deletion libensemble/executors/mpi_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def submit(
task = Task(app, app_args, default_workdir, stdout, stderr, self.workerID, dry_run)

if not dry_run:
self._check_app_exists(task.app.full_path)
self._check_app_exists(task.app)

if stage_inout is not None:
logger.warning("stage_inout option ignored in this " "executor - runs in-place")
Expand Down
8 changes: 4 additions & 4 deletions libensemble/tests/unit_tests/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,8 @@ def test_non_existent_app():

try:
w_exctr.submit(app_name="nonexist")
except ExecutorException as e:
assert e.args[0] == "Application does not exist simdir/non_exist.x"
except FileNotFoundError as e:
assert e.filename == "simdir/non_exist.x"
else:
assert 0

Expand All @@ -930,8 +930,8 @@ def test_non_existent_app_mpi():

try:
w_exctr.submit(app_name="nonexist")
except ExecutorException as e:
assert e.args[0] == "Application does not exist simdir/non_exist.x"
except MPIResourcesException:
pass
else:
assert 0

Expand Down
Loading