Quantum-Accelerators / quacc

quacc is a flexible platform for computational materials science and quantum chemistry that is built for the big data era.
https://quantum-accelerators.github.io/quacc/
BSD 3-Clause "New" or "Revised" License
176 stars 47 forks source link

Failed in redecorating ESPRESSO_PARALLEL_CMD with jobflow #2501

Open yw-fang opened 23 hours ago

yw-fang commented 23 hours ago

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.

Andrew-S-Rosen commented 23 hours ago

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.

yw-fang commented 22 hours ago

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.