Trying to use ROOT and Keras simultaneously

Hi,

I would need some software help. As it seems right now, ROOT and Keras 2 installations are not compatible with each other.

To load ROOT on Baobab, one should do:

module load GCC/7.3.0-2.30 OpenMPI/3.1.1 ROOT/6.14.06-Python-2.7.15

To load Keras 2, we have the version choice between Python 2 and Python 3, but since ROOT is only on Python 2 we go for the former :

module load GCC/7.3.0-2.30 CUDA/9.2.88 OpenMPI/3.1.1 Keras/2.2.2-Python-2.7.15

Since the GCC and OpenMPI versions are the same, I tried the following one-liner:

module load GCC/7.3.0-2.30 OpenMPI/3.1.1 ROOT/6.14.06-Python-2.7.15 CUDA/9.2.88 Keras/2.2.4-Python-2.7.15

(Same error with Keras 2.2.2)

Then, loading Python, one can import Keras but not ROOT:

ImportError: No module named ROOT

I then tried to first load Keras and then load ROOT.

[drozd@login2 ~]$ module load GCC/7.3.0-2.30 CUDA/9.2.88 OpenMPI/3.1.1 Keras/2.2.2-Python-2.7.15
[drozd@login2 ~]$ python
Python 2.7.15 (default, Dec 14 2018, 14:34:53)
[GCC 7.3.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import keras
[lot of output - it works]

[drozd@login2 ~]$ module load GCC/7.3.0-2.30 OpenMPI/3.1.1 ROOT/6.14.06-Python-2.7.15
Lmod has detected the following error: These module(s) or extension(s) exist but cannot be loaded as requested: “cuDNN/7.1.4.18”, “Theano/1.0.2-Python-2.7.15”,
“HDF5/1.10.2”, “protobuf-python/3.6.0-Python-2.7.15”, “OpenBLAS/0.3.1”, “FFTW/3.3.8”, “Keras/2.2.2-Python-2.7.15”, “h5py/2.8.0-Python-2.7.15”, “ScaLAPACK/2.0.2-OpenBLAS-0.3.1”,
“pkgconfig/1.3.1-Python-2.7.15”, “OpenMPI/3.1.1”, “PyYAML/3.13-Python-2.7.15”, “Python/2.7.15”, “libgpuarray/0.7.6-Python-2.7.15”, “TensorFlow/1.10.1-Python-2.7.15”,
“ROOT/6.14.06-Python-2.7.15”
Try: “module spider cuDNN/7.1.4.18 Theano/1.0.2-Python-2.7.15 HDF5/1.10.2 protobuf-python/3.6.0-Python-2.7.15 OpenBLAS/0.3.1 FFTW/3.3.8 Keras/2.2.2-Python-2.7.15
h5py/2.8.0-Python-2.7.15 ScaLAPACK/2.0.2-OpenBLAS-0.3.1 pkgconfig/1.3.1-Python-2.7.15 OpenMPI/3.1.1 PyYAML/3.13-Python-2.7.15 Python/2.7.15 libgpuarray/0.7.6-Python-2.7.15
TensorFlow/1.10.1-Python-2.7.15 ROOT/6.14.06-Python-2.7.15” to see how to load the module(s).

Loading ROOT before Keras leads to an import error when calling “import ROOT”. The other way around, loading Keras before ROOT, leads to this pretty large error above.

As a work-around, I tried to use my team’s software installation located on /cvmfs/, loaded with

source /cvmfs/dampe.cern.ch/centos7/etc/setup.sh

However Keras crashes at import due to a conflict of Numpy version, whereas it works on other, non-Baobab machines which have the same installation.