Error when using make_dynamic_model.sh
Summary
An error is raised when I try to use the script make_dynamic_model.sh
:
error: use of undeclared identifier 'LIMPET_CALLOC'
LIMPET_CALLOC(IF->sv_tab.y,1,sizeof(my_MBRDR_state));
^
1 error generated.
What version of openCARP are you using?
openCARP commit: c4a0f16727c268e39b2c7b035c0a4304a9c1a574
experiments commit: 0c8a19c40b4d60c4a7b888569041441e94abaece
What operating system and processor architecture are you using?
OS: macOS Monterey 12.5.1
Processor: 3,6 GHz 8-Core Intel Core i9
Steps to reproduce
Follow the tutorial: https://opencarp.org/documentation/examples/01_ep_single_cell/04_limpet_fe
In practice, got to experiments/tutorials/01_EP_single_cell/04_limpet_fe
and run make_dynamic_model.sh my_MBRDR.model
What is the current bug behavior?
An error is raised when make_dynamic_model.py
is called by the script.
Complete output, with paths to openCARP sources and experiments replaced with $OPENCARP
and $EXPERIMENTS
respectively:
$OPENCARP/physics/limpet/src/python/limpet_fe.py my_MBRDR.model $OPENCARP/physics/limpet/models/imp_list.txt .
$OPENCARP/physics/limpet/src/python/make_dynamic_model.py --compiler=mpicc --cflags=-fPIC -shared -std=c++14 -lm -Wl,-undefined,dynamic_lookup -I$OPENCARP/physics/limpet/src -I$OPENCARP/_build/physics/limpet -I$OPENCARP/_build/simulator -I$OPENCARP/numerics -I$OPENCARP/simulator -I$OPENCARP/fem -I$OPENCARP/fem/slimfem/src -I$OPENCARP/param/include -I$OPENCARP/../../lib/petsc/include -I$OPENCARP/../../lib/openmpi/include --dynamic_prefix= my_MBRDR.model
Dynamic model generator
Generating: my_MBRDR -> $EXPERIMENTS/tutorials/01_EP_single_cell/04_limpet_fe/my_MBRDR_dyn.cc
mpicc -fPIC -shared -std=c++14 -lm -Wl,-undefined,dynamic_lookup -I$OPENCARP/physics/limpet/src -I$OPENCARP/_build/physics/limpet -I$OPENCARP/_build/simulator -I$OPENCARP/numerics -I$OPENCARP/simulator -I$OPENCARP/fem -I$OPENCARP/fem/slimfem/src -I$OPENCARP/param/include -I$OPENCARP/../../lib/petsc/include -I$OPENCARP/../../lib/openmpi/include -I$EXPERIMENTS/tutorials/01_EP_single_cell/04_limpet_fe -o $EXPERIMENTS/tutorials/01_EP_single_cell/04_limpet_fe/my_MBRDR.so $EXPERIMENTS/tutorials/01_EP_single_cell/04_limpet_fe/my_MBRDR.cc $EXPERIMENTS/tutorials/01_EP_single_cell/04_limpet_fe/my_MBRDR_dyn.cc
$EXPERIMENTS/tutorials/01_EP_single_cell/04_limpet_fe/my_MBRDR_dyn.cc:150:5: error: use of undeclared identifier 'LIMPET_CALLOC'
LIMPET_CALLOC(IF->sv_tab.y,1,sizeof(my_MBRDR_state));
^
1 error generated.
What is the expected correct behavior?
The script is executed without raising errors and the file my_MBRDR.so
is produced as an output.
Possible fixes
Fix the fact that LIMPET_CALLOC
is not found. It is defined in https://git.opencarp.org/openCARP/openCARP/-/blob/master/physics/limpet/src/limpet_malloc.h .
Maybe you can help with this @ttjost ?