[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] How do I get the environment variable of the condor job if its interactive?

On Mar 26, 2021, at 9:58 PM, freyermuth@xxxxxxxxxxxxxxxxxx wrote:

Dear Jaime,

Am 26.03.21 um 22:58 schrieb Jaime Frey:
On Mar 25, 2021, at 5:41 PM, brando.hpcs@xxxxxxxxx <mailto:brando.hpcs@xxxxxxxxx> wrote:

Hi Everyone,

I usually got the job id with:
but I don't see it set if it's an interactive job. Is there a way to set it? When I am given the resources I see that there is a job id for my job. Is there a way to get it?

Submitting job(s).
1 job(s) submitted to cluster 4869.
Waiting for job to startâ
I assume youâre using condor_submit -interactive with a submit file that has something like this in it:
environment = MY_CONDOR_JOB_ID=$(Cluster)
I just tried this myself and was surprised to see that the environment variables requested in my submit file were not present in the interactive shell session (though they were present for a non-interactive job). And HTCondor doesnât set the job id in any special environment variables for the job. We will investigate, as this looks like a bug.

in case this helps to pin it down, we don't see this bug in our cluster, i.e. the environment variable (using the exact same line in the submit file) shows up in both interactive and batch.

Our versions:
- 8.8.13 on the submit node, and central managers (collector, negotiator, CCB)
- on the execute nodes, we have 8.6.13 and 8.8.13 (works for both)

Note that we enforce "SINGULARITY_JOB = true".

Cheers and hope this helps,

I ran some tests on another machine and the environment variables from the submit file are set for the interactive session there. Now I need to validate that my first testing environment was buggy.

 - Jaime