First time here? Checkout the FAQ!
x
0 votes
by (470 points)

hello every one i would like to know how i can make bench recognize my new model. i have recompiled opencarp with my new model GPVm as in the tutorial, the model was added as a plug-in in imp-list, when i compile  it with bench it was working but, when i wrote a script with the same bench command  or when i wanted to loaded it in tissue i got this error "Illegal IMP specified: GPVm", can someone help plaese! i mean :

bench -- imp GPVm : is working

but in run.py(my script) i wrote this :cmd  = [settings.execs.BENCH,
                                                                     '--duration', args.duration,
                                                             '--stim-assign', 'on']

                                               cmd += ['--imp={}'.format(args.EP)] :

the output is: 

usr/local/bin/bench /usr/local/bin/bench \
  --duration 500 \
  --stim-assign on \
  --imp=GPVm \
  --stim-curr 30.0 \
  --numstim 2 \
  --bcl 500 \
  --dt 0.01 \
  --dt-out 0.1 \
  --save-ini-file None_GPVm_bcl_500_ms_dur_500_ms.sv \
  --save-ini-time 500 \
  --fout=exp_GPVm__bcl_500_ms_duration_500_ms/GPVm \
  --bin \
  -v
 

 then i got illegal imp

by (1.3k points)
It should work that way. Maybe you your script is looking for an older version of Bench that you may have in your system? Can you maybe attach some screenshots or a longer copy paste of the terminal? Can you make sure the bench you are calling in the terminal is the same than its called in carputils?

1 Answer

0 votes
by (19.1k points)
You mention that you added your model as a plugin to imp_list.txt

Models are different from plugins. If you want to use your new model as a standalone model, you need to add it to imp_list.txt as a model and not as a plugin.
by (470 points)
But what should i do to add it as a model? i did every thing as in the vidéo tutorial, i mean my GPVm.model i add it in the file openCarp/ physics/ lipet/ models and i recompiled it, i was expected that the model will  be added in my models in imp-list but when i open the imp- list it was added as a plug- in so what can you advice me to  add it as a model but not as a plug- in ? In addition even when i use it as a plug-in in the script i still have the error "illegal plug-inGPVm"  but when i just use bench -- plug- in GPVm it is working what should i do to make it work when i run my run.py script where i use bench commands?
by (19.1k points)
Models are identified by having a line

Iion = ...

in the .model file.


https://git.opencarp.org/openCARP/openCARP/-/blob/master/physics/limpet/src/python/create_imp_list.py#L46
by (470 points)
Thank you a lot for your help, it works, for those who will have the same issu make sure that the openCarp and bench files in your usr/ local/ bin was renew after you recompile Opencarp
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
MathJax.Hub.Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], config: ["MMLorHTML.js"], jax: ["input/TeX"], processEscapes: true } }); MathJax.Hub.Config({ "HTML-CSS": { linebreaks: { automatic: true } } });
...