Skip to content

Commit

Permalink
fix libxc min (psi4#3103)
Browse files Browse the repository at this point in the history
* Update codedeps.yaml

* Update CMakeLists.txt

* Update CMakeLists.txt

* fix assert()
  • Loading branch information
loriab authored Dec 19, 2023
1 parent 79ac936 commit 49ce400
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion codedeps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,8 @@ data:
commit: 6.2.2
#cmake:
# name: Libxc
# constraint: 6.0.0
# constraint: 6.1.0
# constraint_note: "v6.1.0 required for HYB_MGGA_XC_R2SCAN0, etc."
# target: Libxc::xc
components:
- C
Expand Down
2 changes: 1 addition & 1 deletion external/upstream/libxc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
find_package(Libxc 6.0.0 CONFIG QUIET COMPONENTS C)
find_package(Libxc 6.1.0 CONFIG QUIET COMPONENTS C)

if(${Libxc_FOUND})
get_property(_loc TARGET Libxc::xc PROPERTY LOCATION)
Expand Down
2 changes: 1 addition & 1 deletion psi4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ else()
message(STATUS "Disabled BrianQC ${BrianQC_DIR}")
endif()

find_package(Libxc 6.0.0 CONFIG REQUIRED COMPONENTS C)
find_package(Libxc 6.1.0 CONFIG REQUIRED COMPONENTS C)
get_property(_loc TARGET Libxc::xc PROPERTY LOCATION)
list(APPEND _addons ${_loc})
message(STATUS "${Cyan}Using Libxc${ColourReset}: ${_loc} (version ${Libxc_VERSION})")
Expand Down
8 changes: 4 additions & 4 deletions tests/pytests/test_erisieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ def test_schwarz_vs_density_quartets():

# compare iteration counts of runs with computed shell quartet array lengths
# iteration_+1 is used to account for computed_shells arrays including SAD guess results
assert(len(schwarz_computed_shells_expected) == schwarz_wfn.iteration_+1)
assert(len(density_computed_shells_expected) == density_wfn.iteration_+1)
assert len(schwarz_computed_shells_expected) == schwarz_wfn.iteration_+1
assert len(density_computed_shells_expected) == density_wfn.iteration_+1

# actually compare results with expected values
assert compare(schwarz_computed_shells_expected, schwarz_computed_shells, 'Schwarz Computed Shells Count, Cutoff 1.0e-12')
Expand Down Expand Up @@ -294,8 +294,8 @@ def test_rhf_vs_uhf_screening():

# compare iteration counts of runs with computed shell quartet array lengths
# iteration_+1 is used to account for computed_shells arrays including SAD guess results
assert(len(computed_shells_expected) == rhf_wfn.iteration_+1)
assert(len(computed_shells_expected) == uhf_wfn.iteration_+1)
assert len(computed_shells_expected) == rhf_wfn.iteration_+1
assert len(computed_shells_expected) == uhf_wfn.iteration_+1

# actually compare results with expected values
assert compare(computed_shells_expected, rhf_computed_shells, 'Schwarz Computed Shells Count, Cutoff 1.0e-12')
Expand Down
12 changes: 6 additions & 6 deletions tests/pytests/test_np_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,32 +73,32 @@ def build_copy_mat():

@uusing("memory_profiler")
def test_build_mat():
assert(check_leak(build_mat))
assert check_leak(build_mat)


@uusing("memory_profiler")
def test_build_view_mat():
assert(check_leak(build_view_mat))
assert check_leak(build_view_mat)


@uusing("memory_profiler")
def test_build_viewh_mat():
assert(check_leak(build_viewh_mat))
assert check_leak(build_viewh_mat)


@uusing("memory_profiler")
def test_build_view_set_mat():
assert(check_leak(build_view_set_mat))
assert check_leak(build_view_set_mat)


@uusing("memory_profiler")
def test_build_arr_mat():
assert(check_leak(build_arr_mat))
assert check_leak(build_arr_mat)


@uusing("memory_profiler")
def test_build_copy_mat():
assert(check_leak(build_copy_mat))
assert check_leak(build_copy_mat)


@uusing("memory_profiler")
Expand Down

0 comments on commit 49ce400

Please sign in to comment.