Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JobCalculations that are cached do not have anything in their repo folder #1744

Closed
giovannipizzi opened this issue Jul 12, 2018 · 8 comments
Closed

Comments

@giovannipizzi
Copy link
Member

Therefore, for instance, doing a verdi calculation inputcat on a cached calculation gives an error.

I think the correct behaviour should be, beside copying all attributes, also copying the whole repository folder.
@greschd do you agree? Where is the code to do this?
Also, I think maybe this should be fixed both in 0.12.x and in develop?

@greschd
Copy link
Member

greschd commented Jul 12, 2018

I agree, it should also copy the folder contents. In principle that is done in the Node._store_from_cache method, but I need to check why this fails.

Do you have a minimal failing example for testing?

@giovannipizzi
Copy link
Member Author

Well, I imagine is reproducible, our was in a workflow, but I think that if you enable caching and run e.g. the file
examples/submission/quantumespresso/test_pw.py from aiida-quantumespresso and run it twice, it should show the problem (notes: the example already has the pseudos; but it is still written in the "old-style").

@greschd
Copy link
Member

greschd commented Jul 12, 2018

As far as I can tell, it's the get_folder_list method which is broken (doesn't return anything).

@greschd
Copy link
Member

greschd commented Jul 12, 2018

Ah I see, that only returns things which are inside the path, while the inputs are in the raw_input folder. So, what's the best way to copy the whole folder?

@giovannipizzi
Copy link
Member Author

if new is the node you are creating, and old the one you are caching from, this should work:

new.folder.replace_with_folder(old.folder.abspath, move=False, overwrite=True)

@greschd
Copy link
Member

greschd commented Jul 12, 2018

Yeah, I found it in the meantime 👍

For the v0.12 version, this is implemented in Node.copy. Do you know if it is safe to change there, or might this have unintended consequences?

@giovannipizzi
Copy link
Member Author

Thanks @greschd!

@giovannipizzi
Copy link
Member Author

@AntimoMarrazzo FYI this is now fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants