Skip to content

Issue with environments #4

@jimboid

Description

@jimboid

Some HPC machines seem to create a problem where the environment is not loaded under a non-login shell. This includes environment variables for the scheduler and even the Linux module system. A simple cure is that the user can add "source /etc/profile" into their ~/.bashrc file. Machines where this doesn't happen seem to have a .bashrc setup to reference the various environment files by default.

Simply asking for a login shell does not seem to work either, this appears to be specific to shells requested through a script. I'm not sure if there is some sort of safeguards preventing certain sessions from having a login shell (perhaps the tty issue).

There are several solutions to this:

  1. Pass information to the user through documentation, informing them to how to add the relevant line to their .bashrc
  2. Append the line "source /etc/profile" to every line that gets passed through to subprocess (not sure if this is bad)
  3. Find out if there is a proper way to get a valid login shell when using python subprocess.

It is unclear at this stage which solution is the best one, more work and investigation is required so that we can support as many machines as possible.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions