|
[Sponsors] |
July 25, 2018, 06:34 |
OpenFoam log file monitor
|
#1 |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 17 |
Hi guys,
I uploaded an early version of my log file monitoring tool to my github page https://github.com/greole/foamMon . The tool aims to give an overview of the progress of long running simulations. Feel free to try it out. Cheers, Gregor |
|
September 5, 2018, 03:22 |
Version 0.2.2
|
#2 |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 17 |
If you're interested I just released version 0.2.2, available on github and Pypi. The usage has changed slightly. To start it just run foamMon in any Simulation (or parent) folder. Tester and feedback are welcome.
|
|
September 5, 2018, 11:44 |
|
#3 | |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
Quote:
Code:
me@work:~$ python3 -m pip install foamMon Collecting foamMon Using cached https://files.pythonhosted.org/packages/0b/09/8bf8da90eee7dd58cdb6b770df3c8677ef16c8887dd71c03d016d8c5563a/foamMon-0.2.2-py3-none-any.whl Collecting docopt (from foamMon) Collecting colorama (from foamMon) Using cached https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl Installing collected packages: docopt, colorama, foamMon Successfully installed colorama-0.3.9 docopt-0.6.2 foamMon-0.0.0 You are using pip version 8.1.1, however version 18.0 is available. You should consider upgrading via the 'pip install --upgrade pip' command. me@work:~$ foamMon foamMon: command not found me@work:~$ python3 -m foamMon /usr/bin/python3: No module named foamMon me@work:~$ ls .local/lib/python3.5/site-packages/ colorama docopt.py foamMon-0.0.0-py3.5.egg colorama-0.3.9.dist-info easy-install.pth foamMon-0.2.2.dist-info docopt-0.6.2.dist-info FoamMon __pycache__ |
||
September 6, 2018, 10:36 |
|
#4 |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 17 |
Hey Rodrigo,
thanks for giving it a try. Can you run Code:
~/.local/bin/foamMon |
|
September 6, 2018, 11:01 |
|
#5 | |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
Quote:
Code:
me@work:~$ .local/bin/foamMon Traceback (most recent call last): File ".local/bin/foamMon", line 26, in <module> from FoamMon import cui File "/home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg/FoamMon/__init__.py", line 3, in <module> File "/home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg/FoamMon/FoamDataStructures.py", line 11, in <module> File "/home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg/FoamMon/cui.py", line 1, in <module> ImportError: No module named 'urwid' |
||
September 7, 2018, 03:45 |
|
#6 |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 17 |
Ok, it seems that ~/.local/bin is not in your $PATH variable. What distro are you using or do you use any virtualenv like conda? Sometimes simply opening a new shell helps otherwise add a
Code:
export PATH=$PATH:$HOME/.local/bin Regarding the urwid error, I forgot to add urwid to the depencies. After running Code:
python3 -m pip install foamMon --upgrade |
|
September 7, 2018, 04:34 |
|
#7 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
Great, this worked. "foamMon" is now installed and it can be called.
BTW: conventional Ubuntu 16.04 installation. |
|
September 7, 2018, 04:39 |
|
#8 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
So, let's keep going step by step... (that's why I put it in a separate post) ...first running issues:
Code:
me@work:~/OpenFOAM/me-6/run/snappy_with_AMR$ foamMon Traceback (most recent call last): File "/home/me/.local/bin/foamMon", line 26, in <module> from FoamMon import cui File "/home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg/FoamMon/__init__.py", line 3, in <module> File "/home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg/FoamMon/FoamDataStructures.py", line 11, in <module> File "/home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg/FoamMon/cui.py", line 19, in <module> ImportError: cannot import name 'Cases' me@work:~/OpenFOAM/me-6/run/snappy_with_AMR$ tree -L 2 ./ ./ └── windAroundBuildings ├── 0 ├── 1 ├── 10 ├── 11 ├── 12 ├── 13 ├── 14 ├── 2 ├── 3 ├── 4 ├── 5 ├── 6 ├── 7 ├── 8 ├── 9 ├── Allclean ├── Allrun ├── constant ├── log ├── log.blockMesh ├── log.snappyHexMesh ├── log.surfaceFeatures ├── README.txt ├── system └── visualizationExample.pvsm 18 directories, 8 files |
|
September 7, 2018, 04:42 |
|
#9 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
For some reason, it seems not to find this class https://github.com/greole/foamMon/bl...uctures.py#L64
|
|
September 7, 2018, 05:25 |
|
#10 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
WARNING to potential readers: this starts to become less and less related to CFD/OpenFOAM. Keep reading under your responsibility.
See following: Code:
me@work:~$ foamMon Traceback (most recent call last): File "/home/me/.local/bin/foamMon", line 26, in <module> from FoamMon import cui File "/home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg/FoamMon/__init__.py", line 3, in <module> File "/home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg/FoamMon/FoamDataStructures.py", line 11, in <module> File "/home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg/FoamMon/cui.py", line 19, in <module> ImportError: cannot import name 'Cases' me@work:~$ find $HOME/.local/lib/python3.5 -name "FoamDataStructures.py" /home/me/.local/lib/python3.5/site-packages/FoamMon/FoamDataStructures.py me@work:~$ cd $HOME/.local/lib/python3.5/site-packages/ me@work:~/.local/lib/python3.5/site-packages$ tree -L 1 ./ ./ ├── colorama ├── colorama-0.3.9.dist-info ├── docopt-0.6.2.dist-info ├── docopt.py ├── easy-install.pth ├── FoamMon ├── foamMon-0.0.0-py3.5.egg ├── foamMon-0.2.2.dist-info ├── foamMon-0.2.3.dist-info ├── __pycache__ ├── urwid └── urwid-2.0.1.dist-info 9 directories, 3 files me@work:~/.local/lib/python3.5/site-packages$ ls foamMon* FoamMon foamMon-0.0.0-py3.5.egg FoamMon: cui.py FoamDataStructures.py header.py __init__.py Log.py __pycache__ version.py foamMon-0.2.2.dist-info: INSTALLER METADATA RECORD top_level.txt WHEEL foamMon-0.2.3.dist-info: INSTALLER METADATA RECORD top_level.txt WHEEL Code:
from .<filename-starting-with-a-dot> import <some-class> Code:
/home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg/FoamMon/ Code:
/home/me/.local/lib/python3.5/site-packages/FoamMon/ |
|
September 7, 2018, 11:10 |
|
#11 |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 17 |
If you have a github account we could move the discussion to https://github.com/greole/foamMon/issues
Regarding the import issue: Could you remove the /home/me/.local/lib/python3.5/site-packages/foamMon-0.0.0-py3.5.egg folder, and try again? |
|
September 7, 2018, 18:22 |
|
#12 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
Hi Gregor,
I've just tried it again at home from another machine (Ubuntu 18.04) and everything works fine finally. I will debug myself the installation in my other machine after the weekend, so don't worry anymore for it. Installation steps for the interested reader: Code:
python3 -m pip install foamMon add following line to the .bashrc file (Gregor, you may want to add this step to the instructions in the repository README file): Code:
export PATH="$PATH:$HOME/.local/bin" ... and that's it. It is a small great tool! Quite intuitive and useful. Just 2 questions: - What does "Writeout" indicate? it looks like how long it would take to fill up the storage capacity at this writing rate... is it right? - What does "Press (T) to toggle active" does? I keep pressing it (both "T" and "t") but it seems to have no effect. Thanks again Gregor for the help! PS: Is there any administrator among the readers willing to move this thread to the Community Contributions section? |
|
September 10, 2018, 05:07 |
|
#13 |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 17 |
Hi Rodrigo,
thanks for your feedback und for testing. - "Writeout" is the estimated time till a new timestep is written to disk. - "T" should hide all cases that are currently not running. I think it is not active at the moment. Currently there still some bugs and rough edges, which I'll try to fix over time. Cheers, Gregor |
|
September 24, 2018, 10:23 |
|
#14 | |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 17 |
Quote:
Ok, since I cannot move this thread, I created a new one New foamMon version 0.2.5 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 19:13 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 13:41 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |