We came across the bsubmit utility recently and it looks useful.
lsf-utils/bsubmit at master · IBMSpectrumComputing/lsf-utils
GitHub |
remove preview |
|
lsf-utils/bsubmit at master · IBMSpectrumComputing/lsf-utils |
bsubmit is a wrapper of bsub. It allows users to submit jobs as another user. If you would like to contribute, you must follow the DCO process in the attached DCO Readme file in the root of this repository. |
View this on GitHub > |
|
|
The issue we have run into is we do lookups inside our default esub to match the user submitting the job to their default project and apply that to the job to use for later billing. Right now that is naïvely using $USER to grab who it is. I kicked up our debugging with the following bits but couldn't find the username that I passed to bsubmit for the jobs.
declare -p
echo "--LSB_SUB_PARM_FILE--"
cat $LSB_SUB_PARM_FILE
echo "--LSB_SUB_MODIFY_FILE--"
cat $LSB_SUB_MODIFY_FILE
echo "--LSB_SUB_MODIFY_ENVFILE--"
cat $LSB_SUB_MODIFY_ENVFILE
So I guess is there somewhere else I should be looking for this to be stored going through the esub? I'm in no way tied to using $USER for the lookups it was just the first thing we used that worked. I could easily add a check to see if it was being submitted to run as someone else and if so use that instead of the account submitting the job. Just not finding where that info exists in the esub environment and I haven't read cpp in a decade or more so I went crosseyed trying to sort it out in the source.
------------------------------
Robert Lines
------------------------------
#SpectrumComputingGroup