Skip to content

Add guide for using GauXC from C and Fortran#23

Open
awvwgk wants to merge 10 commits intomicrosoft:mainfrom
awvwgk:gauxc-docs
Open

Add guide for using GauXC from C and Fortran#23
awvwgk wants to merge 10 commits intomicrosoft:mainfrom
awvwgk:gauxc-docs

Conversation

@awvwgk
Copy link
Member

@awvwgk awvwgk commented Jan 26, 2026

@awvwgk awvwgk force-pushed the gauxc-docs branch 2 times, most recently from 601b733 to 0d9fda0 Compare January 26, 2026 13:33
@awvwgk awvwgk added the documentation Improvements or additions to documentation label Jan 26, 2026
@awvwgk awvwgk self-assigned this Jan 26, 2026
@awvwgk awvwgk force-pushed the gauxc-docs branch 2 times, most recently from 29716cd to 6a7fa80 Compare January 27, 2026 10:57
@awvwgk awvwgk changed the title [WIP] standalone C driver Add guide for using GauXC from C Jan 27, 2026
@awvwgk awvwgk force-pushed the gauxc-docs branch 2 times, most recently from 1e71806 to b8a9725 Compare January 27, 2026 12:29
@kjh-giesbertz
Copy link
Contributor

Some questions on the GauXC in C instructions

  • It feels weird to start adding MPI guards when we ask in the cmake config to set MPI off. Perhaps one could move that to the end in a subsection specifying what changes are needed for MPI?
  • I needed to comment the last 3 lines of cmake/skala-gauxc.cmake out to make the generation of build-files work, so the fix if the gau2grid::gg is not found
  • Why is the Default on the enum GauXC_AtomicGridSizeDefault?

@awvwgk awvwgk changed the title Add guide for using GauXC from C Add guide for using GauXC from C and Fortran Jan 30, 2026
@awvwgk awvwgk force-pushed the gauxc-docs branch 3 times, most recently from 7909698 to e38b615 Compare January 30, 2026 13:51
@awvwgk
Copy link
Member Author

awvwgk commented Feb 2, 2026

  • I needed to comment the last 3 lines of cmake/skala-gauxc.cmake out to make the generation of build-files work, so the fix if the gau2grid::gg is not found

Good point, now this all handled in GauXC since wavefunction91/GauXC#169 was merged.

@awvwgk
Copy link
Member Author

awvwgk commented Feb 2, 2026

  • It feels weird to start adding MPI guards when we ask in the cmake config to set MPI off. Perhaps one could move that to the end in a subsection specifying what changes are needed for MPI?

Since GauXC has MPI support I would like to highlight it as well. Also, it does impact the API for the runtime environment so it is something that can't be easily ignored. We are testing all examples with and without MPI to make sure they actually work correctly.

@awvwgk
Copy link
Member Author

awvwgk commented Feb 2, 2026

  • Why is the Default on the enum GauXC_AtomicGridSizeDefault?

I follow the naming used in GauXC: include/gauxc/enums.hpp#L28-L39

! Integrate exchange-correlation energy
vxc_s = gauxc_matrix_empty(status)
vxc_z = gauxc_matrix_empty(status)
call gauxc_eval_exc_vxc(status, integrator, p_s, p_z, model, exc, vxc_s, vxc_z)
Copy link
Contributor

@kjh-giesbertz kjh-giesbertz Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my compiler complains it cannot find a matching argument pattern. Removing model fixed the problem in my case.

Suggested change
call gauxc_eval_exc_vxc(status, integrator, p_s, p_z, model, exc, vxc_s, vxc_z)
call gauxc_eval_exc_vxc(status, integrator, p_s, p_z, exc, vxc_s, vxc_z)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Model should be passed here to dispatch to Skala interface, if you can't find a missing interface you might not have Skala enabled in GauXC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants