-
Notifications
You must be signed in to change notification settings - Fork 22
Fix text backend for determinants + check consistency of determinants #168
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
|
Thanks @scemama ! Fortran tests fail in the CI: |
|
And one general concern: the new determinant check requires that number of up and down electrons to be present in the file. If they are missing - the new error code can be added to TREXIO and returned from |
|
@NastaMauger what you did was right. In this PR @scemama introduced an additional correctness check for the CI determinants (see this line). This correctness check requires that the number of up and down electrons are written in the TREXIO file before you start writing the determinants (otherwise this check cannot be performed). What you implemented in |
Now the function returns |
I don't understand what is wrong. I can't reproduce the problem on my computer, and valgrind doesn't detect anything. |
|
@scemama it must be some non-standard Fortran stuff or the way you iterate when printing. Can you please
|
|
@scemama I confirm that following approach 2 from above (clean repo run) and gfortran-11, I can reproduce this error in the Fortran test on your branch on Ubuntu. The It fails right after the call to |
|
@scemama I found a bug in the C code (unclosed comment) but the Fortran test bug is still there. It must be a memory leak somewhere. |
I suspect that there is a bug in how gfortran11 handles strings internally with I removed the |
|
OK, now this modification broke the python test because the determinant data in the test is dummy, and now we are checking that the numbers of up and dn electrons in the determinants are OK. This means that the modification works well! But we need to change the python tests :-( |
We have always used
Good news then! Can you translate the commands from |
You are right. Address-sanitizer helped me find it. I fixed it, and it now works with
I won't have time in the two coming weeks. |
|
Thanks a lot @scemama ! Looks like we are converging to the complete PySCF-TREXIO integration! 😊 |
|
@scemama I fixed the Python tests. Merging this PR as completed now. |
Great! Thanks! |
nupandndn, and it also checks that the MO indices are in the correct range[0:mo_num[