quacc icon indicating copy to clipboard operation
quacc copied to clipboard

Failed in redecorating ESPRESSO_PARALLEL_CMD with jobflow

Open yw-fang opened this issue 1 year ago • 2 comments

What would you like to report?

This issue was raised from this discussion: https://github.com/Quantum-Accelerators/quacc/discussions/2491

The code to reproduce this issue:

from jobflow_remote import submit_flow
from jobflow import Flow
from ase.build import bulk
from quacc.recipes.espresso.core import relax_job
from quacc import change_settings
from quacc import job, redecorate

atoms = bulk('Cu')

espresso_parallel_cmd = ("srun --cpu_bind=cores", "-npool 2")
relax_job_ = redecorate(relax_job, job(settings_swap={"ESPRESSO_PARALLEL_CMD": espresso_parallel_cmd}))

job = relax_job_(atoms, relax_run=False)

flow = Flow(jobs=[job])

resources = {"nodes": 1, "partition": "general", "qos": "test" , "nodes": "1", "ntasks_per_node": "8"}

response = submit_flow(flow, worker='example_worker', resources=resources)
print(response)

The "-npool 2" in espresso_parallel_cmd was not passed to the remote HPC successfully. This issue could be caused by that jobflow also has a same decorator @job as quacc.

yw-fang avatar Oct 17 '24 17:10 yw-fang

Thanks for the report.

This issue could be caused by that jobflow also has a same decorator @job as quacc.

This is not the issue, as the quacc @job decorator becomes the jobflow @job decorator when the jobflow workflow engine is selected.

Andrew-S-Rosen avatar Oct 17 '24 18:10 Andrew-S-Rosen

Thanks for the report.

This issue could be caused by that jobflow also has a same decorator @job as quacc.

This is not the issue, as the quacc @job decorator becomes the jobflow @job decorator when the jobflow workflow engine is selected.

Thanks for pointing it out. I will change the subject to avoid misleading.

yw-fang avatar Oct 17 '24 19:10 yw-fang