-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add real-space RMG converter to convert4qmc (#3351)
* started adding RMG to convert4qmc * replace raw pointer with std::unique_ptr for RMGParser in convert4qmc * clang-format * updated docs for RMG converter * change supertwist handling in RMG converter * added tests for RMG converter * removed larger rmg converter test * added spin-polarized RMG converter test * add override for two RMGParser functions * added RMG ctest (WIP) * cleaned up RMG tests * shortened rmg vmc test * added rmg-diamond reference vals * minor cleanup * minor cleanup of cmake for RMG Co-authored-by: Paul R. C. Kent <kentpr@ornl.gov>
- Loading branch information
1 parent
8876779
commit 2c533a4
Showing
30 changed files
with
14,446 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Locate rmg-cpu | ||
# Take RMG_BIN as hint for location | ||
|
||
find_program(RMG_CPU_EXE rmg-cpu HINTS ${RMG_BIN}) | ||
|
||
set(RMG_FOUND FALSE) | ||
if(RMG_CPU_EXE) | ||
MESSAGE(STATUS "RMG_CPU_EXE=${RMG_CPU_EXE}") | ||
set(RMG_FOUND TRUE) | ||
endif() | ||
|
||
mark_as_advanced(RMG_CPU_EXE RMG_FOUND) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# functions for RMG workflow test | ||
|
||
if(QMC_NO_SLOW_CUSTOM_TESTING_COMMANDS) | ||
function(ADD_RMG_TEST) | ||
|
||
endfunction() | ||
function(RUN_RMG_TEST) | ||
|
||
endfunction() | ||
else(QMC_NO_SLOW_CUSTOM_TESTING_COMMANDS) | ||
|
||
function( | ||
ADD_RMG_TEST | ||
TESTNAME | ||
NPROCS | ||
NTHREADS | ||
TEST_BINARY | ||
WORKDIR | ||
TEST_INPUT) | ||
#if(HAVE_MPI) | ||
# add_test(NAME ${TESTNAME} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${NPROCS} ${MPIEXEC_PREFLAGS} | ||
# ${TEST_BINARY} ${TEST_INPUT}) | ||
#else(HAVE_MPI) | ||
add_test(NAME ${TESTNAME} COMMAND ${TEST_BINARY} ${TEST_INPUT}) | ||
#endif(HAVE_MPI) | ||
set_tests_properties( | ||
${TESTNAME} | ||
PROPERTIES ENVIRONMENT | ||
"OMP_NUM_THREADS=${NTHREADS};RMG_NUM_THREADS=${NTHREADS}" | ||
PROCESSORS | ||
${NPROCS} | ||
PROCESSOR_AFFINITY | ||
TRUE | ||
WORKING_DIRECTORY | ||
${WORKDIR}) | ||
set_property( | ||
TEST ${TESTNAME} | ||
APPEND | ||
PROPERTY LABELS "converter;rmg") | ||
endfunction() | ||
|
||
function( | ||
ADD_RMG_CONVERT_TEST | ||
TESTNAME | ||
PREFIX | ||
WORKDIR | ||
TEST_INPUT) | ||
add_test(NAME ${TESTNAME} COMMAND $<TARGET_FILE:convert4qmc> -rmg ${TEST_INPUT} -prefix ${PREFIX}) | ||
set_tests_properties( | ||
${TESTNAME} | ||
PROPERTIES | ||
WORKING_DIRECTORY | ||
${WORKDIR}) | ||
set_property( | ||
TEST ${TESTNAME} | ||
APPEND | ||
PROPERTY LABELS "converter;rmg") | ||
endfunction() | ||
|
||
function( | ||
RUN_RMG_TEST | ||
BASE_NAME | ||
SRC_DIR | ||
NPROCS | ||
NTHREADS | ||
TEST_NAME) | ||
set(FULL_NAME ${BASE_NAME}-np-${NPROCS}) | ||
set(${TEST_NAME} | ||
${FULL_NAME} | ||
PARENT_SCOPE) | ||
set(MY_WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/${FULL_NAME}) | ||
message(VERBOSE "Adding test ${FULL_NAME}") | ||
copy_directory("${SRC_DIR}" "${MY_WORKDIR}") | ||
message("workdir: ${MY_WORKDIR}") | ||
add_rmg_test(${FULL_NAME}-scf ${NPROCS} ${NTHREADS} ${RMG_CPU_EXE} ${MY_WORKDIR} input) | ||
softlink_h5_rmg_waves(${FULL_NAME} ${BASE_NAME}) | ||
add_rmg_convert_test(${FULL_NAME}-rmg2qmc ${BASE_NAME} ${MY_WORKDIR} ${BASE_NAME}.h5) | ||
set_tests_properties(${FULL_NAME}-rmg2qmc PROPERTIES DEPENDS ${FULL_NAME}-scf) | ||
|
||
endfunction() | ||
|
||
endif(QMC_NO_SLOW_CUSTOM_TESTING_COMMANDS) | ||
|
||
function(SOFTLINK_H5_RMG_WAVES SOURCE PREFIX) | ||
# set(${TEST_NAME} | ||
# "LINK_${SOURCE}_h5_Waves" | ||
# PARENT_SCOPE) | ||
add_test(NAME LINK_${SOURCE}_h5_Waves COMMAND ${qmcpack_SOURCE_DIR}/tests/scripts/clean_and_link_h5.sh | ||
${SOURCE}/Waves/wave.out.h5 ${SOURCE}/${PREFIX}.h5) | ||
set_tests_properties(LINK_${SOURCE}_h5_Waves PROPERTIES DEPENDS ${SOURCE}-scf) | ||
set_property(TEST LINK_${SOURCE}_h5_Waves APPEND PROPERTY LABELS "rmg") | ||
endfunction() | ||
|
||
function(SOFTLINK_RMG_INPUT SOURCE TARGET PREFIX TEST_NAME) | ||
set(${TEST_NAME} | ||
"LINK_${SOURCE}_TO_${TARGET}" | ||
PARENT_SCOPE) | ||
add_test(NAME LINK_${SOURCE}_TO_${TARGET} COMMAND ${qmcpack_SOURCE_DIR}/tests/scripts/clean_and_link_h5.sh | ||
${SOURCE}/${PREFIX}.h5 ${SOURCE}-${TARGET}/${PREFIX}.h5) | ||
set_tests_properties(LINK_${SOURCE}_TO_${TARGET} PROPERTIES DEPENDS ${SOURCE}-scf) | ||
set_property(TEST LINK_${SOURCE}_TO_${TARGET} APPEND PROPERTY LABELS "rmg") | ||
add_test(NAME COPY_${SOURCE}_XML_TO_${TARGET} COMMAND | ||
bash -c "mkdir -p ${SOURCE}-${TARGET}; \ | ||
cp ${SOURCE}/${PREFIX}.structure.xml ${SOURCE}-${TARGET}/${PREFIX}.structure.xml ; \ | ||
cp ${SOURCE}/${PREFIX}.wfnoj.xml ${SOURCE}-${TARGET}/${PREFIX}.wfnoj.xml ; \ | ||
cp ${SOURCE}/*.qmcpp.xml ${SOURCE}-${TARGET}/") | ||
set_tests_properties(COPY_${SOURCE}_XML_TO_${TARGET} PROPERTIES DEPENDS ${SOURCE}-scf) | ||
set_property(TEST COPY_${SOURCE}_XML_TO_${TARGET} APPEND PROPERTY LABELS "rmg") | ||
endfunction() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.