aiida-core icon indicating copy to clipboard operation
aiida-core copied to clipboard

Doc: quick start to lighting dive user in

Open unkcpz opened this issue 6 months ago • 2 comments

This probably can replace https://github.com/aiidateam/aiida-core/pull/6070. With the sqlite backend it is possible to easily start a services-less run for examples in basic tutorial even with data persistently stored.

Discussed with @giovannipizzi during MARVEL retreat, I provide a draft for the quickstart, with minor tricks need to do to having this services-less run as quick start. The basic idea is after pip install aiida, user can run things straightforward instead of go through postgresql/rabbitmq setup which might fail and push new user back and say AiiDA is not easy to use.

The only trick needed is after set the profile with sqlite_dos, the process control will be rabbitmq by default. By changing it to null will get a profile between sqlite_tmp and sqlite_dos (https://aiida.readthedocs.io/projects/aiida-core/en/latest/topics/storage.html). I think we can probably even provide verdi quickstart (TBD) to do not only having a specific demo purpose profile but also include the localhost setup into it. To make it possible to run some things by just having aiida-core install from pip. I think this can really lower the barrier for the new user.

Anyway, the goal here is to having something that new user come and can really start running a workflow in 2 mins.

unkcpz avatar Jan 24 '24 19:01 unkcpz

Thanks, looks great! And good points to simplify as you say, like preconfiguring some computer etc. I'll try myself! Is it clear what does jot work without rmq? Eg, can multiple subworkchains run in parallel, or only one at a time?

More importantly: probably this is a way to run some AiiDA workflow directly on a cluster, without installing AiiDA locally, but submitting directly a job that internally starts AiiDA in this simple mode, on one of the nodes, and then submits from there on the same node (ie localhost) some other job, eg a quantum espresso base restart work chain?

At the end one could just fetch the final results and ignore provenance, or export a .aiida archive file of they really care of the provenance. But this would be an interesting easy way to run a full qe restart work chain with all the logic, instead of just a qe, and without big installation. Probably we can even prepare a saris container with AiiDA pre-installed and the basic configuration there for localhost, so we have a very simple demo ready to be submitted on cscs for instance?

If you like the idea, we can test this and move this to a separate issue.

giovannipizzi avatar Jan 24 '24 21:01 giovannipizzi

Is it clear what does jot work without rmq? Eg, can multiple subworkchains run in parallel, or only one at a time?

Good question. Without rmq (daemon can not be started), we can not "submit" but only "run" the process in the event loop, and the code below is called https://github.com/aiidateam/aiida-core/blob/06ea130df8854f621e25853af6ac723c37397ed0/src/aiida/engine/processes/functions.py#L248-L253

So it is not able to run multiple workflows in parallel. I think this can be a case to push us to have a prototype of process controller that can be alternative of rabbitmq controller (toward https://github.com/aiidateam/AEP/pull/30), or a lightweight one for some simple user cases. As we have now multiple different storage backend.

Also a sub-optimal thing need to notice if we want to provide this quickstart: I tried to start the daemon, and verdi daemon start run without exceptions, but it actually failed with "communicator not set for runner", which can see from daemon log.

More importantly: probably this is a way to run some AiiDA workflow directly on a cluster, without installing AiiDA locally, but submitting directly a job that internally starts AiiDA in this simple mode, on one of the nodes, and then submits from there on the same node (ie localhost) some other job, eg a quantum espresso base restart work chain?

Sounds very interesting, but I don't think it is easy than configuring and running AiiDA in a standard way. It requires the remote has a proper python environment and the code need to be configure from remote which is hard to predict what will happened. But happy to discuss more how this can help with the user usability .

Probably we can even prepare a saris container with AiiDA pre-installed and the basic configuration there for localhost, so we have a very simple demo ready to be submitted on cscs for instance?

This is more or less the truth with the image I prepared in https://github.com/aiidateam/aiida-quantumespresso/pull/981, it is a container that can start and run qe calculation without furthur setup. It would be interesting to see if this image can be used to directly run thing on the node with Sarus.

unkcpz avatar Jan 25 '24 09:01 unkcpz

I think we can close this for now. Once we decide on the naming and implementation of verdi init we can address the documentation to have the quickstart route and the more advanced one.

sphuber avatar Apr 16 '24 10:04 sphuber

Sure, no problem, the PR is created after the MARVEL review to make the ball rolling. Glad that verdi init is in a good shape, thanks!

unkcpz avatar Apr 17 '24 10:04 unkcpz