BhallaLab / moose-core

C++ basecode and python scripting interface
https://moose.ncbs.res.in
GNU General Public License v3.0
15 stars 26 forks source link

Warn: Invalid parser state #431

Closed vinuvargheseijk closed 3 years ago

vinuvargheseijk commented 3 years ago

I get the following warning after the ExprtK is implemented. This was not happening with the earlier version.

Warn: Invalid parser state

Command to run

python chmp_flat.py 0.2 0.01 415 20.0 330

chmp_flat.zip

dilawar commented 3 years ago

Seems to be fine with latest commit. Note that I have not waited for the whole simulation to finish.

(PY38) [dilawars@chutki build (issue_431)]$ python3 chmp_flat.py 0.2 0.01 415 20.0 330
INCOMING:
  /library[0]/hydra[0]/hydra[0]/A[0]/Adot, [parentMsg] <-- /library[0]/hydra[0]/hydra[0]/A, [childOut]
  /library[0]/hydra[0]/hydra[0]/A[0]/Adot, [process,reinit] <-- /clock, [process12,reinit12]

OUTGOING:
  /library[0]/hydra[0]/hydra[0]/A[0]/Adot, [childOut] <-- /library[0]/hydra[0]/hydra[0]/A[0]/Adot[0]/x, [parentMsg]

None
Elements under /library[0]
    /library[0]/dend
    /library[0]/hydra

Elements under /library[0]/hydra[0]
    /library[0]/hydra[0]/hydra

DeprecationWarning:: Use Soitch::reacSystemPath instead. In the future, it will be an error.
Rdesigneur: Elec model has 102 compartments and 0 spines on 102 compartments.
    Chem part of model has the following compartments: 
    | In dend, 1020 voxels X 5 pools
0.0
1e-07
2e-07
3e-07
4e-07
5e-07
6e-07
7e-07
8e-07
9e-07
1e-06
1.1e-06
1.2e-06
1.2999999999999998e-06
1.4e-06
1.5e-06
1.6e-06
1.6999999999999998e-06
1.8e-06
1.9e-06
2e-06
2.1e-06
2.2e-06
2.3e-06
2.4e-06
2.4999999999999998e-06
2.6e-06
2.7e-06
2.8000000000000003e-06
2.9e-06
3e-06
3.1e-06
3.2e-06
3.3e-06
3.4e-06
3.5e-06
3.6e-06
3.6999999999999997e-06
3.8e-06
3.9e-06
4e-06
4.1e-06
4.2e-06
4.2999999999999995e-06
4.399999999999999e-06
4.499999999999999e-06
4.6e-06
4.7e-06
4.8e-06
4.9e-06
in pert_int
in computeTP
0.0 diff length 1eanalaytical sum 1D is 0.019999999999999983 max of anC is 0.0003568248232305542
analaytical sum 2D is 0.019999999999996392 max of anC2 is 6.3661977236758125e-06 0.0001784124116152771 1.5915494309189531e-06-07

If you are using pre-built packages from PyPI, they are failing to build and a PR is waiting to be merged https://github.com/BhallaLab/deploy/pull/5 . You may have to build by yourself.

vinuvargheseijk commented 3 years ago

You need to wait for a few minutes for the warning to come up. That is after this stage.

dilawar commented 3 years ago

Is there a way to reach this error quickly? Maybe by changing the parameters passed to the script?

vinuvargheseijk commented 3 years ago

No this will take only a maximum of 5 minutes.

in pert_int in computeTP (0.0, 'diff length', 1e-07) ('analaytical sum 1D is', 0.019999999999999983, 'max of anC is', 0.0003568248232305542) ('analaytical sum 2D is', 0.019999999999996392, 'max of anC2 is', 6.3661977236758125e-06, 0.0001784124116152771, 1.5915494309189531e-06) Warn: Invalid parser state. Warn: Invalid parser state. Warn: Invalid parser state. Warn: Invalid parser state. Warn: Invalid parser state. Warn: Invalid parser state. Warn: Invalid parser state. Warn: Invalid parser state. Warn: Invalid parser state. Warn: Invalid parser state.

vinuvargheseijk commented 3 years ago

chmp_flat.zip

Here it is. I have commented a line. Now warning will reach fast.

dilawar commented 3 years ago

I think there is version mismatch. Can you post the commit number? On my system with the latest checkout, I get the following.

(PY38) [dilawars@chutki build (issue_431)]$ python3 chmp_flat.py 0.2 0.01 415 20.0 330
INCOMING:
  /library[0]/hydra[0]/hydra[0]/A[0]/Adot, [parentMsg] <-- /library[0]/hydra[0]/hydra[0]/A, [childOut]
  /library[0]/hydra[0]/hydra[0]/A[0]/Adot, [process,reinit] <-- /clock, [process12,reinit12]

