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

Binary Compatible Interfaces Across Compilers #11

Open
yafshar opened this issue May 4, 2021 · 3 comments
Open

Binary Compatible Interfaces Across Compilers #11

yafshar opened this issue May 4, 2021 · 3 comments
Assignees

Comments

@yafshar
Copy link
Member

yafshar commented May 4, 2021

If the KIM-API library is compiled with Compiler A and in the process of building a kimpy, we use a Compiler B, it will end with an error. The issue is that C++ generally breaks binary compatibility across different compilers, usually due to name mangling, object layout, exception support.

A way to get around this is to update the kimpy interface to use the KIM-API C-style interface, similar to the KIM-API integration in the LAMMPS implementation.

@yafshar yafshar self-assigned this May 4, 2021
@mjwen
Copy link
Collaborator

mjwen commented May 8, 2021

@yafshar I am not too familiar with compiling with multiple compilers and have a question: Even if we switch to use C API of KIM-API, the binding code itself is still C++. Will this solve the issue?

@yafshar
Copy link
Member Author

yafshar commented May 9, 2021

@yafshar I am not too familiar with compiling with multiple compilers and have a question: Even if we switch to use C API of KIM-API, the binding code itself is still C++. Will this solve the issue?

@mjwen Yes, this is similar to the KIM-API interface in LAMMPS. Using a C-style interface approach allows you to compile KIM-API in 1 compiler and call it from kimpy which is compiled in another compiler.

We can address this issue later in a minor update.

@mjwen
Copy link
Collaborator

mjwen commented May 9, 2021

Sounds good. This won't change the Python interface and we can do it later in a minor.

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