Closed bilke closed 6 months ago
The problem is not really with the code that you highlighted, but rather in aiida-core
. Currently it only allows a CalcJob
implementation to specify files to retrieve within the working directory. However, I think the following work around may work for you:
launch_shell_job(
...,
outputs=['bar.txt'],
metadata={
'options': {
'append_text': 'ln -s /data/foo/bar.txt bar.txt',
}
}
)
The append_text
are bash commands that are added to the submit script after the main command. So you can use it to create a soft link inside the working directory to the target file. The file can then be retrieved through the relative filename.
Let me know if that works.
Yes this works, thanks!
I have a shell job which produces some output files in a specific directory which is not the working directory of the job, e.g.
/data/foo/bar.txt
. I specify this when runninglaunch_shell_job(..., outputs=['/data/foo/bar.txt'])
but get the following error:I think it is because of https://github.com/sphuber/aiida-shell/blob/31ebfbcde77f30a34a5495f349c19424d8dc1984/src/aiida_shell/parsers/shell.py#L123.
Do you think it is possible to specify an absolute output file path? Thanks for your help!