From 62e5143ca14a340b707077ad075053e00ba00bae Mon Sep 17 00:00:00 2001 From: "k.ido" <13773226+k-ido@users.noreply.github.com> Date: Wed, 29 May 2024 14:02:38 +0900 Subject: [PATCH 1/7] support manually set STDFACE_DIR (originally from hphi) --- CMakeLists.txt | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3257d79d..f3a885a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,21 +113,30 @@ endif() # ref: https://cliutils.gitlab.io/modern-cmake/chapters/projects/submodule.html set(MVMC ON) # Option for upstream StdFace. find_package(Git QUIET) -set(STDFACE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/StdFace") -if(GIT_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") - # Update submodules as needed - if(GIT_SUBMODULE_UPDATE) - message(STATUS "Submodule update") - execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE GIT_SUBMOD_RESULT) - if(NOT GIT_SUBMOD_RESULT EQUAL "0") - message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules") + +if(NOT STDFACE_DIR) + set(STDFACE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/StdFace") + if(GIT_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") + # Update submodules as needed + if(GIT_SUBMODULE_UPDATE) + message(STATUS "Submodule update") + execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + RESULT_VARIABLE GIT_SUBMOD_RESULT) + if(NOT GIT_SUBMOD_RESULT EQUAL "0") + message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules") + endif() endif() - endif() + if(NOT EXISTS "${STDFACE_DIR}/CMakeLists.txt") + message(FATAL_ERROR "The submodule StdFace were not downloaded! GIT_SUBMODULE_UPDATE was turned off or failed. Please update submodules and try again.") + endif() + endif() +else() if(NOT EXISTS "${STDFACE_DIR}/CMakeLists.txt") - message(FATAL_ERROR "The submodule StdFace were not downloaded! GIT_SUBMODULE_UPDATE was turned off or failed. Please update submodules and try again.") + message(FATAL_ERROR "STDFACE_DIR is manually set to ${STDFACE_DIR}, but ${STDFACE_DIR}/CMakeLists.txt does not exists") + else() + message(STATUS "STDFACE_DIR is manually set to ${STDFACE_DIR}.") endif() endif() add_subdirectory("${STDFACE_DIR}") From 3d9c2057d066465f6d6b322de7fcae7b0dcf9aa0 Mon Sep 17 00:00:00 2001 From: "k.ido" <13773226+k-ido@users.noreply.github.com> Date: Wed, 29 May 2024 16:58:08 +0900 Subject: [PATCH 2/7] update StdFace --- src/StdFace | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StdFace b/src/StdFace index 92967761..2fe757b1 160000 --- a/src/StdFace +++ b/src/StdFace @@ -1 +1 @@ -Subproject commit 92967761b56e6ddf69b1039102dbf0d09256242c +Subproject commit 2fe757b104835c1747e43d69c7ac749bb38739ed From 39f0971cb5cd8e61867203253c12230833268c72 Mon Sep 17 00:00:00 2001 From: "k.ido" <13773226+k-ido@users.noreply.github.com> Date: Wed, 29 May 2024 17:06:54 +0900 Subject: [PATCH 3/7] #42 mod tests for fixed orbitals in fsz mode generated by stdface --- test/python/data/HeisenbergChain_fsz/StdFace.def | 4 ++-- test/python/data/HeisenbergChain_fsz_mpi/StdFace.def | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/python/data/HeisenbergChain_fsz/StdFace.def b/test/python/data/HeisenbergChain_fsz/StdFace.def index 897029a4..ff41d3f1 100644 --- a/test/python/data/HeisenbergChain_fsz/StdFace.def +++ b/test/python/data/HeisenbergChain_fsz/StdFace.def @@ -5,8 +5,8 @@ lattice = "chain" J = 1.0 h = -0.5 Gamma = 0.6 -NSROptItrStep = 1000 -NVMCSample = 500 +NSROptItrStep = 5000 +NVMCSample = 200 DSROptRedCut = 1e-8 DSROptStaDel = 1e-2 DSROptStepDt = 3e-3 diff --git a/test/python/data/HeisenbergChain_fsz_mpi/StdFace.def b/test/python/data/HeisenbergChain_fsz_mpi/StdFace.def index 897029a4..ff41d3f1 100644 --- a/test/python/data/HeisenbergChain_fsz_mpi/StdFace.def +++ b/test/python/data/HeisenbergChain_fsz_mpi/StdFace.def @@ -5,8 +5,8 @@ lattice = "chain" J = 1.0 h = -0.5 Gamma = 0.6 -NSROptItrStep = 1000 -NVMCSample = 500 +NSROptItrStep = 5000 +NVMCSample = 200 DSROptRedCut = 1e-8 DSROptStaDel = 1e-2 DSROptStepDt = 3e-3 From b529f2c9bb2c55f6618ea9ad25790041b3246b90 Mon Sep 17 00:00:00 2001 From: "k.ido" <13773226+k-ido@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:30:35 +0900 Subject: [PATCH 4/7] modify cmake files to recommended patch in PR38 of StdFace --- CMakeLists.txt | 2 +- src/mVMC/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f3a885a3..d6d57f92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,7 @@ endif() # git submodule update # ref: https://cliutils.gitlab.io/modern-cmake/chapters/projects/submodule.html -set(MVMC ON) # Option for upstream StdFace. +option(MVMC "build mvmc" ON) # Option for upstream StdFace. find_package(Git QUIET) if(NOT STDFACE_DIR) diff --git a/src/mVMC/CMakeLists.txt b/src/mVMC/CMakeLists.txt index 44ae92cf..0c72b24d 100644 --- a/src/mVMC/CMakeLists.txt +++ b/src/mVMC/CMakeLists.txt @@ -23,9 +23,9 @@ set(SOURCES_sfmt link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../pfapack) add_executable(vmcdry.out vmcdry.c) -target_link_libraries(vmcdry.out StdFace m) +target_link_libraries(vmcdry.out StdFace_mvmc m) add_executable(vmc.out ${SOURCES_vmcmain} ${SOURCES_sfmt}) -target_link_libraries(vmc.out StdFace) +target_link_libraries(vmc.out StdFace_mvmc m) target_link_libraries(vmc.out pfapack) target_link_libraries(vmc.out ltl2inv) if(PFAFFIAN_BLOCKED) From 28e78bbceed62ff060fc50d6b9cc5d5d7724ed46 Mon Sep 17 00:00:00 2001 From: "k.ido" <13773226+k-ido@users.noreply.github.com> Date: Wed, 7 Aug 2024 08:33:46 +0900 Subject: [PATCH 5/7] update StdFace submodule: v1.0 --- src/StdFace | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StdFace b/src/StdFace index 2fe757b1..ab32f48a 160000 --- a/src/StdFace +++ b/src/StdFace @@ -1 +1 @@ -Subproject commit 2fe757b104835c1747e43d69c7ac749bb38739ed +Subproject commit ab32f48ab5e9aaf316d4167e0f555738b663da1f From 0f68a4bccf31688072b29de63363d679c4ff4462 Mon Sep 17 00:00:00 2001 From: "k.ido" <13773226+k-ido@users.noreply.github.com> Date: Thu, 15 Aug 2024 10:09:11 +0900 Subject: [PATCH 6/7] update StdFace submodule: v1.0.1 --- CMakeLists.txt | 1 + src/StdFace | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6d57f92..383d0210 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,6 +112,7 @@ endif() # git submodule update # ref: https://cliutils.gitlab.io/modern-cmake/chapters/projects/submodule.html option(MVMC "build mvmc" ON) # Option for upstream StdFace. +option(TestStdFace "run test for StdFace" OFF) find_package(Git QUIET) if(NOT STDFACE_DIR) diff --git a/src/StdFace b/src/StdFace index ab32f48a..6fa4ef1f 160000 --- a/src/StdFace +++ b/src/StdFace @@ -1 +1 @@ -Subproject commit ab32f48ab5e9aaf316d4167e0f555738b663da1f +Subproject commit 6fa4ef1f6809001a24b6501bd08f988bdc8cb7c4 From cb049b3b5a460a3cd513a2539dcc21fccc3ace4a Mon Sep 17 00:00:00 2001 From: "k.ido" <13773226+k-ido@users.noreply.github.com> Date: Thu, 15 Aug 2024 10:15:24 +0900 Subject: [PATCH 7/7] mod vmcdry.c --- src/mVMC/vmcdry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mVMC/vmcdry.c b/src/mVMC/vmcdry.c index 9e01c538..b3200426 100644 --- a/src/mVMC/vmcdry.c +++ b/src/mVMC/vmcdry.c @@ -29,7 +29,7 @@ void StdFace_main(char *fname); int main(int argc, char *argv[]) { if (argc == 1){ - printf("Usage: %s StdFace.def\n"); + printf("Usage: %s StdFace.def\n", argv[0]); return 1; }