close
Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Username lookup needs a tuneup #211

Description

@mvpel

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions