gadi went down last night and killed existing persistent sessions.
I (re)started one with a different name from previous, logged out of gadi, logged back in, ssh’d to the new persistent session, and ran rose-suite clean just to be certain everything was pulled through.
rose-suite run then failed with:
[FAIL] cylc run u-by395-ram3_flagship # return-code=1, stderr=
[FAIL]
[FAIL] ERROR: No hosts currently compatible with this global configuration:
[FAIL] suite servers -> run hosts:
[FAIL] ['gadi-persistent-session.bw6466.fy29.ps.gadi.nci.org.au']
[FAIL] suite servers -> run host select -> rank:
[FAIL] random
[FAIL] suite servers -> run host select -> thresholds:
[FAIL] None
My old persistent session name was gadi-persistent-session
My new one was fy29-persistent-session
I can’t for the life of me figure out where the suite or cylc is storing the information about the old persistent session name. It doesn’t seem to be in the suite’s rose directory - grepping it for gadi-persistent-session returns nothing.
.config/gadi-login.conf only contains my default project.
My .persistent-sessions/cylc-session contains the new persistent session name.
For now I’ve taken the path of least resistance and created another persistent session with the old persistent session name so that I can run the suite, but it would be good to know what I am missing for a new session name to be picked up by cylc.
I’m not completely sure where your error comes from, but one possible reason is that you changed the content of .persistent-sessions/cylc-session with the new persistent-session name only after having already loaded the cylc module.
Cylc gets its linked persistent-session at load-time from the .persistent-sessions/cylc-session file.
In that case, you can try unloading and re-loading the cylc module and it should work (at load-time it should tell you which persistent-session it is connected to).
Also, just out of curiosity, was there a specific reason why you renamed your persistent-session?
one possible reason is that you changed the content of .persistent-sessions/cylc-session with the new persistent-session name only after having already loaded the cylc module.
I don’t think it’s this - my order of operation was I created the new session, ssh’d into it and then did my standard suite setup, which includes loading cylc.
Also, just out of curiosity, was there a specific reason why you renamed your persistent-session?
Yes - mistake! But also to align with the naming of compute project-based persistent-sessions, as I have a few rather than just the one so it’s easier to have them named by project.
It’s not a biggie for now, I have the suite running under the old session name. I’ll come back to it after the long weekend and see if it’s still persisting, and we can dig further if necessary.
Not sure if this will help your case, but playing around with this I found out something I didn’t know (double-checked the cylc modulefile source code):
The persistent session used by Cylc at runtime is the value of the CYLC_SESSION env variable.
At module load-time, Cylc reads the CYLC_SESSION env variable first.
If the env variable is empty or not set, it reads the ~/.persistent-session/cylc-session file and assigns the content of its last line to the CYLC_SESSION variable
If the env variable is non-empty, it stores its value into the ~/.persistent-session/cylc-session file
This means that the ~/.persistent-session/cylc-session can be changed by setting the CYLC_SESSION variable (which is the main source of information at runtime) and then loading the cylc module.
Hi @atteggiani, sorry for the delay - end of compute Q madness
I tracked this down to having hardcoded the (original) cylc session name into one of my setup scripts
Thanks for your help though, and the information above is very useful to know!
This is something we’ve wondered about in terms of the case where a user might be running multiple suites concurrently, but wants to run different suites / runs on different compute projects. This would require changing the default project in the gadi login conf, and also running the suites in different persistent sessions.
The above sounds like this wouldn’t be possible, as the setup of the second persistent session would overwrite ~/.persistent-session/cylc-session, which would cause a conflict for the first suite that’s already running in a different persistent session.
Or do you know whether cylc pulls in this information once at the start of runtime and keeps it in memory, rather than each cylc task accessing this information once the task job starts?
clairecarouge
(Claire Carouge, ACCESS-NRI Land Modelling Team Lead)
8
@bethanwhite , I just want to correct an error in what you said above: you can run suites on any project using a single persistent session. The project connected to the persistent session has no relation to the compute project that is charged by the suite.
We routinely run our suites on different projects using the same persistent session.
So far, we haven’t found a reason that absolutely requires people to have several persistent session that is why our advice is to only have one session.
So to confirm, if the value of PROJECT is changed in ~/.config/gadi-login.conf once one suite is already running, in order to run a second suite on a different project concurrently, this won’t impact the first suite?
A cylc instance running on the persistent session will keep the value of $PROJECT that it started with, so unless you restart the workflow it will keep the original project.
It may be safer to explicitly list the project in the workflow configuration, e.g. in rose-suite.conf
[env]
PROJECT=ab12
will set PROJECT when the workflow is installed.
This may no longer be neccessary I’ve not checked, but to get Cylc to use PROJECT from the environment rather than the project that you started the persistent session on you may need to add to ~/.cylc/flow/global.cylc
Having tried and failed to consistently set the PROJECT within a suite I would be very interested in knowing exactly how one does this. What Scott has detailed makes sense, but so did what I tried a while ago when I was doing my version. The solution for me appeared to be using #PBS -P {PROJECT} where {PROJECT} is the hard coded value I needed. Everything else failed due to one reason or another.
@bethanwhite - Please let us know what actually works for you.
I think this should be somehow the default way to set the desired PROJECT in suites:
[env]
PROJECT=$PROJECT
to keep the system’s project at runtime by default.
Then, if users want to override it, they can change it to the project they want (as in the example Scott made).
With this, I think if other KEY=VALUE configuration parameters in the rose-suite.conf[jinja2:suite.rc] (or the modern [template variables]) section reference $PROJECT, this will be taken from the one specified in [env] rather than the one from the system.
I think this would make it pretty easy for users to change run and storage project for their suites.
Just take care that $PROJECT where you’re submitting the workflow might not be the same as $PROJECT on the persistent session, which is probably the cause of Griff’s error. ‘cylc install’ might see one version and ‘cylc play’ a different one. The global.cylc setting should make sure they’re the same.
True.
And in general I think it highly depends on how the suite is configured and implemented.
By default the $PROJECT env variable within the persistent session is the one the persistent session is attached to, but it could always be overridden in cylc, for example:
[[[job]]]
batch system = background
[[[environment]]]
PROJECT = new_project
This is using ACCESS-rAM3, which handles things as follows:
hardcode the value of PROJECT in ~/.config/gadi-login.conf, e.g PROJECT fy29
refer to $PROJECT throughout the suite
Hence if I have needed to switch projects, I have changed the value of PROJECT in ~/.config/gadi-login.conf. But I have never been quite sure what happens in the instance of changing the value of PROJECTwhile a suite is already running.
Just take care that $PROJECT where you’re submitting the workflow might not be the same as $PROJECT on the persistent session
Which is why I have been working with a persistent session on each NCI project that I use compute on.
(rAM3 is still on cylc7 by the way, but same same).