Menu

#139 HSolve works when `moose.reinit()` is called before setting up the HSolver

async13
open
dilawars
5
2015-02-17
2014-05-20
dilawars
No

If one setup HSolve after calling moose.reinit() then it works fine, otherwise it fails with a seg fault with following gdb dump.

Some macros are added to check NULL pointer assignments etc.

Created 310 path=/cable numData=1 isGlobal=0 baseType=Neutral
Created 311 path=/data numData=1 isGlobal=0 baseType=Neutral
Created 312 path=/cable/comp0 numData=1 isGlobal=0 baseType=Compartment
Created 313 path=/cable/comp1 numData=1 isGlobal=0 baseType=Compartment
Created 314 path=/data/pulse numData=1 isGlobal=0 baseType=PulseGen
Created 315 path=/data/table1 numData=1 isGlobal=0 baseType=Table
Created 316 path=/hsolve numData=1 isGlobal=0 baseType=HSolve
HSolve: Seed compartment found at '/cable[0]/comp0'.
[HSOLVE] HSolve is all set. 

 + 
[EXPECT_FAILURE] In function: void FuncOrder::set(const OpFunc *, unsigned int) file: /home/dilawar/Work/NCBS/moose_svn_1.8/moose/branches/async13/basecode/FuncOrder.h:31
 + Assigning a NULL pointer
 + 
[EXPECT_FAILURE] In function: void SrcFinfo1<double *>::send(const Eref &, T) const [T = double *] file: /home/dilawar/Work/NCBS/moose_svn_1.8/moose/branches/async13/basecode/SrcFinfo.h:118
 + Invoking function op() of a NULL pointer
 + 

Program received signal SIGSEGV, Segmentation fault.
0xb610c28e in SrcFinfo1<double*>::send (this=0xb779ec14 <requestOut()::requestOut>, er=..., arg=0xbfffe2f8)
    at /home/dilawar/Work/NCBS/moose_svn_1.8/moose/branches/async13/basecode/SrcFinfo.h:119
119                         f->op( *j, arg );
(gdb) 

Discussion

  • dilawars

    dilawars - 2014-06-03

    Created a workaround. If f->func is null then return from Table::reinit function without doing anything, else go ahead. It works but only a temp solution. Added a warning to function when returning without doing anything.

    It allows me to call moose.reinit() after setting up HSolve. I guess something is wrong when message-digest is being updated.

     
  • dilawars

    dilawars - 2014-06-03

    Only Table and input are receiving NULL for MsgDigest::func_ . The above workaround works only in few cases.

     
  • dilawars

    dilawars - 2014-06-04

    Setting up hsolve before creating stimulus and record table and connecting them to compartments does not work.

    Commadn moose.connect(stim, 'output', comp2, 'injectMsg') fails to work when comp2 type is ZombieCompartment, e.g.:

    ++++<moose.ZombieCompartment: id=364, dataIndex=0, path=/cable[0]/comp0[0]>
    0: Shell::doAddMsg: Error: Failed to find field injectMsg on dest: comp0
    
     

    Last edit: dilawars 2014-06-04

Anonymous
Anonymous

Add attachments
Cancel