Custom HPC software & tools from Wirawan. Primarily tailored toward ODU HPC sytems.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1.7 KiB

Date: 2020-06-09

Purpose: troubleshoot & fix the ipython startup file
which caused issue.

The original setup (combined `000-odurc-lmod.py` and `lmod_python.py`)
have several issues:

* On Turing (vanilla ipython), could not find the module command.

* On Wahab (vanilla ipython), invoking the "module" command resulted
in an error due to unset `LMOD_MANUAL_LD_LIBRARY_PATH` env var.

* On Wahab/OOD, the "module" command messed up all the symlinks in the
specially prepared library dir (LMOD_MANUAL_LD_LIBRARY_PATH).
As a result, all symlinks become circular links.

I fixed these files with the following improvements:

1) Allow the setup to work on both Wahab and Turing. (The new
`lmod_python.py` needs to be installed somewhere on Turing;
I made up the location to be
`/cm/shared/applications/lmod/lmod/scripts/init`.

2) Fix the indefinite lengthening of `sys.path` as a result of
"module" command invocation: now only the *changes* are updated
onto `sys.path`. Still not perfect (see notes in the Python code)
but should work ok for most cases.

3) As a result of fix #2 above, when we invoke `module("unload",
A_MODULE)`, the paths associated with `A_MODULE` will also be removed.

4) Fix the "circular links" problem. If `LMOD_MANUAL_LD_LIBRARY_PATH`
is not specified, it quietly ignores the symlink update process.

See if you like these changes---I suggest implementing them soon.

I found that the existing `000-odurc-lmod.py` is always overwritten
whenever I launch Jupyter on Wahab OOD. It was due to `before.sh` of
the OOD Jupyter notebook setup ... grrr. I know you assume that users
won't mess with this file (but I did, while doing all this testing).
I'll make my own workaround.