ExaWorks / psij-python

MIT License
27 stars 13 forks source link

Documentation: Additional details needed for `custom_attributes` #398

Open Andrew-S-Rosen opened 1 year ago

Andrew-S-Rosen commented 1 year ago

It took me quite some time to ultimately figure out how to set the custom_attributes kwarg in JobAttributes. I think it warrants a brief section in the docs and a clearer docstring.

Basically, as it currently stands, I had assumed I could do custom_attributes={"constraints": "cpu"} but was puzzled when it didn't appear in the Slurm job script. Only through diving through the test suite was I able to figure out that I needed to do custom_attributes={"slurm.constraints": "cpu"} instead.

I am happy to add this, but it may take me a few days to get around to it.

RedStar-Iron commented 7 months ago

@Andrew-S-Rosen It also makes me confused a lot when I check this setting in the quacc. I tried to submit the vasp/emt jobs from my local env (wsl) to the Expanse, but always failed, without error file left in ~/.psij . I was wondering whether it can read the setting of job script from a Json or YAML file directly which has been implemented by dpdispatcher.

Andrew-S-Rosen commented 7 months ago

@RedStar-Iron --- let's keep this issue report for psij specific content. Happy to chat about quacc-related things on the dedicated repo. Let's move the conversation to here: https://github.com/Quantum-Accelerators/quacc/discussions/1837.

psij-python is a Python API meant to interface with various job schedulers and, potentially in the (more distant) future, support remote job submission and the pilot job model. It is not meant to read settings from job scripts generated elsewhere.

Note: The ~/.psij directory is on the remote machine, not your local one.

RedStar-Iron commented 7 months ago

@Andrew-S-Rosen Thanks for you immidiate reply! But I didn't find ~/.psij on my remote machine.

hategan commented 7 months ago

There is indeed no proper documentation on this issue. We'll get that fixed.