Moving EasyML towards a working state
Hi all,
EDIT: did not realize attached files would be embedded in the text, tried to fix
Thanks to Gunnar for an informative session this morning. I have now spent some time with openCARP. I got it compiled on both my local machine and the supercomputer at UW. So far, so good!
One thing I noticed right away is that dynamically loading ionic models compiled from .model -> .cc -> .so did not work for me. I dug into this a little bit. A few things jumped out:
- limpet_fe.py should likely be executable by default
- Some paths are hard-coded in make_dynamic_model.sh
- The important part of make_dynamic_model.py (i.e., conversion of _dyn.cc -> .so) is commented out
I fixed all of these issues such that I can now complete the .model compilation process using commands like so:
${CARP}/physics/limpet/src/python/limpet_fe.py
(pwd)/
{IMP}.model ${CARP}/physics/limpet/models/imp_list.txt $(pwd) [...] ${CARP}/physics/limpet/src/make_dynamic_model.sh ${IMP}.cc
Note that for limpet_fe.py, giving the full path to the .model file (via $(pwd) here) is compulsory.
I did not want to commit this yet because I'm not sure about conventions for doing so. Also, I'm not sure how portable my solution is for finding CARP_DIR in make_dynamic_model.sh. So, I attached modified versions of all 3 relevant source files to this note.
However, I can't get openCARP or bench to load the .so file. openCARP fails without a detailed error (just says something about illegal IMP); bench prints: "L5 : Compile with USE_DLOPEN to support dynamic module loading."
USE_DLOPEN does not appear to exist in my_switches.def and adding it back in did not seem to make a difference.
Regards, Pat