OUTGOING:
  /library[0]/hydra[0]/hydra[0]/A[0]/Adot, [childOut] <-- /library[0]/hydra[0]/hydra[0]/A[0]/Adot[0]/x, [parentMsg]

None
Elements under /library[0]
    /library[0]/dend
    /library[0]/hydra

Elements under /library[0]/hydra[0]
    /library[0]/hydra[0]/hydra

DeprecationWarning:: Use Soitch::reacSystemPath instead. In the future, it will be an error.
Rdesigneur: Elec model has 102 compartments and 0 spines on 102 compartments.
    Chem part of model has the following compartments: 
    | In dend, 1020 voxels X 5 pools
0.0
1e-07
2e-07
3e-07
4e-07
5e-07
6e-07
7e-07
8e-07
9e-07
1e-06
1.1e-06
1.2e-06
1.2999999999999998e-06
1.4e-06
1.5e-06
1.6e-06
1.6999999999999998e-06
1.8e-06
1.9e-06
2e-06
2.1e-06
2.2e-06
2.3e-06
2.4e-06
2.4999999999999998e-06
2.6e-06
2.7e-06
2.8000000000000003e-06
2.9e-06
3e-06
3.1e-06
3.2e-06
3.3e-06
3.4e-06
3.5e-06
3.6e-06
3.6999999999999997e-06
3.8e-06
3.9e-06
4e-06
4.1e-06
4.2e-06
4.2999999999999995e-06
4.399999999999999e-06
4.499999999999999e-06
4.6e-06
4.7e-06
4.8e-06
4.9e-06

Traceback (most recent call last):
  File "chmp_flat.py", line 260, in <module>
    svec,bvec,avec,storeAvec,storeBvec = main()
  File "chmp_flat.py", line 250, in main
    fileName = 'champneysdistS'+str(distS)+'pos_per'+str(pos_per)+'timePer20pos'+str(posPer)+'Source'+str(SourceC)+'.xml'
NameError: name 'distS' is not defined
vinuvargheseijk commented 3 years ago

chmp_flat.zip

Now it works. This is the latest version.

vinuvargheseijk commented 3 years ago

Let me know if there is a fix to this issue. The above script can be used to debug.

dilawar commented 3 years ago

I did not see invalid parser state with master branch. Post the output of python -c "import moose; print(moose.version())"

[dilawars@chutki build (issue_431)]$  python3 chmp_flat.py 0.2 0.01 415 20.0 330
INCOMING:
  /library[0]/hydra[0]/hydra[0]/A[0]/Adot, [parentMsg] <-- /library[0]/hydra[0]/hydra[0]/A, [childOut]
  /library[0]/hydra[0]/hydra[0]/A[0]/Adot, [process,reinit] <-- /clock, [process12,reinit12]

OUTGOING:
  /library[0]/hydra[0]/hydra[0]/A[0]/Adot, [childOut] <-- /library[0]/hydra[0]/hydra[0]/A[0]/Adot[0]/x, [parentMsg]

None
Elements under /library[0]
    /library[0]/dend
    /library[0]/hydra

Elements under /library[0]/hydra[0]
    /library[0]/hydra[0]/hydra

DeprecationWarning:: Use Soitch::reacSystemPath instead. In the future, it will be an error.
Rdesigneur: Elec model has 102 compartments and 0 spines on 102 compartments.
    Chem part of model has the following compartments: 
    | In dend, 1020 voxels X 5 pools
0.0
1e-07
2e-07
3e-07
4e-07
5e-07
6e-07
7e-07
8e-07
9e-07
1e-06
1.1e-06
1.2e-06
1.2999999999999998e-06
1.4e-06
1.5e-06
1.6e-06
1.6999999999999998e-06
1.8e-06
1.9e-06
2e-06
2.1e-06
2.2e-06
2.3e-06
2.4e-06
2.4999999999999998e-06
2.6e-06
2.7e-06
2.8000000000000003e-06
2.9e-06
3e-06
3.1e-06
3.2e-06
3.3e-06
3.4e-06
3.5e-06
3.6e-06
3.6999999999999997e-06
3.8e-06
3.9e-06
4e-06
4.1e-06
4.2e-06
4.2999999999999995e-06
4.399999999999999e-06
4.499999999999999e-06
4.6e-06
4.7e-06
4.8e-06
4.9e-06
[dilawars@chutki build (issue_431)]$ 
vinuvargheseijk commented 3 years ago

I updated to the latest version. The warning is not showing. Thanks. I will check with my full script and let you know.

dilawar commented 3 years ago

@vinuvargheseijk Close this if fixes worked for you.

vinuvargheseijk commented 3 years ago

Thanks Dilawar. Looks ok after a few example runs. So closing now.