Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Username lookup needs a tuneup #211

Closed
mvpel opened this issue Jul 12, 2017 · 1 comment
Closed

Username lookup needs a tuneup #211

mvpel opened this issue Jul 12, 2017 · 1 comment

Comments

@mvpel
Copy link

mvpel commented Jul 12, 2017

When submitting a Caffe run to an HTCondor scheduler, the job's environment is not, by default, delivered to the job environment.

This meant that the "USER" variable was empty in the exec node, and so glog named the log file with "invalid-user" in the log name created by Caffe.

This section of code needs a little TLC - currently it merely checks for a USERNAME variable on Windows and USER on Linux. While those are quick and self-contained, it would be best - if that failed - to attempt to look up the username with things like GetUserNameEx or getpwuid on the uid number.

Alternatively, instead of putting in "invalid-user" when a name is not found, putting "uid12345" would have the benefit of preventing log name collisions between different users.

In my case it's an easy workaround, I just expressly deliver the submitter's USER environment variable to the cluster job, so this can be considered a low-priority, low-urgency issue.

@DariuszOstolski
Copy link
Contributor

I've fixed this issue on Linux in #245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants