-
Notifications
You must be signed in to change notification settings - Fork 13
C interface for progress functions #262
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
Conversation
@@ -88,6 +102,13 @@ if(PROGRESS_GRAPHLIB) | |||
progress_test(prg_build_zmatGP) | |||
endif() | |||
|
|||
# c test modules | |||
progress_test(prg_density_c) |
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.
All the c test names end with "_c" in order to avoid conflicts with Fortran test names.
Now all the CI checks passed! |
examples/c_interface/scf.c
Outdated
@@ -0,0 +1,43 @@ | |||
#include <stdlib.h> |
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.
what is this code supposed to do? Is 'scf' a good name for it? Please add comments
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.
I still do not understand what this file is about. Maybe it should not be added yet?
src/prg_c_interface.F90
Outdated
|
||
end subroutine prg_build_density_T0_c | ||
|
||
subroutine prg_build_density_T_c(norbs, ham_bml_c, rho_bml_c, threshold, bndfil, kbt, ef, eigenvalues_out) bind(C, name="prg_build_density_T") |
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.
could you split these long lines?
69fa4c5
to
7bee93f
Compare
Changes: 1) Removed scf.c and other commented lines; 2) Added sp2 tests. |
hmm, two CI tests fail on sp2, will work on the fix. |
scripts/transform.py
Outdated
def get_public(fortran_code): | ||
|
||
# Define the regex pattern to match lines starting with 'public ::' | ||
pattern = re.compile(r'public ::(.*)') |
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.
pattern = re.compile(r'public ::(.*)') | |
pattern = re.compile(r'public *::(.*)') |
The standard does not require exactly one whitespace after the public keyword.
7bee93f
to
429c18a
Compare
C test for density matrix module and sp2 methods C interface for prg_chebyshev_mod module C interface for prg_charges_mod Python script to generate c wrappers and headers
429c18a
to
1ca6a20
Compare
Now this PR can be merged. Thanks. |
C test for density matrix module (passed!)
Python script to generate c wrappers and headers
Add c interface for prg_chebyshev_mod module (Tests TBA)
Add c interface for prg_charges_mod (Tests TBA)
PS:
This change is