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

Update on python API to correct undefined references #54

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

jmllorens
Copy link

Since the migration to the new C API the python module stop working as expected. A few errors appear after import:

  • undefined functions: Layer_Init, Material_Init, Material_InitTensor, Simulation_AddMaterial, Simulation_GetPoyntingFlux and Simulation_MakeExcitationExterior
  • The SetFrequency stop detroying previous results.

All these dependencies to the old API have been corrected by upgrading to the new C API when possible.

Old API calls still remains, although the python extension is more useful that the current version.

jmllorens and others added 3 commits April 21, 2017 16:41
Since the migration to the new C API the python module stop working as expected. A few errors appear after import: undefined functions (Layer_Init, Material_Init, Material_InitTensor, Simulation_AddMaterial, Simulation_GetPoyntingFlux and Simulation_MakeExcitationExterior) and the SetFrequency stop detroying the previous results. All these dependencies to the old API have been corrected by upgrading to the new C API when possible.
Patched S4Sim_SetRegionCircle file
@kwrobert
Copy link

kwrobert commented May 4, 2017

Works like a charm! Thanks so much for making these corrections.

@jmllorens
Copy link
Author

@kwrobert After sending the pull request I noticed that some of functions which still use the old API are not working properly. For example, I fixed S4Sim_SetRegionCircle in my fork, because is one of the functions I use most. Probably it is a better a idea to wait until S4v2 is merged with master to implement all the changes.

The update of the python API is complete for regions. Apparently, everything is working. The only difference between these results and those of ca2b90 commit are when the region has an angle different from zero.

Changes in pattern.c are to make it compliant with SuiteSparse. 

The make related files are forced to use the system gcc for compilation and linking.
The kwlist of the python API is compatible with the old version. S4_Layer and S4_Material are changed to Layer and Material.
@Chronum94
Copy link

I get a
ImportError: /home/chronum/S4/jmllorens/S4/build/lib.linux-x86_64-3.6/S4.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyInt_AsLong when working with this. Any ideas?

Commented the ENABLE_S4_TRACE option, which is useful for debugging purposes.
Binaries removed from index and ENABLE_S4_TRACE removed as default option in Makefile.ubuntu.
This branch uses the new S4 python API which turns out to be very unstable. To coexists both modules, the name of the module in this branch changed from S4 to S42.
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

Successfully merging this pull request may close these issues.

3 participants