Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Struggling with inhibitory synapses #578

Closed
4 tasks done
AlexSonneborn opened this issue Oct 21, 2021 · 11 comments
Closed
4 tasks done

Struggling with inhibitory synapses #578

AlexSonneborn opened this issue Oct 21, 2021 · 11 comments
Assignees
Labels
bug something is broken high-priority Needs to be fixed ASAP

Comments

@AlexSonneborn
Copy link

Please go through the following steps before you file an issue that documents a problem or a potential bug and please check each item as you do so:

  • I have read the troubleshooting page
  • I have run xolotl.cleanup and my error persists
  • I have run cpplab.rebuildCache and my error persists
  • The built-in examples work

Information

Please provide the following information:

Operating System

Windows 10

Output of "version" command in MATLAB

'9.11.0.1769968 (R2021b)'

Output of "mex.getCompilerConfigurations('C++')" in MATLAB

ans =

CompilerConfiguration with properties:

         Name: 'MinGW64 Compiler (C++)'
 Manufacturer: 'GNU'
     Language: 'C++'
      Version: '6.3.0'
     Location: 'C:\ProgramData\MATLAB\SupportPackages\R2021b\3P.instrset\mingw_w64.instrset'
    ShortName: 'mingw64-g++'
     Priority: 'E'
      Details: [1×1 mex.CompilerConfigurationDetails]
   LinkerName: 'C:\ProgramData\MATLAB\SupportPackages\R2021b\3P.instrset\mingw_w64.instrset\bin\g++'
LinkerVersion: ''
       MexOpt: 'C:\Users\sonnebor\AppData\Roaming\MathWorks\MATLAB\R2021b\mex_C++_win64.xml'

Bug reports

Please replace this section with:

What you were trying to do (include code to reproduce error)

I am trying to make an inhibitory synapse

What you expected to happen

I expected whenever the inhibitory cell fired to have a brief hyperpolarization in my mPFC pyramidal cell (below).

What actually happened

I pasted the error and my code below. The 5th to last line is the one that is causing the issue. If I just comment this line out, everything works fine.

Error using mex
C:\Users\sonnebor\AppData\Local\Temp\1\mex_2263249688272427_58116\X_c76349b260203eda05b19936eaa74757.obj:X_c76349b260203eda05b19936eaa74757.cpp:(.rdata$_ZTV10Inhibitory[_ZTV10Inhibitory]+0x38):
undefined reference to `Inhibitory::getCurrent(double)'
collect2.exe: error: ld returned 1 exit status


Error in xolotl/compile (line 64)
	mex('-silent',ipath,mexBridge_name,'-outdir',filelib.cachePath('xolotl'))

Error in xolotl/integrate (line 113)
	self.compile;

Error in xolotl/plot (line 150)
[V, Ca, ~, currents] = self.integrate;

Error in FirstXolotl (line 35)
x.plot

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

x = xolotl;

% Adding different neurons
x.add('compartment','CLA','A', .05);
x.add('compartment','mPFCinter','A', .025);
x.add('compartment','mPFCPyr1','A', .05);

x.approx_channels = 0;
x.stochastic_channels = 0;

% Adding in 
x.CLA.add('liu/NaV', 'gbar', 1000, 'E', 30);
x.CLA.add('liu/Kd', 'gbar', 300, 'E', -80);
x.CLA.add('turrigiano/ASlow');
x.CLA.add('traub/Kahp');
x.CLA.add('hill/HCurrent');
x.CLA.add('Leak', 'gbar', .1);

x.mPFCinter.add('liu/NaV', 'gbar', 1000, 'E', 30);
x.mPFCinter.add('liu/Kd', 'gbar', 300, 'E', -70);
x.mPFCinter.add('Leak', 'gbar', .1);

x.mPFCPyr1.add('liu/NaV', 'gbar', 1000, 'E', 30);
x.mPFCPyr1.add('liu/Kd', 'gbar', 300, 'E', -80);
x.mPFCPyr1.add('Leak', 'gbar', .1);
x.mPFCPyr1.add('hill/HCurrent');

% Adding some synapses between neurons
x.connect('CLA','mPFCinter','borgers/AMPA', 'gmax', 30);
x.connect('CLA','mPFCinter','borgers/NMDA', 'gmax', 30);
x.connect('mPFCinter','mPFCPyr1','cymbalyuk/Inhibitory','gmax',40);

x.t_end = 1000; %ms
x.I_ext = [randn(x.t_end/x.sim_dt,1) randn(x.t_end/x.sim_dt,1) randn(x.t_end/x.sim_dt,1)];
x.plot

xlim([0 1])
@AlexSonneborn
Copy link
Author

By the way, this is a super awesome tool. Thanks for making it.

@sg-s
Copy link
Owner

sg-s commented Oct 21, 2021

hello, are you trying to make your own custom synapse?

if so, please also paste in the C++ code in your .hpp file.

if you're using a built-in synapse, please point to the problematic synapse

@AlexSonneborn
Copy link
Author

I am just trying to add in this pre-made inhibitory synapse:

x.connect('mPFCinter','mPFCPyr1','cymbalyuk/Inhibitory','gmax',40);

and I get this error

C:\Users\sonnebor\AppData\Local\Temp\1\mex_2263249688272427_58116\X_c76349b260203eda05b19936eaa74757.obj:X_c76349b260203eda05b19936eaa74757.cpp:(.rdata$_ZTV10Inhibitory[_ZTV10Inhibitory]+0x38):
undefined reference to `Inhibitory::getCurrent(double)'
collect2.exe: error: ld returned 1 exit status

@sg-s
Copy link
Owner

sg-s commented Oct 21, 2021

aah, my bad. let me take a look and make a patch.

@rolsonjames94
Copy link

I have also been having this problem, thank you :)

@sg-s sg-s closed this as completed in 930c9c6 Oct 21, 2021
@sg-s sg-s reopened this Oct 21, 2021
@sg-s
Copy link
Owner

sg-s commented Oct 21, 2021

hi @rolsonjames94 and @AlexSonneborn, I think it's fixed. this synapse had an errant redeclaration of the getCurrent method, but it was never redefined.

I've pushed a patch that fixes it. (all I did was delete the line that declared getCurrent in cymbalyuk/Inhibitory.hpp.

If you installed via git, please do a git pull and you should be good to go.

If you installed via the toolbox, the simplest thing for you to do is to replicate the fix -- go to that file and comment out the getCurrent declaration.

Let me know if this solves your problem, and if so, please close the issue

@sg-s sg-s self-assigned this Oct 21, 2021
@sg-s sg-s added bug something is broken high-priority Needs to be fixed ASAP labels Oct 21, 2021
@rolsonjames94
Copy link

Thank you so much that worked. You are insanely fast and this program is amazing, looking forward to using it more!!

@AlexSonneborn
Copy link
Author

Thanks! I think I can just do this for the soplata GABAergic one as well? It is line 42 in that script.

@sg-s
Copy link
Owner

sg-s commented Oct 21, 2021

oof, you are absolutely right, yes, you can. I'll fix those in other synapses where I can find them and push this patch

@AlexSonneborn
Copy link
Author

I actually also had another question. It is not immediately obvious if there is a way to inject current only for part of a simulation. Is there a way to do this?

@sg-s
Copy link
Owner

sg-s commented Oct 21, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is broken high-priority Needs to be fixed ASAP
Projects
None yet
Development

No branches or pull requests

3 participants