marvel-nccr/ansible-role-aiida

Set up of Siesta code is wrong.

Closed this issue · 6 comments

Not even sure if the issue is here, but the code siesta-v4.1-rc1-siesta available from the aiida set up in the quantum mobile (last version at least) contains a wrong remote absolute path. It shows local/Obj instead of local/bin.
This makes aiida_siesta unusable in the quantum mobile.

ok, thanks for reporting!
would you mind making a PR to fix the role?

Edit: Indeed, the validation of file paths for codes is a contentious issue aiidateam/aiida-core#868 but here it would have helped

Sorry @ltalirz but I have no idea about the mechanism.
Is it here?
https://github.com/marvel-nccr/ansible-role-siesta/blob/ab36d895eba05504d0ede8589ff9fbb6ca862148/defaults/main.yml#L26

When you install siesta, the executable is in the Obj folder of the siesta package. However in the quantum mobile all the executables seem to be in /usr/local/bin. I guess you copy them automatically after installation.

Indeed - I see the executables are now copied one by one https://github.com/marvel-nccr/ansible-role-siesta/blob/ab36d895eba05504d0ede8589ff9fbb6ca862148/tasks/main.yml#L81-L132 (I guess this was introduced by Alberto).

Simply removing the /Obj postfix should resolve the issue.

...mmm... I'm not understanding. The siesta executable is in the folder /usr/local/bin, so I think everything is correct from the siesta role. The problem comes in the setting up of the code in aiida. Is it done here:

- name: set up siesta codes for localhost
include_tasks: code-setup.yml
vars:
- aiida_code:
label: "siesta-{{ siesta_version }}-{{ item.name }}"
template: code.yml
executable: "{{ item.name }}"
folder: "{{ item.folder }}"
plugin: "{{ item.plugin }}"
description: "siesta v{{ siesta_version }}"
with_items: "{{ siesta_executables }}"
when:
- siesta_executables is defined
- item.plugin is defined

The item.name is correct. What is the item.folder? I'm very confused

Ok, now I understood. So this folder is not used in the task of the siesta-role, but it is used by the aiida-role. Ok. I'll fix it.
Cheers!