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

Hi,

I am trying to learn more about openCARP, but I have run into an issue with tutorials/02_EP_tissue/01_basic_usage. It seems that vm.igb.gz is not being generated by "job.carp(cmd)" (line 236), potentially due to a parameter error. Meshalyzer does appear after this, but there is no data to import.  I compared /run.py codes with tutorials/02_EP_tissue/00_basic_usage which runs, but no obvious code differences appear to me (other than different function names or terminology). This is the error output:

*** Unrecognized keyword -stimulus[0].p0[0]
*** Error reading parameters

Error: 2024-11-07_basic_20.0/vm.igb.gz does not exist!

As I am still new to openCARP, I do not know how to exactly troubleshoot this error further. As an FYI, I am running openCARP in a virtual environment in PyCharm within a bare-metal Ubuntu installation. My tutorials were downloaded using:

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

 Here is the entire print out:


/home/bndr32/PycharmProjects/Example01_openCARP/tutorials/02_EP_tissue/01_basic_usage/./run.py:3: SyntaxWarning: invalid escape sequence '\m'
  """
=====================================
SETTINGS SUMMARY
=====================================
Executables
---------------------------------------------------------------------------
   CARP:              /usr/local/bin/openCARP
   MESHER:            /usr/local/bin/mesher
   BENCH:             /usr/local/bin/bench
   IGBHEAD:           /usr/local/bin/igbhead
   IGBOPS:            /usr/local/bin/igbops
   IGBEXTRACT:        /usr/local/bin/igbextract
   IGBAPD:            /usr/local/bin/igbapd
   IGBDFT:            /usr/local/bin/igbdft
   MESHALYZER:        /home/bndr32/.local/share/applications/squashfs-root/meshalyzer
   SV2H5B:            /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/bin/bin2h5.py
   SV2H5T:            /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/bin/txt2h5.py
   CLOSEST_HC:        /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/bin/closest_hc
   APDRESTITUTION:    /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/bin/APDrestitution
   TUNECV:            /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/bin/tuneCV
   RESTITUTECV:       /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/bin/restituteCV
   GENERATEMETADATA:  /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/bin/generateMetadata
   MESHTOOL:          /usr/local/bin/meshtool
   LIMPETFE:          /usr/local/bin/limpet_fe.py
   MAKEDYNAMICMODEL:  /usr/local/bin/make_dynamic_model.sh
--------------------------------------------------------------------------------------------------------------------
Command Line Options
--------------------------------------------------------------------------------------------------------------------
   NP:        1
   BUILD:     CPU
   FLAVOR:    petsc
   DRY:       False
   VISUALIZE: True
-----------------------------------------------------------------------------------------------------------
Solver Option Files
-----------------------------------------------------------------------------------------------------------
   Parabolic: /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/carputils/resources/petsc_options/ilu_cg_opts
   Elliptic:  /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/carputils/resources/petsc_options/gamg_cg_opts
---------------------------------------------------------------------------------------------------------------
Paths
---------------------------------------------------------------------------------------------------------------
   OPENCARP_SRC:  /usr/local/lib
   MPIEXEC:       /usr/local/lib/opencarp/lib/petsc/bin/mpiexec
--------------------------------------------------------------------------------------------------------------
System Info
--------------------------------------------------------------------------------------------------------------
   Python:    3.12.3
   OS:        Ubuntu 24.04.1 LTS
   SETTINGS:  /home/bndr32/.config/carputils/settings.yaml
   ORCID:     0000-0000-0000-0000
=======================================
Requested mesh already exists, skipping generation.
Reading file: meshes/2024-11-06_fyEvMWsOUY/block.elem
mkdir -p /home/bndr32/PycharmProjects/Example01_openCARP/tutorials/02_EP_tissue/01_basic_usage/2024-11-07_basic_20.0

#----------------------------------------------------------------------------------------------------
#              Launching openCARP Simulation 2024-11-07_basic_20.0
#----------------------------------------------------------------------------------------------------

/usr/local/bin/openCARP \
  +F /home/bndr32/PycharmProjects/Example01_openCARP/tutorials/02_EP_tissue/01_basic_usage/./basic.par \
  -ellip_use_pt 0 \
  -parab_use_pt 0 \
  -parab_options_file /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/carputils/resources/petsc_options/ilu_cg_opts \
  -ellip_options_file /home/bndr32/PycharmProjects/Example01_openCARP/.venv/lib/python3.12/site-packages/carputils/resources/petsc_options/gamg_cg_opts \
  -simID 2024-11-07_basic_20.0 \
  -meshname meshes/2024-11-06_fyEvMWsOUY/block \
  -dt 25 \
  -tend 20.0 \
  -num_phys_regions 2 \
  -phys_region[0].name "Intracellular domain" \
  -phys_region[0].ptype 0 \
  -phys_region[0].num_IDs 1 \
  -phys_region[0].ID[0] 1 \
  -phys_region[1].name "Extracellular domain" \
  -phys_region[1].ptype 1 \
  -phys_region[1].num_IDs 1 \
  -phys_region[1].ID[0] 1 \
  -num_stim 1 \
  -stimulus[0].name S1 \
  -stimulus[0].stimtype 0 \
  -stimulus[0].strength 20.0 \
  -stimulus[0].duration 15.0 \
  -stimulus[0].p0[0] -5050.0 \
  -stimulus[0].p1[0] -4950.0 \
  -stimulus[0].p0[1] -550.0 \
  -stimulus[0].p1[1] 550.0 \
  -stimulus[0].p0[2] -150.0 \
  -stimulus[0].p1[2] 150.0 \
  -gridout_i 3 \
  -gridout_e 3 \
  -spacedt 0.1


*** Unrecognized keyword -stimulus[0].p0[0]


*** Error reading parameters

Error: 2024-11-07_basic_20.0/vm.igb.gz does not exist!
#---------------------------------------------------------------------------------
#        Launching Meshalyzer
#---------------------------------------------------------------------------------

/home/bndr32/.local/share/applications/squashfs-root/meshalyzer \
  2024-11-07_basic_20.0/block_i \
  2024-11-07_basic_20.0/vm.igb.gz \
  /home/bndr32/PycharmProjects/Example01_openCARP/tutorials/02_EP_tissue/01_basic_usage/./view_vm.mshz

/home/bndr32/.local/share/applications/squashfs-root/meshalyzer failed with error code -11

(That last line appears as I close meshalyzer, I imagine code -11 is the exit code?)

Thanks!

1 Answer

0 votes
by (140 points)

Hey!

The core of the issue is that the -stimulus[0].p0[0] parameter is not recognized and therefore the simulation is not starting. This is why you are missing the vm.igb.gz file.

I just tired to replicate the problem in a virtual environment on Python 3.12.7 and I get the same "SyntaxWarning: invalid escape sequence" in the first line. However, the simulation runs fine for me. 

The invalid escape sequences the python interpreter detects here are all located in the documentation part of run.py. Maybe you can try deleting this part from the script and run it again using 

./run.py --duration 20 --S1-strength 20. --S1-dur 15 --visualize

If this does not help, try to run the openCARP command directly. You can find it in your post above the output *** Unrecognized keyword -stimulus[0].p0[0]

Depending on the type of shell you are using, you might need to put all arguments in quotes like (e.g. "-stimulus[0].p0[0]" -5050.0) or simply put noglob in front of the entire command.

Give it a try and report back if and what worked.

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