Comments (7)
Code in the snippet above can be download from its first commit : https://raw.githubusercontent.com/dilawar/chemical_models/7dbefa57b6fe2b37ce54f5757104a79e3ead004e/Synapse/Miller_Zhabotinsky/bugs/bug_rate_term_assert.py
The latest version is here: https://github.com/dilawar/chemical_models/blob/master/Synapse/Miller_Zhabotinsky/bugs/bug_rate_term_assert.py
from moose-core.
valgrind output
==573== Process terminating with default action of signal 6 (SIGABRT)
==573== at 0x4E7BCC9: raise (raise.c:56)
==573== by 0x4E7F0D7: abort (abort.c:89)
==573== by 0x4E74B85: __assert_fail_base (assert.c:92)
==573== by 0x4E74C31: __assert_fail (assert.c:101)
==573== by 0x6D3D158: Stoich::getRateTerms() const (Stoich.cpp:562)
==573== by 0x6D5825D: Ksolve::updateRateTerms(unsigned int) (Ksolve.cpp:583)
==573== by 0x6D46EDB: Stoich::setReacKf(Eref const&, double) const (Stoich.cpp:1701)
==573== by 0x6D2E408: ZombieReac::vSetConcKf(Eref const&, double) (ZombieReac.cpp:124)
==573== by 0x6BDC4DE: ReacBase::setConcKf(Eref const&, double) (ReacBase.cpp:260)
==573== by 0x6BDC95E: ReacBase::zombify(Element*, Cinfo const*, Id) (ReacBase.cpp:321)
==573== by 0x6D42A38: Stoich::zombifyModel(Eref const&, std::vector<Id, std::allocator<Id> > const&) (Stoich.cpp:1239)
==573== by 0x6D3C1E8: Stoich::setElist(Eref const&, std::vector<ObjId, std::allocator<ObjId> > const&) (Stoich.cpp:390)
from moose-core.
Caused by previous two commits. Commit be02f46 is free from this bug.
from moose-core.
This file is also in repository tests/issues/issue_34.py
.
from moose-core.
In following, I have converted ca
to BufPool
since its concentration is updated by a function. Also renamed the function to have func
as name under BufPool. Now slightly different segfault.
# Issue 34 on github.
import moose
import moose.utils as mu
compt = moose.CubeMesh('/compt')
compt.volume = 1e-20
molecules = [ "ca", "S", "S1", "Sp" ]
pools = {}
tables = {}
for m in molecules:
if m == "ca":
# If a function is added to update the concentraction, we need to
# create a BuffPool.
pools[m] = moose.BufPool('/compt/%s' % m)
else:
pools[m] = moose.Pool('/compt/%s' % m)
print("Created: %s" % pools[m])
t = moose.Table2("/table%s" % m)
print("Created: %s" % t)
tables[m] = t
moose.connect(t, 'requestOut', pools[m], 'getConc')
pools['ca'].nInit = 20
r_p0_p1 = moose.Reac('/compt/reacA')
funA = moose.Function('/compt/ca/func')
funA.expr = "{0}*(y0/{1})^6/(1+(y0/{1})^3)^2".format("1.5", "0.7e-3")
moose.connect(funA, 'requestOut', pools['ca'], 'getConc')
moose.connect(funA, 'valueOut', pools['S1'], 'setConc')
moose.connect(r_p0_p1, 'sub', pools['S'], 'reac')
moose.connect(r_p0_p1, 'prd', pools['S1'], 'reac')
r_p1_up = moose.Reac('/compt/reacB')
moose.connect(r_p1_up, 'sub', pools['S1'], 'reac')
moose.connect(r_p1_up, 'prd', pools['Sp'], 'reac')
# Change GSolve to Ksolve and bugs go away.
k = moose.Gsolve('/compt/ksolve')
s = moose.Stoich('/compt/stoich')
s.compartment = compt
s.ksolve = k
s.path = '/compt/##'
moose.reinit()
print("Running for 10 seconds")
moose.start(10)
(gdb) bt
#0 0x00007ffff48ba95a in Gsolve::fillMathDep() () at /home1/dilawars/Work/GITHUB/BhallaLab/moose-core/python/moose/_moose.so
#1 0x00007ffff48bb3cb in Gsolve::rebuildGssaSystem() () at /home1/dilawars/Work/GITHUB/BhallaLab/moose-core/python/moose/_moose.so
#2 0x00007ffff48bb9b8 in Gsolve::reinit(Eref const&, ProcInfo const*) () at /home1/dilawars/Work/GITHUB/BhallaLab/moose-core/python/moose/_moose.so
#3 0x00007ffff466e2a8 in Clock::handleReinit(Eref const&) () at /home1/dilawars/Work/GITHUB/BhallaLab/moose-core/python/moose/_moose.so
#4 0x00007ffff461d7b1 in SetGet0::set(ObjId const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
at /home1/dilawars/Work/GITHUB/BhallaLab/moose-core/python/moose/_moose.so
#5 0x00007ffff46154bb in Shell::doReinit() () at /home1/dilawars/Work/GITHUB/BhallaLab/moose-core/python/moose/_moose.so
#6 0x00007ffff4352dc5 in moose_reinit () at /home1/dilawars/Work/GITHUB/BhallaLab/moose-core/python/moose/_moose.so
#7 0x00007ffff7b010d7 in PyEval_EvalFrameEx () at /usr/lib64/libpython2.7.so.1.0
#8 0x00007ffff7aff952 in PyEval_EvalCodeEx () at /usr/lib64/libpython2.7.so.1.0
#9 0x00007ffff7b23226 in PyEval_EvalCode () at /usr/lib64/libpython2.7.so.1.0
#10 0x00007ffff7b2d2fd in () at /usr/lib64/libpython2.7.so.1.0
#11 0x00007ffff7b2d1e2 in PyRun_FileExFlags () at /usr/lib64/libpython2.7.so.1.0
#12 0x00007ffff7b2d0f6 in PyRun_SimpleFileExFlags () at /usr/lib64/libpython2.7.so.1.0
#13 0x00007ffff7b321f8 in Py_Main () at /usr/lib64/libpython2.7.so.1.0
#14 0x00007ffff747a610 in __libc_start_main () at /lib64/libc.so.6
#15 0x0000000000400799 in _start ()
(gdb)
from moose-core.
Related to issue #48 .
from moose-core.
Fixed by @upibhalla . We need to use x0, x1, ...
etc instead of y0,y1...
etc. Working with CaMKII model with both deterministic and stochastic solvers.
from moose-core.
Related Issues (20)
- setting stoich.path to stoich.ReacSystemPath for cross compartment model gives seg fault HOT 1
- seg fault moose.delete('/test') for non exist object HOT 3
- Warn: Invalid parser state HOT 12
- Typo in nightly installation command in README.md HOT 1
- Python 3.10 drops parser module HOT 3
- Bug in online documentation when using WSL HOT 1
- rdes examples not working HOT 1
- rdes example with zombie-gone branch not working HOT 2
- SBML model of OSC_different_vols not loading HOT 1
- NN_mapk.xml with ex12.0 not working HOT 1
- Changing Rm gives odd results
- Connecting inputs to the function - inputs should be in the same order as they are created
- Incorrect error message for path issue
- Imports within rdesigneur HOT 1
- Update needed for pybind11 HOT 3
- Switch from GSL to something simpler/faster?
- HHChannel not getting reset in default scheduling
- Issue with setting passiveDistrib in rdesigneur
- Naming consistency for refractory period
- Reset voltage hard-coded in `IntFire` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moose-core.