-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyswmm on fedora #114
Comments
@jmpmcmanus, pyswmm is fully supported on windows as of today. We are working on upgrading the project so that swmm is built specific for each platform automatically. The builds currently happen "offline" and in the case of Linux, we currently don't have anyone building these regularly as we make improvements to swmm. This explains why when you are calling swmm_getversioninfo it's not working (since that function is relatively new and not present in the swmm.so you downloaded). |
Is there a way I could help?
On Wednesday, August 16, 2017 10:11 PM, Bryant E. McDonnell <[email protected]> wrote:
@jmpmcmanus, pyswmm is fully supported on windows as of today. We are working on upgrading the project so that swmm is built specific for each platform automatically. The builds currently happen "offline" and in the case of Linux, we currently don't have anyone building these regularly as we make improvements to swmm. This explains why when you are calling swmm_getversioninfo it's not working (since that function is relatively new and not present in the swmm.so you downloaded).—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@jmpmcmanus, Totally. Any help along these lines would be fantastic! |
In continuation:
Can you share the error info? |
```python
from pyswmm import Simulation
f = 'example1.inp'
sim = Simulation(f)
sim.execute()
```
... SWMM Version 5.2.0.dev0... Run Complete*** Error in `python': double free or corruption (!prev): 0x0000000000a9e720 ***======= Backtrace: =========/lib64/libc.so.6(+0x7c8ac)[0x7f52f0ec18ac]/lib64/libc.so.6(+0x87759)[0x7f52f0ecc759]/lib64/libc.so.6(cfree+0x16e)[0x7f52f0ed20be]/lib64/libc.so.6(fclose+0xae)[0x7f52f0eb669e]/home/jmcmanus/anaconda3/lib/python3.6/site-packages/pyswmm-0.5.0.dev0-py3.6.egg/pyswmm/lib/linux/libswmm5.so(swmm_close+0x3e)[0x7f52e8c4ecbe]/home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(ffi_call_unix64+0x4c)[0x7f52e93f6550]/home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(ffi_call+0x1f5)[0x7f52e93f5cf5]/home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(_ctypes_callproc+0x3dc)[0x7f52e93ed83c]/home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(+0x9da3)[0x7f52e93e5da3]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(_PyObject_FastCallDict+0x9e)[0x7f52f1dc5ade]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(+0x1482bb)[0x7f52f1ea22bb]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x26fd)[0x7f52f1ea515d]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(+0x145e74)[0x7f52f1e9fe74]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(+0x1485e8)[0x7f52f1ea25e8]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x26fd)[0x7f52f1ea515d]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(+0x146a60)[0x7f52f1ea0a60]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(+0x14848a)[0x7f52f1ea248a]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x26fd)[0x7f52f1ea515d]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(+0x145e74)[0x7f52f1e9fe74]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(+0x1485e8)[0x7f52f1ea25e8]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x26fd)[0x7f52f1ea515d]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(+0x146a60)[0x7f52f1ea0a60]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(PyEval_EvalCodeEx+0x63)[0x7f52f1ea0ee3]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(PyEval_EvalCode+0x3b)[0x7f52f1ea0f2b]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(PyRun_InteractiveOneObject+0x1e6)[0x7f52f1ed58d6]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(PyRun_InteractiveLoopFlags+0x5e)[0x7f52f1ed5c3e]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(PyRun_AnyFileExFlags+0x4c)[0x7f52f1ed5d7c]/home/jmcmanus/anaconda3/bin/../lib/libpython3.6m.so.1.0(Py_Main+0x100b)[0x7f52f1ef029b]python(main+0x16d)[0x400c1d]/lib64/libc.so.6(__libc_start_main+0xea)[0x7f52f0e654da]python[0x4009e9]======= Memory map: ========00400000-00401000 r-xp 00000000 fd:02 33304500 /home/jmcmanus/anaconda3/bin/python3.600601000-00602000 rw-p 00001000 fd:02 33304500 /home/jmcmanus/anaconda3/bin/python3.600890000-00b69000 rw-p 00000000 00:00 0 [heap]7f52e0000000-7f52e0021000 rw-p 00000000 00:00 0 7f52e0021000-7f52e4000000 ---p 00000000 00:00 0 7f52e6fc9000-7f52e6fdf000 r-xp 00000000 fd:02 13645790 /home/jmcmanus/anaconda3/lib/libgcc_s.so.17f52e6fdf000-7f52e71de000 ---p 00016000 fd:02 13645790 /home/jmcmanus/anaconda3/lib/libgcc_s.so.17f52e71de000-7f52e71df000 rw-p 00015000 fd:02 13645790 /home/jmcmanus/anaconda3/lib/libgcc_s.so.17f52e71df000-7f52e71e0000 ---p 00000000 00:00 0 7f52e71e0000-7f52e79e0000 rw-p 00000000 00:00 0 7f52e79e0000-7f52e79e1000 ---p 00000000 00:00 0 7f52e79e1000-7f52e81e1000 rw-p 00000000 00:00 0 7f52e81e1000-7f52e81e2000 ---p 00000000 00:00 0 7f52e81e2000-7f52e89e2000 rw-p 00000000 00:00 0 7f52e89e2000-7f52e89f0000 r-xp 00000000 fd:02 13645793 /home/jmcmanus/anaconda3/lib/libgomp.so.1.0.07f52e89f0000-7f52e8bf0000 ---p 0000e000 fd:02 13645793 /home/jmcmanus/anaconda3/lib/libgomp.so.1.0.07f52e8bf0000-7f52e8bf1000 rw-p 0000e000 fd:02 13645793 /home/jmcmanus/anaconda3/lib/libgomp.so.1.0.07f52e8bf1000-7f52e8c74000 r-xp 00000000 fd:02 35922902 /home/jmcmanus/anaconda3/lib/python3.6/site-packages/pyswmm-0.5.0.dev0-py3.6.egg/pyswmm/lib/linux/libswmm5.so7f52e8c74000-7f52e8e73000 ---p 00083000 fd:02 35922902 /home/jmcmanus/anaconda3/lib/python3.6/site-packages/pyswmm-0.5.0.dev0-py3.6.egg/pyswmm/lib/linux/libswmm5.so7f52e8e73000-7f52e8e74000 r--p 00082000 fd:02 35922902 /home/jmcmanus/anaconda3/lib/python3.6/site-packages/pyswmm-0.5.0.dev0-py3.6.egg/pyswmm/lib/linux/libswmm5.so7f52e8e74000-7f52e8e7b000 rw-p 00083000 fd:02 35922902 /home/jmcmanus/anaconda3/lib/python3.6/site-packages/pyswmm-0.5.0.dev0-py3.6.egg/pyswmm/lib/linux/libswmm5.so7f52e8e7b000-7f52e8f4e000 rw-p 00000000 00:00 0 7f52e8f4e000-7f52e8f50000 r-xp 00000000 fd:02 33304229 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_heapq.cpython-36m-x86_64-linux-gnu.so7f52e8f50000-7f52e9150000 ---p 00002000 fd:02 33304229 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_heapq.cpython-36m-x86_64-linux-gnu.so7f52e9150000-7f52e9152000 rw-p 00002000 fd:02 33304229 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_heapq.cpython-36m-x86_64-linux-gnu.so7f52e9152000-7f52e91d2000 rw-p 00000000 00:00 0 7f52e91d2000-7f52e91da000 r-xp 00000000 fd:02 33304247 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_struct.cpython-36m-x86_64-linux-gnu.so7f52e91da000-7f52e93d9000 ---p 00008000 fd:02 33304247 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_struct.cpython-36m-x86_64-linux-gnu.so7f52e93d9000-7f52e93dc000 rw-p 00007000 fd:02 33304247 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_struct.cpython-36m-x86_64-linux-gnu.so7f52e93dc000-7f52e93fc000 r-xp 00000000 fd:02 33304221 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so7f52e93fc000-7f52e95fb000 ---p 00020000 fd:02 33304221 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so7f52e95fb000-7f52e9600000 rw-p 0001f000 fd:02 33304221 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so7f52e9600000-7f52e9613000 r-xp 00000000 fd:02 33304225 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_datetime.cpython-36m-x86_64-linux-gnu.so7f52e9613000-7f52e9812000 ---p 00013000 fd:02 33304225 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_datetime.cpython-36m-x86_64-linux-gnu.so7f52e9812000-7f52e9815000 rw-p 00012000 fd:02 33304225 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/_datetime.cpython-36m-x86_64-linux-gnu.so7f52e9815000-7f52e981e000 r-xp 00000000 fd:02 33304259 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/math.cpython-36m-x86_64-linux-gnu.so7f52e981e000-7f52e9a1d000 ---p 00009000 fd:02 33304259 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/math.cpython-36m-x86_64-linux-gnu.so7f52e9a1d000-7f52e9a1f000 rw-p 00008000 fd:02 33304259 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/math.cpython-36m-x86_64-linux-gnu.so7f52e9a1f000-7f52e9a5f000 rw-p 00000000 00:00 0 7f52e9a5f000-7f52e9a84000 r-xp 00000000 fd:01 2912850 /usr/lib64/libtinfo.so.5.97f52e9a84000-7f52e9c84000 ---p 00025000 fd:01 2912850 /usr/lib64/libtinfo.so.5.97f52e9c84000-7f52e9c88000 r--p 00025000 fd:01 2912850 /usr/lib64/libtinfo.so.5.97f52e9c88000-7f52e9c89000 rw-p 00029000 fd:01 2912850 /usr/lib64/libtinfo.so.5.97f52e9c89000-7f52e9cb8000 r-xp 00000000 fd:01 2912842 /usr/lib64/libncursesw.so.5.97f52e9cb8000-7f52e9eb8000 ---p 0002f000 fd:01 2912842 /usr/lib64/libncursesw.so.5.97f52e9eb8000-7f52e9eb9000 r--p 0002f000 fd:01 2912842 /usr/lib64/libncursesw.so.5.97f52e9eb9000-7f52e9eba000 rw-p 00030000 fd:01 2912842 /usr/lib64/libncursesw.so.5.97f52e9ef9000-7f52e9f31000 r-xp 00000000 fd:02 16126719 /home/jmcmanus/anaconda3/lib/libreadline.so.6.27f52e9f31000-7f52ea131000 ---p 00038000 fd:02 16126719 /home/jmcmanus/anaconda3/lib/libreadline.so.6.27f52ea131000-7f52ea139000 rw-p 00038000 fd:02 16126719 /home/jmcmanus/anaconda3/lib/libreadline.so.6.27f52ea139000-7f52ea13a000 rw-p 00000000 00:00 0 7f52ea13a000-7f52ea140000 r-xp 00000000 fd:02 33304265 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/readline.cpython-36m-x86_64-linux-gnu.so7f52ea140000-7f52ea33f000 ---p 00006000 fd:02 33304265 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/readline.cpython-36m-x86_64-linux-gnu.so7f52ea33f000-7f52ea341000 rw-p 00005000 fd:02 33304265 /home/jmcmanus/anaconda3/lib/python3.6/lib-dynload/readline.cpython-36m-x86_64-linux-gnu.so7f52ea341000-7f52ea381000 rw-p 00000000 00:00 0 7f52ea381000-7f52f0e45000 r--p 00000000 fd:01 2906467 /usr/lib/locale/locale-archive7f52f0e45000-7f52f100c000 r-xp 00000000 fd:01 2895525 /usr/lib64/libc-2.25.so7f52f100c000-7f52f120c000 ---p 001c7000 fd:01 2895525 /usr/lib64/libc-2.25.so7f52f120c000-7f52f1210000 r--p 001c7000 fd:01 2895525 /usr/lib64/libc-2.25.so7f52f1210000-7f52f1212000 rw-p 001cb000 fd:01 2895525 /usr/lib64/libc-2.25.so7f52f1212000-7f52f1216000 rw-p 00000000 00:00 0 7f52f1216000-7f52f132b000 r-xp 00000000 fd:01 2895542 /usr/lib64/libm-2.25.so7f52f132b000-7f52f152a000 ---p 00115000 fd:01 2895542 /usr/lib64/libm-2.25.so7f52f152a000-7f52f152b000 r--p 00114000 fd:01 2895542 /usr/lib64/libm-2.25.so7f52f152b000-7f52f152c000 rw-p 00115000 fd:01 2895542 /usr/lib64/libm-2.25.so7f52f152c000-7f52f1533000 r-xp 00000000 fd:01 2899072 /usr/lib64/librt-2.25.so7f52f1533000-7f52f1732000 ---p 00007000 fd:01 2899072 /usr/lib64/librt-2.25.so7f52f1732000-7f52f1733000 r--p 00006000 fd:01 2899072 /usr/lib64/librt-2.25.so7f52f1733000-7f52f1734000 rw-p 00007000 fd:01 2899072 /usr/lib64/librt-2.25.so7f52f1734000-7f52f1736000 r-xp 00000000 fd:01 2897716 /usr/lib64/libutil-2.25.so7f52f1736000-7f52f1935000 ---p 00002000 fd:01 2897716 /usr/lib64/libutil-2.25.so7f52f1935000-7f52f1936000 r--p 00001000 fd:01 2897716 /usr/lib64/libutil-2.25.so7f52f1936000-7f52f1937000 rw-p 00002000 fd:01 2897716 /usr/lib64/libutil-2.25.so7f52f1937000-7f52f193a000 r-xp 00000000 fd:01 2895540 /usr/lib64/libdl-2.25.so7f52f193a000-7f52f1b39000 ---p 00003000 fd:01 2895540 /usr/lib64/libdl-2.25.so7f52f1b39000-7f52f1b3a000 r--p 00002000 fd:01 2895540 /usr/lib64/libdl-2.25.so7f52f1b3a000-7f52f1b3b000 rw-p 00003000 fd:01 2895540 /usr/lib64/libdl-2.25.so7f52f1b3b000-7f52f1b54000 r-xp 00000000 fd:01 2899069 /usr/lib64/libpthread-2.25.so7f52f1b54000-7f52f1d54000 ---p 00019000 fd:01 2899069 /usr/lib64/libpthread-2.25.so7f52f1d54000-7f52f1d55000 r--p 00019000 fd:01 2899069 /usr/lib64/libpthread-2.25.so7f52f1d55000-7f52f1d56000 rw-p 0001a000 fd:01 2899069 /usr/lib64/libpthread-2.25.so7f52f1d56000-7f52f1d5a000 rw-p 00000000 00:00 0 7f52f1d5a000-7f52f1fc8000 r-xp 00000000 fd:02 33040858 /home/jmcmanus/anaconda3/lib/libpython3.6m.so.1.07f52f1fc8000-7f52f21c8000 ---p 0026e000 fd:02 33040858 /home/jmcmanus/anaconda3/lib/libpython3.6m.so.1.07f52f21c8000-7f52f2231000 rw-p 0026e000 fd:02 33040858 /home/jmcmanus/anaconda3/lib/libpython3.6m.so.1.07f52f2231000-7f52f2261000 rw-p 00000000 00:00 0 7f52f2261000-7f52f2288000 r-xp 00000000 fd:01 2884141 /usr/lib64/ld-2.25.so7f52f22c1000-7f52f2446000 rw-p 00000000 00:00 0 7f52f2457000-7f52f2458000 rw-s 00000000 00:2b 380158 /tmp/ffivWGBcY (deleted)7f52f2458000-7f52f2459000 r-xs 00000000 00:2b 380158 /tmp/ffivWGBcY (deleted)7f52f247d000-7f52f247e000 rw-p 00000000 00:00 0 7f52f247e000-7f52f2485000 r--s 00000000 fd:01 3048510 /usr/lib64/gconv/gconv-modules.cache7f52f2485000-7f52f2487000 rw-p 00000000 00:00 0 7f52f2487000-7f52f2488000 r--p 00026000 fd:01 2884141 /usr/lib64/ld-2.25.so7f52f2488000-7f52f248a000 rw-p 00027000 fd:01 2884141 /usr/lib64/ld-2.25.so7ffd4c10d000-7ffd4c12f000 rw-p 00000000 00:00 0 [stack]7ffd4c1c1000-7ffd4c1c4000 r--p 00000000 00:00 0 [vvar]7ffd4c1c4000-7ffd4c1c6000 r-xp 00000000 00:00 0 [vdso]ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]Aborted (core dumped)
On Thursday, August 17, 2017 4:05 PM, Bryant E. McDonnell <[email protected]> wrote:
In continuation:
I also tried ln -s libswmm5.so to pyswmm/lib/linux/swmm5.so, but got a core dump when I tried using pyswmm.
Can you share the error info?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
What if you try: >>> from pyswmm import Simulation
>>>
>>> with Simulation('model.inp') as sim:
... for ind in sim:
... pass |
It did not crash, but I did not see any output.
|
@jmpmcmanus, output to the screen? or output to files? If output to screen is what you are looking for you can print the time, for example. >>> from pyswmm import Simulation
>>>
>>> with Simulation('model.inp') as sim:
... for ind in sim:
... print(sim.current_time) You can specify a path to the rpt and out files if you want: Simulation('model.inp', 'model.rpt', 'model.out') |
That worked when I ran sim.execute() it produced the rpt file and out file, before it did the core dump.
|
@jmpmcmanus, awesome! Sounds like a I have to fix the bug in the |
Bug reported: #115 |
I'm trying to use pyswmm on fedora with python 3.6. When I install it using pip the shared object library is not install at pyswmm/lib/linux/swmm5.so. If I download the shared object library from the pyswmm github site and put it in pyswmm/lib/linux/swmm5.so, I then get the following attribute error:
swmm5.so: undefined symbol: swmm_getVersionInfo
when I run execute. I think I need to compile the swmm5 shared library on my own machine. Could I get the makefile to compile swmm5.so?
Thanks
Jim
The text was updated successfully, but these errors were encountered: