Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1672 +/- ##
===========================================
+ Coverage 78.30% 78.31% +0.01%
===========================================
Files 76 76
Lines 7582 7591 +9
Branches 1120 1120
===========================================
+ Hits 5937 5945 +8
Misses 1460 1460
- Partials 185 186 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thank you, @shuds13 ! I am trying it now 🚀 ✨ Will report back in a bit! |
|
@shuds13 just checking: is |
1508d18 to
1de8c05
Compare
Just plain last dir name. |
|
Awesome, thanks! |
| """ | ||
| sim_dir = os.path.relpath(task.workdir, self.base_dir) | ||
| task._add_to_env("LIBENSEMBLE_SIM_DIR", sim_dir) | ||
| return [arg.replace(LIBE_SIM_DIR_PLACEHOLDER, sim_dir) for arg in run_cmd] |
There was a problem hiding this comment.
I am not sure if it is applied to late or early or not at all, but my test using commit 140baf4 with
ev_main = TemplateEvaluator(
sim_template="templates/warpx_input_script",
analysis_func=analysis_func_main,
executable="/templates/warpx",
precedent="podman-hpc exec --workdir /data/%LIBENSEMBLE_SIM_DIR% warpx /opt/entrypoint.sh",
n_gpus=1, # GPUs per individual evaluation
env_mpi="srun",
)fails to replace it for the run line:
$ pip install -U \
git+https://github.com/ax3l/optimas.git@fix-app-check-container-bp-0.8.1 \
git+https://github.com/Libensemble/libensemble.git@140baf438ed55714fffa9660b1a391e935014966
Running command git clone --filter=blob:none --quiet https://github.com/ax3l/optimas.git /tmp/pip-req-build-idhfo1de
Running command git checkout -b fix-app-check-container-bp-0.8.1 --track origin/fix-app-check-container-bp-0.8.1
Switched to a new branch 'fix-app-check-container-bp-0.8.1'
branch 'fix-app-check-container-bp-0.8.1' set up to track 'origin/fix-app-check-container-bp-0.8.1'.
Running command git clone --filter=blob:none --quiet https://github.com/Libensemble/libensemble.git /tmp/pip-req-build-cdcrxjz4
Running command git rev-parse -q --verify 'sha^140baf438ed55714fffa9660b1a391e935014966'
Running command git fetch -q https://github.com/Libensemble/libensemble.git 140baf438ed55714fffa9660b1a391e935014966
Running command git checkout -q 140baf438ed55714fffa9660b1a391e935014966
[0] 2026-02-06 16:22:33,455 libensemble.libE (INFO): Logger initializing: [workerID] precedes each line. [0] = Manager
[0] 2026-02-06 16:22:33,456 libensemble.libE (INFO): libE version v1.5.0+dev
[0] 2026-02-06 16:22:33,460 libensemble.manager (INFO): Manager exit_criteria: {'sim_max': 1}
[1] 2026-02-06 16:22:40,313 libensemble.executors.mpi_executor (INFO): Launching task libe_task_sim_0_worker1_0: srun -w nid001508 --ntasks 1 --nodes 1 --ntasks-per-node 1 --exact podman-hpc exec --workdir /data/%LIBENSEMBLE_SIM_DIR%/ warpx /opt/entrypoint.sh prepare_simulation.py
...
->
Error: crun: chdir to `/data/%LIBENSEMBLE_SIM_DIR%/`: No such file or directory: OCI runtime attempted to invoke a command that was not found
There was a problem hiding this comment.
I will need to look more next week, maybe wrong place. But in the submit function, I can do this (just adding a precendent) in Optimas test_template_evaluator.py.
print(f'runline 1: {runline}')
runline = self._set_sim_dir_env(task, runline)
task.runline = " ".join(runline)
print(f'runline 2: {runline}')Output:
runline 1: ['mpirun', '-hosts', 'shuds', '-np', '1', '--ppn', '1', 'podman-hpc', 'exec', '--workdir', '/data/%LIBENSEMBLE_SIM_DIR%', 'warpx', '/opt/entrypoint.sh', 'template_simulation_script.py']
runline 2: ['mpirun', '-hosts', 'shuds', '-np', '1', '--ppn', '1', 'podman-hpc', 'exec', '--workdir', '/data/tests_output/test_template_evaluator/evaluations/sim0005', 'warpx', '/opt/entrypoint.sh', 'template_simulation_script.py']
Re: #1671
Replaces
%LIBENSEMBLE_SIM_DIR%with relative simulation dir in run line.Adds environment variable LIBENSEMBLE_SIM_DIR set to this relative dir.