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

optimized.so: undefined symbol: PyFPE_jbuf #697

Open
dancehours opened this issue Apr 28, 2021 · 3 comments
Open

optimized.so: undefined symbol: PyFPE_jbuf #697

dancehours opened this issue Apr 28, 2021 · 3 comments

Comments

@dancehours
Copy link

Dear Bednar,

I have a problem for using load_snapshot, for example I try load_snapshot('/GCAL_2000000.typ')
and get the following errors:
Loading error:
Traceback (most recent call last):
File "/home/wenqi/miniconda2/envs/venv/topographica/topo/command/init.py", line 341, in load_snapshot
pickle.load(snapshot)
ImportError: /home/wenqi/miniconda2/envs/venv/topographica/topo/optimized/optimized.so: undefined symbol: PyFPE_jbuf

I would like to ask: how to solve this problem ?

@dancehours dancehours changed the title optimized.so: undefined symbol: PyUnicodeUCS2_Format optimized.so: undefined symbol: PyFPE_jbuf Apr 28, 2021
@jbednar
Copy link
Member

jbednar commented Apr 28, 2021

An error like that typically indicates that you have non-matching versions somewhere, either between some python code and the corresponding binary libraries, or maybe between the version used to create the .typ file and the current version. To decide between those cases, see if you can create a network, save a snapshot, and load it back in. If that works fine, then presumably the .typ file was saved with some older version, and you'd need to recreate the older environment if you want to use that .typ file. If you get the problem even with a brand-new .typ file, then it's likely an issue with your current environment, in which case you should try building it fresh.

@dancehours
Copy link
Author

Could it be possible to remove the optimized part connecting to load_snapshot function? I don't see what is the effect for load_snapshot to use optimized part. Recently I built new snapshots of GCAL model, but get the same error.

@jbednar
Copy link
Member

jbednar commented May 7, 2021

I don't think that we optimized snapshot loading, but the actual operation of the network. So you see an error to do with the optimized object just because you are trying to restore the state of an optimized object. You can turn off optimization altogether, but things will get 100X slower, and so that's not normally practical. In any case if you get the same error for newly saved snapshots I'd try to create your environment fresh, using older versions of the dependent code that were previously tested with Topographica.

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

No branches or pull requests

2 participants