scidash / neuronunit

A package for data-driven validation of neuron and ion channel models using SciUnit
http://neuronunit.scidash.org
38 stars 24 forks source link

Mac issues with NEURON #119

Closed rgerkin closed 6 years ago

rgerkin commented 6 years ago

I have nailed the segmentation fault issue on the Mac down to the fact that:
import LEMS_2007One_nrn runs fine, but:

def foo():
  import LEMS_2007One_nrn
foo()

produces the segmentation fault. Of course both of these work fine in Linux or Docker.

I am going to post the issue in the NEURON forums. I think the problem is that whatever things are getting loaded in the auto-generated neuron python files are not getting disposed of properly in the C code on the Mac. When imported normally they are still in memory, but when imported inside a function the pointers aren't getting disposed of when the function exits, and then memory issues occur leading to a segmentation fault.

rgerkin commented 6 years ago

Thread on the NEURON forum

rgerkin commented 6 years ago

I documented a complete NEURON + Miniconda 3 installation on Mac here with CI testing.