cnr-ibf-pa / hbp-bsp-issues

Ticketing system for developers/testers and power users of the Brain Simulation Platform of the Human Brain Project
4 stars 0 forks source link

Neuron dlopen failed in a jupyter notebook because of new Neuron version #441

Closed clupascu closed 5 years ago

clupascu commented 5 years ago

Expected behavior

Mechanisms are correctly loaded within neuron 7.4 and the possibility to switch from neuron 7.4 to neuron 7.6 is still available.

Actual Behavior (please include screenshot if possible)

it seems that the symbolic links solution for switching from neuron 7.4 to neuron 7.6 creates a problem when loading mechanisms in neuron.

I get this error

dlopen failed -
/lib/x86_64-linux-gnu/libncurses.so.5: symbol _nc_putchar, version NCURSES_TINFO_5.9.20150530 not defined in file [2] [4] [4] libtinfo.so.5 with link time reference

It seems that this is because there is a neuron install at /usr/local and one at /home/jovyan/.local/nrn/.

Mixing these two versions creates a problem.

Steps to reproduce the problem

execute this code in 6 different notebook cells to reproduce the problem


import os
import shutil
os.chdir("/home/jovyan")
if os.path.isdir('BPOPTANALYSIS')==True:
shutil.rmtree('BPOPTANALYSIS')
if os.path.isdir('BPOPTANALYSIS')==False:
!mkdir BPOPTANALYSIS
os.chdir("BPOPTANALYSIS")
----------------------
%%capture
URL=('[1] [3]
[3] https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/';;;
'hippocampus_optimization/'
'bsp_data_repository-3.1.10.tar.gz')
!wget "{URL}"
!tar -zxvf bsp_data_repository-3.1.10.tar.gz
----------------------

os.chdir('bsp_data_repository-3.1.10')
os.chdir('optimizations')
diff = lambda l1,l2: [x for x in l1 if x not in l2]
FD=diff(os.listdir('.'),['README'])
for i in range(len(FD)):
shutil.copytree(FD[i],os.path.join('..','..',FD[i]))
os.chdir('..')
os.chdir('..')
----------------------
os.chdir('CA1_int_bAC_011017HP2_20180110153901')
for files in os.listdir('.'):
if files.endswith('.zip'):
zip_ref = zipfile.ZipFile(files, 'r')
zip_ref.extractall()
zip_ref.close()
os.chdir('CA1_int_bAC_011017HP2_20180110153901')
----------------------
!nrnivmodl mechanisms
----------------------
!python -c 'import neuron; soma = neuron.h.Section(); soma.insert("kdrb")'

Optional infrastructural data (user, platform, browser, environment, ...)

clupascu commented 5 years ago

A new image of the notebooks, updated on 26th of June 2019, seems to solve the issue. The image was built using the same specifications as the previous one, but because it's a more recent build it used a newer ncurses lib for the Conda environment.

I tested and it works. I even played with the neuron versions and it worked even when switching versions.

@alex4200 can you test it too please? We can close the issue when you finish your tests. Thank you.

alex4200 commented 5 years ago

The production version of the notebooks work fine. Closing ticket