Skip to content

Modules in PYTHONPATH cannot be loaded because of -E python option in cluster.py #54

@ofajardo

Description

@ofajardo

Hi,

I first of all would like to congratulate you for this excelent module. It makes very easy to use ipython-parallel, and also it is much easier than other parallelilzation modules I have been testing. It works well in our cluster where we have slurm, and even avoids us the nuisance of writing the slurm batch files!

But we have a problem. In our environment, we use module loader "Lmod". This makes very easy to have different libraries and libraries version, or applications (it works not only for python, but everything), and to switch from one to another in a very convenient way, and to share the same environment across multiple machines and users. It is really a robust system for production.

The issue is that, this Lmod, when it loads a python module, among other things, prepends the path to the module to the PYTHONPATH variable. ipython-cluster-helper , in the file cluster.py, when it fires a python interpreter, it uses the flag -E which gets rid of environment variables, among those PYTHONPATH. THe consequence is that the processes that ipython-parallel launches do not see third party libraries loaded with Lmod. Removing this "-E" flag from cluster.py cures the problem.

Would it be possible to have some kind of option to not use this -E flag?

Under which circumstances is good to have the -E flag (why did you introduce it? normally I would say that you would like that the child processes have the same environment as the master)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions