Skip to content
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

Closed
jmpmcmanus opened this issue Aug 16, 2017 · 11 comments
Closed

pyswmm on fedora #114

jmpmcmanus opened this issue Aug 16, 2017 · 11 comments
Assignees

Comments

@jmpmcmanus
Copy link

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

@bemcdonnell
Copy link
Member

@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).

@jmpmcmanus
Copy link
Author

jmpmcmanus commented Aug 17, 2017 via email

@bemcdonnell
Copy link
Member

@jmpmcmanus, Totally. Any help along these lines would be fantastic!

@bemcdonnell
Copy link
Member

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?

@jmpmcmanus
Copy link
Author

jmpmcmanus commented Aug 17, 2017 via email

@bemcdonnell
Copy link
Member

bemcdonnell commented Aug 17, 2017

@jmpmcmanus,

What if you try:

>>> from pyswmm import Simulation
>>>
>>> with Simulation('model.inp') as sim:
...     for ind in sim:
...         pass

@jmpmcmanus
Copy link
Author

jmpmcmanus commented Aug 17, 2017 via email

@bemcdonnell
Copy link
Member

@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')

@jmpmcmanus
Copy link
Author

jmpmcmanus commented Aug 17, 2017 via email

@bemcdonnell
Copy link
Member

@jmpmcmanus, awesome! Sounds like a I have to fix the bug in the execute() method.

@bemcdonnell
Copy link
Member

Bug reported: #115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants