-
Notifications
You must be signed in to change notification settings - Fork 43
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
C interface #28
C interface #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check-spelling found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@zaikunzhang I think this is ready for review |
Dear @jschueller , Thank you very much for the wonderful contribution! Sorry for the slow response. Is there a way to avoid renaming the Fortran files/subroutines, maybe by building the solvers one by one instead of all together? Another monitor comment is that you may consider using https://github.com/marketplace/actions/setup-fortran to get Fortran compilers in CI. Many thanks and best regards, |
While we could split the solvers, it would be impractical and also result in separate c libraries, this is probably not what we want because it would prevent to use more than one solver at at time in the client codes. I will check out setup-fortran, thanks |
This comment has been minimized.
This comment has been minimized.
oh, yes, there are usually no subdirs under /lib, or at least its less frequent |
What about this one? |
What is this piece of code for? |
Any comments? |
Could you direct me to the most recent run of the stress test? I have not found tests that run several hours and get cancelled by GitHub.
Did you need this? Without doing so, the workflow will always be marked as a failure. Thanks. |
|
For me, every example is to showcase how to use prima, as suggested by the word "example". That's why I suggest treating all examples as "external examples". This aligns with what I mentioned earlier: |
I suppose this is not needed. |
|
Rename modules to allow to compile everything into a single library
Hi @jschueller , I tried the following.
Then, under
I got the following:
I confirmed that Did I overlook something? BTW, I understand it is easier to call the binary Thank you. |
you might want to either set the environment variable LD_LIBRARY_PATH to the path of libprimac.so, or pass -DBUILD_SHARED_LIBS=OFF when configuring prima with cmake lets advise to build static libs from the README, that would be the easiest way |
The new code in README works. Great!
Thanks. |
This adds a simplified C interface to the Fortran library. This also introduces a CMake build system to build both the Fortran library and the C library.
|
I really appreciate your quick action. Thank you very much. 1 is fixed on my side. Have you pushed the changes for 2 and 3? I do not see changes in the behavior. |
Sorry, this is wrong. It is under |
yes, it should not get created anymore with the new README |
Merged! Thank you very much @jschueller ! Some links are broken in REAMDE. I will fix them. |
Hi @jschueller , I modified the README after the merge, particularly the In particular, are these correct, especially the location of compiled files? Lines 214 to 215 in 9e19a7d
Line 231 in 9e19a7d
Thanks. |
I believe so |
Thank you! @jschueller |
This adds a C interface to the Fortran library thanks to the iso_c_binding module:
prima.h:
Some fortran modules have to be renamed to allow building everything into one single fortran library.
This also introduces a CMake build system to build both the Fortran library and the C library in a cross-platform manner.
Comments welcome