Some people in MLP have been affected by a recent update to the numpy and numerical
libraries on DICE on 3 October. The problem affects you if you get a message stating that the kernel was restarted when you run code involving numpy.
If you have experienced these issues you have either:
- ended up using the default
atlaslibraries withnumpy(which have been updated in the meantime) - or re-compiled
numpywith the new DICEOpenBLASthat is available, but theLD_LIBRARY_PATHthat you set during the first lab last week gave priority to load theOpenBLASlibraries compiled last time - which could introduce some unexepcted behaviour at runtime.
Follow the below steps before you activate the old virtual environment (or deactivate it if it is activated). The fix basically involves rebuilding the virtual environments. But the whole process is now much simpler due to the fact OpenBLAS is now a default numerical library on DICE.
-
Comment out (or remove) the
export=$LD_LIBRARY_PATH...line in your ~/.bashrc file. Then typeunset LD_LIBRARY_PATHin the terminal. To make sure this variable is not set, type
exportand check visually in the printed list of variables -
Go to
~/mlpractical/repos-3rd/virtualenvand install the new virtual environment (venv2) by typing:./virtualenv.py --python /usr/bin/python2.7 --no-site-packages $MLP_WDIR/venv2 -
Activate your new virtual environment by typing:
source $MLP_WDIR/venv2/bin/activateand install the usual packages required by MLP using pip:
pip install pip --upgrade pip install numpy pip install ipython pip install notebook pip install matplotlib -
Change directory to
~/mlpractical/repo-mlpand check thatnumpyis linked to the DICE-standardOpenBLAS(and works) by starting ipython notebook:ipython notebookthen run the first two interactive examples from
00_Introduction.py.If they run, then you can simply modify theactivate_mlpalias in./bashrcto point tovenv2instead ofvenv. -
You can also remove both the old
venvand the other unrequired directories that containnumpyandOpenBLASsources in the~/mlpractical/repos-3rddirectory.