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

I created a modified version of the GrandiPanditVoigt to create additional adjustable parameters for adrenergic stimulation (re: https://www.ahajournals.org/action/downloadSupplement?doi=10.1161%2FCIRCRESAHA.111.253955&file=res200959_online.pdf).

I did this by modifying its .model file, creating a new file named ModifiedGrandiPanditVoigt.model, and running make_dynamic_model.sh to generate corresponding .c and .h files. I placed its .c and .h under imps_src I also added "model ModifiedGrandiPanditVoigt generated" in to the imp_list.txt. None of these steps produced any errors.

Then, I tried to recompile my local opencarp by invoking "cmake --build _build" but the following errors come up during Linking CXX executable bin/openCARP

==================================================================

[ 74%] Linking CXX executable bin/openCARP

/usr/bin/ld: physics/limpet/liblimpet.a(generated_functions.cc.o): in function `limpet::allocate_types()':

generated_functions.cc:(.text+0x3ea58): undefined reference to `compute_ModifiedGrandiPanditVoigt'

/usr/bin/ld: generated_functions.cc:(.text+0x3ea67): undefined reference to `initialize_params_ModifiedGrandiPanditVoigt'

/usr/bin/ld: generated_functions.cc:(.text+0x3ea8a): undefined reference to `construct_tables_ModifiedGrandiPanditVoigt'

/usr/bin/ld: generated_functions.cc:(.text+0x3eac3): undefined reference to `destroy_ModifiedGrandiPanditVoigt'

/usr/bin/ld: generated_functions.cc:(.text+0x3ead8): undefined reference to `initialize_sv_ModifiedGrandiPanditVoigt'

/usr/bin/ld: physics/limpet/liblimpet.a(generated_functions.cc.o): in function `limpet::print_IMP_parameters_ModifiedGrandiPanditVoigt()':

generated_functions.cc:(.text+0x42c72): undefined reference to `initialize_params_ModifiedGrandiPanditVoigt'

collect2: error: ld returned 1 exit status

gmake[2]: *** [CMakeFiles/opencarp-bin.dir/build.make:133: bin/openCARP] Error 1

gmake[1]: *** [CMakeFiles/Makefile2:308: CMakeFiles/opencarp-bin.dir/all] Error 2

gmake: *** [Makefile:156: all] Error 2

==================================================================

In addition, despite manually adding to the imp_list.txt, the modified model also doesn't show up during the compilation. Below is a snippet of the process.

==================================================================

[  7%] Generating ionic model or plugin (IMP): MacCannell

[  8%] Generating ionic model or plugin (IMP): MahajanShiferaw

[  8%] Generating ionic model or plugin (IMP): Maleckar

[  8%] Generating ionic model or plugin (IMP): MitchellSchaeffer

*** Modified model should appear here but doesn't ***

[  9%] Generating ionic model or plugin (IMP): Nygren

[  9%] Generating ionic model or plugin (IMP): OHara

==================================================================

So far, I've only done a clean build to try to remove, maybe, some old files from a previous build to no avail.

Did I miss an important step in implementing a new model? Has anyone encountered this problem before? Any tips would help!

1 Answer

+1 vote
by (1.3k points)

Hi,

I am not sure about your error but I do add modified models into my compilation of openCARP. I can share the exact steps I do if that helps:

1. I always start with a fresh source code from gitlab:

git clone https://git.opencarp.org/openCARP/openCARP.git

2. Put my models into the imp source model

cp <path-to-my-model> ~/.../openCARP/physics/limpet/models/

3. Create the build folder using the following parameters (with DUPDATE_IMPLIST=ON you dont need to modify the implist file yourself) and compile.

cmake -S. -B_build -DUPDATE_IMPLIST=ON -DDLOPEN=ON -DBUILD_EXTERNAL=ON -DCMAKE_BUILD_TYPE=Release

cmake --build _build

I hope that helps!

Cheers,

T

by (570 points)
T, you're a lifesaver.

Thank you!
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 } } });
...