radical-collaboration / hpc-workflows

NSF16514 EarthCube Project - Award Number:1639694
5 stars 0 forks source link

any way to get radical job id #149

Closed wjlei1990 closed 2 years ago

wjlei1990 commented 3 years ago

Is there any way to get radical job id?

re.session.login4.lei.018849.0008

For example, I want to get the 018849.0008 when running python script. Any way to do it?

wjlei1990 commented 3 years ago

Also, is there anyway to get slurm job id?

I usually have multiple jobs running. So having those job ids will make tracking progress much easier.

andre-merzky commented 3 years ago

The session ID should be returned by AppManager.sid:

$ python3
>>> import radical.entk as re
>>> amgr = re.AppManager()
>>> amgr.sid
're.session.rivendell.merzky.018859.0000'

Also, is there anyway to get slurm job id

I am afraid that this is not exposed by the RE API :-/ But, you should be able to set a job_name in the resource description, and that job name is also set on the slurm job. Slurm commands allow to look for job names also IIRC, or you can at least grep for it.