├── src
├── Utilities
│ ├── catch_main.cpp
│ ├── tinyxml
│ │ └── .clang-format
│ ├── Constants.h
│ ├── CMakeLists.txt
│ ├── qmcpack_version.h
│ ├── tests
│ │ ├── test_PrimeNumberSet.cpp
│ │ ├── CMakeLists.txt
│ │ └── test_ParallelBlock.cpp
│ ├── XMLWriter.h
│ ├── XMLWriter.cpp
│ ├── SIMD
│ │ ├── allocator_traits.hpp
│ │ ├── allocator.hpp
│ │ ├── Mallocator.hpp
│ │ └── algorithm.hpp
│ ├── Communicate.h
│ ├── InfoStream.cpp
│ ├── scalar_traits.h
│ ├── QMCTypes.h
│ ├── Communicate.cpp
│ ├── OutputManager.cpp
│ ├── qmcpack_version.cpp
│ ├── Clock.h
│ ├── InfoStream.h
│ ├── RandomGenerator.h
│ ├── OutputManager.h
│ ├── SpeciesSet.cpp
│ ├── ParallelBlock.hpp
│ ├── StdRandom.h
│ └── SpeciesSet.h
├── Input
│ └── Input.hpp
├── Drivers
│ ├── CMakeLists.txt
│ ├── tests
│ │ ├── CMakeLists.txt
│ │ └── test_MiniQMCOptions.cpp
│ ├── MiniQMCOptions.h
│ └── Mover.hpp
├── QMCWaveFunctions
│ ├── CMakeLists.txt
│ ├── tests
│ │ ├── CMakeLists.txt
│ │ └── test_dirac_matrix.cpp
│ ├── SPOSet_builder.h
│ ├── DeterminantHelper.h
│ ├── SPOSet_builder.cpp
│ └── DiracMatrix.h
├── Particle
│ ├── tests
│ │ ├── CMakeLists.txt
│ │ └── test_particle.cpp
│ ├── ParticleSet_builder.hpp
│ ├── ParticleSet_builder.cpp
│ ├── ParticleAttrib.h
│ ├── DistanceTable.h
│ ├── ParticleSet.BC.cpp
│ ├── VirtualParticleSet.cpp
│ ├── Lattice
│ │ └── LatticeOperations.h
│ ├── VirtualParticleSet.h
│ ├── DistanceTableAB.cpp
│ ├── DistanceTableAA.cpp
│ ├── FastParticleOperators.h
│ ├── DistanceTableBA.h
│ ├── DistanceTableAA.h
│ └── ParticleIOUtility.h
├── Numerics
│ ├── Containers.h
│ ├── readme_soa.md
│ ├── BlasThreadingEnv.h
│ ├── Einspline
│ │ ├── bspline.h
│ │ ├── bspline_structs.h
│ │ ├── multi_bspline_structs.h
│ │ └── bspline_base.h
│ ├── OhmmsPETE
│ │ ├── OhmmsMatrixOperators.h
│ │ ├── OhmmsVectorOperators.h
│ │ └── PosTransformer.h
│ ├── Spline2
│ │ ├── bspline_traits.hpp
│ │ └── MultiBsplineEvalHelper.hpp
│ ├── OptimizableFunctorBase.h
│ ├── PETE
│ │ ├── PETE.h
│ │ └── Scalar.h
│ └── .clang-format
├── config.h.cmake.in
└── .clang-format
├── external_codes
└── catch
│ ├── Readme
│ ├── log_complex_approx.hpp
│ └── complex_approx.hpp
├── configure
├── README.md
├── CMake
├── unit_test.cmake
├── PGICompilers.cmake
├── python.cmake
├── IBMCompilers.cmake
├── IntelCompilers.cmake
├── GNUCompilers.cmake
├── FindMKL.cmake
├── ClangCompilers.cmake
├── compareGCOV.cmake
└── ctest_script.cmake
├── miniqmc.settings
├── LICENSE
└── testing
├── nightly_scripts
└── nightly_anl_bora.sh
└── miniqmc_openshift_rhea.sh
/src/Utilities/catch_main.cpp:
--------------------------------------------------------------------------------
1 | #define CATCH_CONFIG_MAIN
2 |
3 | #include "catch.hpp"
4 |
--------------------------------------------------------------------------------
/src/Utilities/tinyxml/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | Language: Cpp
3 | DisableFormat: true
4 | ...
5 |
6 |
--------------------------------------------------------------------------------
/external_codes/catch/Readme:
--------------------------------------------------------------------------------
1 | C++ Unit test framework
2 |
3 | https://github.com/catchorg/Catch2
4 |
5 | The single include file is downloaded from here:
6 | https://github.com/catchorg/Catch2/releases/download/v2.4.2/catch.hpp
7 |
8 | The default value of m_scale in Approx was changed from 0.0 to 1.0 to match the
9 | original Catch behavior, and to avoid adding .scale(1.0) all over the code.
10 |
11 |
--------------------------------------------------------------------------------
/configure:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | echo
3 | echo ' You are not running autoconf/automake tools!'
4 | echo ' To build qmcpack, cmake, lapack/blas, hdf5 and boost are required.'
5 | echo ' Check http://www.qmcpack.org'
6 | echo
7 |
8 | tcmake=`which cmake`
9 | if test $tcmake; then
10 | echo ' cd build; cmake ..; make'
11 | cd build; cmake ..; make
12 | else
13 | echo
14 | echo ' cmake is not found. Get cmake at http://www.cmake.org/'
15 | fi
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # miniQMC - QMCPACK Miniapp
2 |
3 | **This is the CPU only version of miniQMC. OpenMP offload version is in the [OMP_offload](https://github.com/QMCPACK/miniqmc/tree/OMP_offload) branch.**
4 |
5 | # Documentation and support
6 | 1. Out-of-source documentation at https://github.com/QMCPACK/miniqmc/wiki
7 | 2. In-source doxygen documentation can be created via 'doxygen Doxyfile'. The
8 | HTML pages will be in the html/ directory with the top level file in
9 | 'html/index.html'.
10 | 3. Any issue or discussion, please use github issue.
11 |
--------------------------------------------------------------------------------
/CMake/unit_test.cmake:
--------------------------------------------------------------------------------
1 | # Runs unit tests
2 | FUNCTION( ADD_UNIT_TEST TESTNAME TEST_BINARY )
3 | MESSAGE("Adding test ${TESTNAME}")
4 | IF ( USE_MPI )
5 | ADD_TEST(NAME ${TESTNAME} COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 1 ${TEST_BINARY})
6 | #SET_TESTS_PROPERTIES( ${TESTNAME} PROPERTIES ENVIRONMENT OMP_NUM_THREADS=1 )
7 | ELSE()
8 | ADD_TEST(NAME ${TESTNAME} COMMAND ${TEST_BINARY})
9 | #SET_TESTS_PROPERTIES( ${TESTNAME} PROPERTIES ENVIRONMENT OMP_NUM_THREADS=1 )
10 | ENDIF()
11 | SET_PROPERTY(TEST ${TESTNAME} APPEND PROPERTY LABELS "unit")
12 | ENDFUNCTION()
13 |
--------------------------------------------------------------------------------
/src/Utilities/Constants.h:
--------------------------------------------------------------------------------
1 | // This file is distributed under the University of Illinois/NCSA Open Source
2 | // License. See LICENSE file in top directory for details.
3 | //
4 | // Copyright (c) 2019 QMCPACK developers.
5 | //
6 | // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
7 | //
8 | // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
9 | //////////////////////////////////////////////////////////////////////////////////////
10 |
11 | #ifndef CONSTANTS_H
12 | #define CONSTANTS_H
13 |
14 | #ifndef M_PI
15 | #define M_PI 3.14159265358979323846
16 | #endif
17 |
18 | #ifndef TWOPI
19 | #define TWOPI (2 * M_PI)
20 | #endif /* TWOPI */
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/Utilities/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #//////////////////////////////////////////////////////////////////////////////////////
2 | #// This file is distributed under the University of Illinois/NCSA Open Source License.
3 | #// See LICENSE file in top directory for details.
4 | #//
5 | #// Copyright (c) 2020 QMCPACK developers.
6 | #//
7 | #// File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | #//
9 | #// File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 | #//////////////////////////////////////////////////////////////////////////////////////
11 |
12 | ADD_LIBRARY(catch_main catch_main.cpp)
13 | TARGET_INCLUDE_DIRECTORIES(catch_main PUBLIC "${PROJECT_SOURCE_DIR}/external_codes/catch")
14 |
15 | SUBDIRS(tests)
16 |
--------------------------------------------------------------------------------
/src/Utilities/qmcpack_version.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2017 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
9 | //
10 | // File created by:
11 | // Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
12 | ////////////////////////////////////////////////////////////////////////////////
13 |
14 | #ifndef QMCPACK_VERSION_INCLUDE
15 | #define QMCPACK_VERSION_INCLUDE
16 |
17 | void print_version(bool verbose);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/Input/Input.hpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Ye Luo, yeluo@anl.gov, Argonne National Laboratory
9 | //
10 | // File created by:
11 | // Ye Luo, yeluo@anl.gov, Argonne National Laboratory
12 | ////////////////////////////////////////////////////////////////////////////////
13 |
14 | #ifndef QMCPLUSPLUS_SIMULATION_HPP
15 | #define QMCPLUSPLUS_SIMULATION_HPP
16 |
17 | #include
18 | //#include
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/src/Drivers/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #//////////////////////////////////////////////////////////////////////////////////////
2 | #// This file is distributed under the University of Illinois/NCSA Open Source License.
3 | #// See LICENSE file in top directory for details.
4 | #//
5 | #// Copyright (c) 2019 QMCPACK developers.
6 | #//
7 | #// File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | #//
9 | #// File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 | #//////////////////////////////////////////////////////////////////////////////////////
11 |
12 | SET(DRIVERS check_spo check_wfc miniqmc miniqmc_sync_move)
13 |
14 | FOREACH(p ${DRIVERS})
15 | ADD_EXECUTABLE( ${p} ${p}.cpp)
16 | TARGET_LINK_LIBRARIES(${p} qmcwfs qmcbase qmcutil ${QMC_UTIL_LIBS})
17 | ENDFOREACH(p ${ESTEST})
18 |
19 | SUBDIRS(tests)
20 |
21 |
--------------------------------------------------------------------------------
/src/Utilities/tests/test_PrimeNumberSet.cpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2019 QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
9 | //
10 | // File created by:
11 | // Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
12 | ////////////////////////////////////////////////////////////////////////////////
13 |
14 | #include "catch.hpp"
15 | #include "Utilities/PrimeNumberSet.h"
16 |
17 | TEST_CASE("PrimeNumberSet Basic", "[Utilities]") {
18 | PrimeNumberSet myPrimes;
19 | REQUIRE(myPrimes[0] == 3);
20 | REQUIRE(myPrimes[1] == 5);
21 | REQUIRE(myPrimes[7] == 23);
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/src/QMCWaveFunctions/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #//////////////////////////////////////////////////////////////////////////////////////
2 | #// This file is distributed under the University of Illinois/NCSA Open Source License.
3 | #// See LICENSE file in top directory for details.
4 | #//
5 | #// Copyright (c) 2019 QMCPACK developers.
6 | #//
7 | #// File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | #//
9 | #// File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 | #//////////////////////////////////////////////////////////////////////////////////////
11 |
12 | ADD_LIBRARY(qmcwfs
13 | ../QMCWaveFunctions/WaveFunction.cpp ../QMCWaveFunctions/SPOSet_builder.cpp
14 | ../QMCWaveFunctions/DiracDeterminant.cpp ../QMCWaveFunctions/DiracDeterminantRef.cpp)
15 |
16 | TARGET_LINK_LIBRARIES(qmcwfs PRIVATE Math::BLAS_LAPACK)
17 |
18 | SUBDIRS(tests)
19 |
--------------------------------------------------------------------------------
/src/Particle/tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #//////////////////////////////////////////////////////////////////////////////////////
2 | #// This file is distributed under the University of Illinois/NCSA Open Source License.
3 | #// See LICENSE file in top directory for details.
4 | #//
5 | #// Copyright (c) 2020 QMCPACK developers.
6 | #//
7 | #// File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | #//
9 | #// File created by: Mark Dewing, markdewing@gmail.com, University of Illinois at Urbana-Champaign
10 | #//////////////////////////////////////////////////////////////////////////////////////
11 |
12 | SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QMCPACK_UNIT_TEST_DIR})
13 |
14 | SET(SRC_DIR particle)
15 | SET(UTEST_EXE test_${SRC_DIR})
16 | SET(UTEST_NAME unit_test_${SRC_DIR})
17 |
18 |
19 | ADD_EXECUTABLE(${UTEST_EXE} test_particle.cpp)
20 | TARGET_LINK_LIBRARIES(${UTEST_EXE} catch_main qmcbase qmcutil ${QMC_UTIL_LIBS})
21 |
22 | ADD_UNIT_TEST(${UTEST_NAME} "${QMCPACK_UNIT_TEST_DIR}/${UTEST_EXE}")
23 |
--------------------------------------------------------------------------------
/src/Numerics/Containers.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | //
9 | // File created by:
10 | // Jeongnim Kim, jeongnim.kim@intel.com,
11 | // Intel Corp.
12 | ////////////////////////////////////////////////////////////////////////////////
13 | // -*- C++ -*-
14 | /** @file Containers.h
15 | *
16 | * Master header to support SoA containers
17 | */
18 | #ifndef QMCPLUSPLUS_SOA_CONTAINER_H
19 | #define QMCPLUSPLUS_SOA_CONTAINER_H
20 |
21 | #include
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | #include
28 | #endif
29 |
--------------------------------------------------------------------------------
/src/QMCWaveFunctions/tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #//////////////////////////////////////////////////////////////////////////////////////
2 | #// This file is distributed under the University of Illinois/NCSA Open Source License.
3 | #// See LICENSE file in top directory for details.
4 | #//
5 | #// Copyright (c) 2020 QMCPACK developers.
6 | #//
7 | #// File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | #//
9 | #// File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 | #//////////////////////////////////////////////////////////////////////////////////////
11 |
12 | SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QMCPACK_UNIT_TEST_DIR})
13 |
14 | SET(SRC_DIR wavefunction)
15 | SET(UTEST_EXE test_${SRC_DIR})
16 | SET(UTEST_NAME unit_test_${SRC_DIR})
17 |
18 | ADD_EXECUTABLE(${UTEST_EXE} test_dirac_det.cpp test_dirac_matrix.cpp)
19 | TARGET_LINK_LIBRARIES(${UTEST_EXE} catch_main qmcwfs qmcbase qmcutil ${QMC_UTIL_LIBS})
20 |
21 | ADD_UNIT_TEST(${UTEST_NAME} "${QMCPACK_UNIT_TEST_DIR}/${UTEST_EXE}")
22 |
--------------------------------------------------------------------------------
/src/Utilities/tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #//////////////////////////////////////////////////////////////////////////////////////
2 | #// This file is distributed under the University of Illinois/NCSA Open Source License.
3 | #// See LICENSE file in top directory for details.
4 | #//
5 | #// Copyright (c) 2020 QMCPACK developers.
6 | #//
7 | #// File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | #//
9 | #// File created by: Mark Dewing, markdewing@gmail.com, University of Illinois at Urbana-Champaign
10 | #//////////////////////////////////////////////////////////////////////////////////////
11 |
12 | SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QMCPACK_UNIT_TEST_DIR})
13 |
14 | SET(SRC_DIR utilities)
15 | SET(UTEST_EXE test_${SRC_DIR})
16 | SET(UTEST_NAME unit_test_${SRC_DIR})
17 |
18 | ADD_EXECUTABLE(${UTEST_EXE} test_PrimeNumberSet.cpp test_ParallelBlock.cpp)
19 | TARGET_LINK_LIBRARIES(${UTEST_EXE} catch_main qmcutil ${QMC_UTIL_LIBS})
20 |
21 | ADD_UNIT_TEST(${UTEST_NAME} "${QMCPACK_UNIT_TEST_DIR}/${UTEST_EXE}")
22 |
--------------------------------------------------------------------------------
/CMake/PGICompilers.cmake:
--------------------------------------------------------------------------------
1 | # Enable OpenMP
2 | # If just -mp is specified, OMP_NUM_THREADS must be set in order to run in parallel
3 | # Specifying 'allcores' will run on all cores if OMP_NUM_THREADS is not set (which seems
4 | # to be the default for other OpenMP implementations)
5 | IF(QMC_OMP)
6 | SET(ENABLE_OPENMP 1)
7 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mp=allcores")
8 | ENDIF(QMC_OMP)
9 |
10 | ADD_DEFINITIONS( -Drestrict=__restrict__ )
11 |
12 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__forceinline=inline")
13 |
14 | # Set extra optimization specific flags
15 | SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fast" )
16 | SET( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fast" )
17 |
18 |
19 | # Setting this to 'OFF' adds the -A flag, which enforces strict standard compliance
20 | # and causes the compilation to fail with some GNU header files
21 | SET(CMAKE_CXX_EXTENSIONS ON)
22 |
23 | # Add static flags if necessary
24 | IF(QMC_BUILD_STATIC)
25 | SET(CMAKE_CXX_LINK_FLAGS " -Bstatic")
26 | ENDIF(QMC_BUILD_STATIC)
27 |
--------------------------------------------------------------------------------
/src/Utilities/XMLWriter.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2018 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Mark Dewing, mdewing@anl.gov,
9 | // Argonne National Laboratory
10 | //
11 | // File created by:
12 | // Mark Dewing, mdewing@anl.gov,
13 | // Argonne National Laboratory
14 | ////////////////////////////////////////////////////////////////////////////////
15 |
16 | /** @file XMLWriter.h
17 | */
18 |
19 | #ifndef QMCPLUSPLUS_XML_WRITER_H
20 | #define QMCPLUSPLUS_XML_WRITER_H
21 |
22 | #include
23 | #include
24 |
25 | namespace qmcplusplus
26 | {
27 | using tinyxml2::XMLNode;
28 | using tinyxml2::XMLDocument;
29 | using tinyxml2::XMLElement;
30 | using tinyxml2::XMLText;
31 |
32 |
33 | XMLNode* MakeTextElement(XMLDocument& doc, const std::string& name, const std::string& value);
34 |
35 | } // namespace qmcplusplus
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/src/Utilities/XMLWriter.cpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2018 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Mark Dewing, mdewing@anl.gov,
9 | // Argonne National Laboratory
10 | //
11 | // File created by:
12 | // Mark Dewing, mdewing@anl.gov,
13 | // Argonne National Laboratory
14 | ////////////////////////////////////////////////////////////////////////////////
15 |
16 | /** @file XMLWriter.cpp
17 | * @brief Helper functions for tiny xml2
18 | */
19 | #include "Utilities/XMLWriter.h"
20 |
21 | namespace qmcplusplus
22 | {
23 | XMLNode* MakeTextElement(XMLDocument& doc, const std::string& name, const std::string& value)
24 | {
25 | XMLNode* name_node = doc.NewElement(name.c_str());
26 | XMLText* value_node = doc.NewText("");
27 | value_node->SetValue(value.c_str());
28 | name_node->InsertEndChild(value_node);
29 | return name_node;
30 | }
31 | } // namespace qmcplusplus
32 |
--------------------------------------------------------------------------------
/src/Particle/ParticleSet_builder.hpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Ye Luo, yeluo@anl.gov, Argonne National Laboratory
9 | //
10 | // File created by:
11 | // Ye Luo, yeluo@anl.gov, Argonne National Laboratory
12 | ////////////////////////////////////////////////////////////////////////////////
13 |
14 | #ifndef QMCPLUSPLUS_PARTICLESET_BUILDER_HPP
15 | #define QMCPLUSPLUS_PARTICLESET_BUILDER_HPP
16 |
17 | #include
18 | #include
19 |
20 | namespace qmcplusplus
21 | {
22 | /// build the ParticleSet of ions
23 | int build_ions(ParticleSet& ions, const Tensor& tmat, Tensor& lattice);
24 |
25 | /// build the ParticleSet of electrons
26 | int build_els(ParticleSet& els, const ParticleSet& ions, RandomGenerator& rng);
27 | } // namespace qmcplusplus
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/src/Utilities/SIMD/allocator_traits.hpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2019 QMCPACK developers.
6 | //
7 | // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | //
9 | // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 | //////////////////////////////////////////////////////////////////////////////////////
11 |
12 |
13 | #ifndef QMCPLUSPLUS_ACCESS_TRAITS_H
14 | #define QMCPLUSPLUS_ACCESS_TRAITS_H
15 |
16 | namespace qmcplusplus
17 | {
18 | /** template class defines whether the memory allocated by the allocator is host accessible
19 | */
20 | template
21 | struct allocator_traits
22 | {
23 | const static bool is_host_accessible = true;
24 | };
25 |
26 | template
27 | using IsHostSafe = typename std::enable_if::is_host_accessible>::type;
28 |
29 | template
30 | using IsNotHostSafe = typename std::enable_if::is_host_accessible>::type;
31 |
32 | } // namespace qmcplusplus
33 |
34 | #endif // QMCPLUSPLUS_ACCESS_TRAITS_H
35 |
--------------------------------------------------------------------------------
/CMake/python.cmake:
--------------------------------------------------------------------------------
1 | # Support functions for handling python scripts
2 |
3 | # Test whether a python modules is present
4 | # MODULE_NAME - input, name of module to test for
5 | # MODULE_PRESENT - output - True/False based on success of the import
6 | FUNCTION (TEST_PYTHON_MODULE MODULE_NAME MODULE_PRESENT)
7 | EXECUTE_PROCESS(
8 | COMMAND python ${miniqmc_SOURCE_DIR}/utils/test_import.py ${MODULE_NAME}
9 | OUTPUT_VARIABLE TMP_OUTPUT_VAR
10 | OUTPUT_STRIP_TRAILING_WHITESPACE
11 | )
12 | SET(${MODULE_PRESENT} ${TMP_OUTPUT_VAR} PARENT_SCOPE)
13 | ENDFUNCTION()
14 |
15 | # Test python module prerequisites for a particular test script
16 | # module_list - input - list of module names
17 | # test_name - input - name of test (used for missing module message)
18 | # add_test - output - true if all modules are present, false otherwise
19 | FUNCTION(CHECK_PYTHON_REQS module_list test_name add_test)
20 | set(${add_test} true PARENT_SCOPE)
21 | foreach(python_module IN LISTS ${module_list})
22 | TEST_PYTHON_MODULE(${python_module} has_python_module)
23 | if (NOT(has_python_module))
24 | MESSAGE("Missing python module ${python_module}, not adding test ${test_name}")
25 | set(${add_test} false PARENT_SCOPE)
26 | endif()
27 | endforeach()
28 | ENDFUNCTION()
29 |
30 |
--------------------------------------------------------------------------------
/src/QMCWaveFunctions/SPOSet_builder.h:
--------------------------------------------------------------------------------
1 | // This file is distributed under the University of Illinois/NCSA Open Source
2 | // License. See LICENSE file in top directory for details.
3 | //
4 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
5 | //
6 | // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
7 | //
8 | // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
9 | //////////////////////////////////////////////////////////////////////////////////////
10 |
11 |
12 | #ifndef QMCPLUSPLUS_SINGLEPARTICLEORBITALSET_BUILDER_H
13 | #define QMCPLUSPLUS_SINGLEPARTICLEORBITALSET_BUILDER_H
14 |
15 | #include "QMCWaveFunctions/SPOSet.h"
16 |
17 | namespace qmcplusplus
18 | {
19 | /// build the einspline SPOSet.
20 | SPOSet* build_SPOSet(bool useRef,
21 | int nx,
22 | int ny,
23 | int nz,
24 | int num_splines,
25 | int nblocks,
26 | const Tensor& lattice_b,
27 | bool init_random = true);
28 |
29 | /// build the einspline SPOSet as a view of the main one.
30 | SPOSet* build_SPOSet_view(bool useRef, const SPOSet* SPOSet_main, int team_size, int member_id);
31 |
32 | } // namespace qmcplusplus
33 | #endif
34 |
--------------------------------------------------------------------------------
/CMake/IBMCompilers.cmake:
--------------------------------------------------------------------------------
1 | IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
2 | MESSAGE(STATUS "Power8+ system using xlC/xlc/xlf")
3 |
4 | ADD_DEFINITIONS( -Drestrict=__restrict__ )
5 |
6 | # Clean up flags
7 | IF(CMAKE_CXX_FLAGS MATCHES "-qhalt=e")
8 | SET(CMAKE_CXX_FLAGS "")
9 | ENDIF()
10 |
11 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__forceinline=inline")
12 |
13 | # Suppress compile warnings
14 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-unused-value")
15 |
16 | # Set extra optimization specific flags
17 | SET( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" )
18 | SET( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3" )
19 |
20 | # Set language standardards
21 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qnoxlcompatmacros")
22 |
23 | # CMake < 3.9 didn't have support for language standards in XL
24 | IF(NOT CMAKE_CXX11_STANDARD_COMPILE_OPTION)
25 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
26 | ENDIF()
27 |
28 | IF(QMC_OMP)
29 | SET(ENABLE_OPENMP 1)
30 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qsmp=omp")
31 | ELSE(QMC_OMP)
32 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qnothreaded")
33 | ENDIF(QMC_OMP)
34 |
35 | # Add static flags if necessary
36 | IF(QMC_BUILD_STATIC)
37 | SET(CMAKE_CXX_LINK_FLAGS " -static")
38 | ENDIF(QMC_BUILD_STATIC)
39 |
40 | ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
41 |
--------------------------------------------------------------------------------
/src/Drivers/tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #//////////////////////////////////////////////////////////////////////////////////////
2 | #// This file is distributed under the University of Illinois/NCSA Open Source License.
3 | #// See LICENSE file in top directory for details.
4 | #//
5 | #// Copyright (c) 2020 QMCPACK developers.
6 | #//
7 | #// File developed by:
8 | #// Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
9 | #// Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 | #//
11 | #// File created by:
12 | #// Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
13 | #////////////////////////////////////////////////////////////////////////////////
14 |
15 | SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QMCPACK_UNIT_TEST_DIR})
16 |
17 | SET(SRC_DIR Drivers)
18 | SET(UTEST_EXE test_${SRC_DIR})
19 | SET(UTEST_NAME unit_test_${SRC_DIR})
20 |
21 |
22 | ADD_EXECUTABLE(${UTEST_EXE} ../MiniQMCOptions.cpp test_MiniQMCOptions.cpp)
23 | TARGET_LINK_LIBRARIES(${UTEST_EXE} catch_main qmcutil)
24 |
25 | ADD_UNIT_TEST(${UTEST_NAME} "${QMCPACK_UNIT_TEST_DIR}/${UTEST_EXE}")
26 |
27 | RUN_APP(miniqmc-g111-r1-t16 miniqmc 1 16 miniqmc TEST_ADDED)
28 | RUN_APP(miniqmc_sync_move-g111-r1-t16 miniqmc_sync_move 1 16 miniqmc TEST_ADDED)
29 | RUN_APP(check_spo-g111-r1-t16 check_spo 1 16 check TEST_ADDED)
30 | RUN_APP(check_wfc-g111-r1-t16 check_wfc 1 16 check TEST_ADDED)
31 |
--------------------------------------------------------------------------------
/miniqmc.settings:
--------------------------------------------------------------------------------
1 | #qmcpack variables
2 | QMCPACK_VERSION = @QMCPACK_VERSION@
3 | # See qmcpack --version for the most up-to-date information about the
4 | # most recent git commit
5 |
6 | QMC_MPI = @QMC_MPI@
7 | QMC_OMP = @QMC_OMP@
8 | QMC_COMPLEX = @QMC_COMPLEX@
9 | BUILD_AFQMC = @BUILD_AFQMC@
10 | BUILD_FCIQMC = @BUILD_FCIQMC@
11 |
12 | #system variables
13 | QMC_HOSTNAME = @QMC_HOSTNAME@
14 | SYSTEM = @CMAKE_SYSTEM@
15 | SYSTEM_NAME = @CMAKE_SYSTEM_NAME@
16 | SYSTEM_PROCESSOR = @CMAKE_SYSTEM_PROCESSOR@
17 | SYSTEM_VERSION = @CMAKE_SYSTEM_VERSION@
18 | CMAKE_VERSION = @CMAKE_VERSION@
19 | CMAKE_BUILD_TYPE = @CMAKE_BUILD_TYPE@
20 |
21 | CXX_COMPILER = @CMAKE_CXX_COMPILER@
22 | CXX_COMPILER_ID = @CMAKE_CXX_COMPILER_ID@
23 | CXX_FLAGS = @CMAKE_CXX_FLAGS@
24 |
25 | C_COMPILER = @CMAKE_C_COMPILER@
26 | C_FLAGS = @CMAKE_C_FLAGS@
27 |
28 | LAPACK_LIBRARIES = @LAPACK_LIBRARIES@
29 | HDF5_INCLUDE_DIR = @HDF5_INCLUDE_DIR@
30 | HDF5_LIBRARIES = @HDF5_LIBRARIES@
31 | LIBXML2_INCLUDE_DIR = @LIBXML2_INCLUDE_DIR@
32 | LIBXML2_LIBRARIES = @LIBXML2_LIBRARIES@
33 | FFTW_INCLUDE_DIR = @FFTW_INCLUDE_DIR@
34 | FFTW_LIBRARIES = @FFTW_LIBRARIES@
35 | Boost_INCLUDE_DIR = @Boost_INCLUDE_DIR@
36 |
--------------------------------------------------------------------------------
/src/Utilities/Communicate.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2018 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by: Mark Dewing, mdewing@anl.gov Argonne National Laboratory
8 | //
9 | // File created by: Mark Dewing, mdewing@anl.gov Argonne National Laboratory
10 | //////////////////////////////////////////////////////////////////////////////////////
11 |
12 |
13 | /** @file Communicate.h
14 | * @brief Declaration of Communicate and CommunicateMPI classes.
15 | */
16 | #ifndef COMMUNICATE_H
17 | #define COMMUNICATE_H
18 |
19 | #include
20 |
21 | #ifdef HAVE_MPI
22 | #include
23 | #endif
24 |
25 | class Communicate
26 | {
27 | public:
28 | Communicate(int argc, char** argv);
29 |
30 | virtual ~Communicate();
31 |
32 | int rank() { return m_rank; }
33 | int size() { return m_size; }
34 | bool root() { return m_rank == 0; }
35 | #ifdef HAVE_MPI
36 | MPI_Comm world() { return m_world; }
37 | #endif
38 | void reduce(int& value);
39 | void reduce(float& value);
40 | void reduce(double& value);
41 |
42 | protected:
43 | int m_rank;
44 | int m_size;
45 | #ifdef HAVE_MPI
46 | MPI_Comm m_world;
47 | #endif
48 | };
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/src/Numerics/readme_soa.md:
--------------------------------------------------------------------------------
1 | There is some "structure of array" specific support here as well
2 |
3 | ParticleAttribSoA
4 | =================
5 | Experimental pacakage implements classes to facilitate SIMD algorithms.
6 | * SoaContainer.h
7 | * Container.h : replacing container>
8 | * TensorSoaContainer.h : replacing container>
9 |
10 | Container
11 | ---------------
12 | \code
13 | Container R;
14 | auto r=R[i]; //get the value of the i-th position
15 | R(i)=0; //assign to the i-th position
16 | R(i)=TinyVector(-1,2,3); //assign to the i-th position
17 | \endcode
18 |
19 | Access operators to each compoenent are provided.
20 |
21 | \code
22 | R.data(0); //return the starting address of X component
23 | R.data(1); //return the starting address of Y component
24 | R.data(2); //return the starting address of Z component
25 | \endode
26 |
27 | TensorSoaContainer
28 | ------------------
29 | \code
30 | TensorSoaContainer H;
31 | auto h=H[i]; //get the value of the i-th hessian as Tensor
32 | H(i)=0; //assign to the i-th hessian
33 | H(i)=Tensor(0,1,2,1,3,4,2,4,5);//assign to the i-th hessian
34 | \endcode
35 |
36 | Access operators to each compoenent are provided.
37 |
38 | \code
39 | H.data(int i, int j); //return the starting address of (i,j) component
40 | \endcode
41 |
42 |
--------------------------------------------------------------------------------
/src/Utilities/InfoStream.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2017 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
8 | //
9 | // File created by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
10 | //////////////////////////////////////////////////////////////////////////////////////
11 |
12 |
13 | #include
14 | #include
15 |
16 | InfoStream::~InfoStream()
17 | {
18 | if (currStream != nullStream)
19 | {
20 | delete nullStream;
21 | }
22 | if (ownStream && currStream)
23 | {
24 | delete (currStream);
25 | }
26 | }
27 |
28 | void InfoStream::pause()
29 | {
30 | if (currStream != nullStream)
31 | {
32 | prevStream = currStream;
33 | currStream = nullStream;
34 | }
35 | }
36 |
37 | void InfoStream::resume()
38 | {
39 | if (prevStream)
40 | {
41 | currStream = prevStream;
42 | prevStream = NULL;
43 | }
44 | }
45 |
46 | void InfoStream::shutOff()
47 | {
48 | prevStream = NULL;
49 | currStream = nullStream;
50 | }
51 |
52 | void InfoStream::redirectToFile(const std::string& fname)
53 | {
54 | currStream = new std::ofstream(fname);
55 | ownStream = true;
56 | }
57 |
58 | void InfoStream::redirectToSameStream(InfoStream& info)
59 | {
60 | currStream = &info.getStream();
61 | ownStream = false;
62 | }
63 |
--------------------------------------------------------------------------------
/src/Utilities/scalar_traits.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by: Miguel Morales, moralessilva2@llnl.gov, Lawrence Livermore National Laboratory
8 | // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
9 | // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
10 | // Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
11 | // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
12 | //
13 | // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
14 | //////////////////////////////////////////////////////////////////////////////////////
15 |
16 |
17 | #ifndef QMCPLUSPLUS_SCLAR_TRAITS_H
18 | #define QMCPLUSPLUS_SCLAR_TRAITS_H
19 |
20 | #include
21 |
22 | namespace qmcplusplus
23 | {
24 |
25 | template
26 | struct scalar_traits
27 | {
28 | enum
29 | {
30 | DIM = 1
31 | };
32 | typedef T real_type;
33 | typedef T value_type;
34 | };
35 |
36 | template
37 | struct scalar_traits>
38 | {
39 | enum
40 | {
41 | DIM = 2
42 | };
43 | typedef T real_type;
44 | typedef std::complex value_type;
45 | };
46 |
47 | } // namespace qmcplusplus
48 | #endif
49 |
--------------------------------------------------------------------------------
/src/Utilities/QMCTypes.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2018 QMCPACK developers
6 | //
7 | // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
8 | // Ye Luo, yeluo@anl.gov, Argonne National Lab
9 | //
10 | // File created by: Ye Luo, yeluo@anl.gov, Argonne National Lab
11 | //////////////////////////////////////////////////////////////////////////////////////
12 |
13 | #ifndef QMCPLUSPLUS_QMC_TYPES_H
14 | #define QMCPLUSPLUS_QMC_TYPES_H
15 |
16 | #include
17 | #include
18 | #include
19 |
20 | namespace qmcplusplus
21 | {
22 | /* Facilitates use of full/mixed precision without rebuilding the code
23 | *
24 | * a template class may define its local types
25 | * template
26 | * class Foo
27 | * {
28 | * using FooTypes = QMCTypes;
29 | * ...
30 | * };
31 | *
32 | */
33 | template
34 | class QMCTypes final
35 | {
36 | public:
37 | using RealType = Precision;
38 | using ComplexType = std::complex;
39 | #ifdef QMC_COMPLEX
40 | using ValueType = ComplexType;
41 | #else
42 | using ValueType = RealType;
43 | #endif
44 | using GradType = TinyVector;
45 | using PosType = TinyVector;
46 | using TensorType = Tensor;
47 | };
48 |
49 | } // namespace qmcplusplus
50 | #endif
51 |
--------------------------------------------------------------------------------
/src/Utilities/SIMD/allocator.hpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | //
9 | // File created by: Jeongnim Kim, jeongnim.kim@intel.com, Intel Corp.
10 | //////////////////////////////////////////////////////////////////////////////////////
11 | // -*- C++ -*-
12 | /** @file allocator.hpp
13 | */
14 | #ifndef QMCPLUSPLUS_ALLOCATOR_H
15 | #define QMCPLUSPLUS_ALLOCATOR_H
16 |
17 | #include
18 | #include
19 | #include
20 | #include "Utilities/SIMD/Mallocator.hpp"
21 |
22 | namespace qmcplusplus
23 | {
24 | template
25 | using aligned_allocator = Mallocator;
26 |
27 | template
28 | using aligned_vector = std::vector>;
29 |
30 | } // namespace qmcplusplus
31 |
32 | /** return size in T's of allocated aligned memory
33 | */
34 | template
35 | inline size_t getAlignedSize(size_t n)
36 | {
37 | constexpr size_t ND = ALIGN / sizeof(T);
38 | static_assert(ALIGN % sizeof(T) == 0, "getAlignedSize ALIGN must be a multiple of sizeof(T)");
39 | return ((n + ND - 1) / ND) * ND;
40 | }
41 |
42 | template
43 | inline size_t getAlignment()
44 | {
45 | static_assert(ALIGN % sizeof(T) == 0, "getAlignedSize ALIGN must be a multiple of sizeof(T)");
46 | return ALIGN / sizeof(T);
47 | }
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/src/Numerics/BlasThreadingEnv.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2019 QMCPACK developers.
6 | //
7 | // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | //
9 | // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 | //
11 | //////////////////////////////////////////////////////////////////////////////////////
12 |
13 | #ifndef QMCPLUSPLUS_BLAS_THREADING_ENV_H
14 | #define QMCPLUSPLUS_BLAS_THREADING_ENV_H
15 |
16 | #include "config.h"
17 | #include "Utilities/Configuration.h"
18 | #ifdef HAVE_MKL
19 | #include
20 | #endif
21 |
22 | namespace qmcplusplus
23 | {
24 | /** service class for explicitly managing the threading of BLAS/LAPACK calls from OpenMP parallel region
25 | *
26 | * intended to use only locally around heavy calls.
27 | */
28 | class BlasThreadingEnv
29 | {
30 | int old_state;
31 |
32 | public:
33 | /// Constructor, obtains the number of threads at the next level
34 | BlasThreadingEnv(int num_threads)
35 | {
36 | #ifdef HAVE_MKL
37 | old_state = mkl_set_num_threads_local(num_threads);
38 | #endif
39 | }
40 |
41 | ~BlasThreadingEnv()
42 | {
43 | #ifdef HAVE_MKL
44 | mkl_set_num_threads_local(old_state);
45 | #endif
46 | }
47 |
48 | static bool NestedThreadingSupported()
49 | {
50 | #ifdef HAVE_MKL
51 | return true;
52 | #else
53 | return false;
54 | #endif
55 | }
56 | };
57 |
58 | } // namespace qmcplusplus
59 | #endif
60 |
--------------------------------------------------------------------------------
/CMake/IntelCompilers.cmake:
--------------------------------------------------------------------------------
1 | # Check compiler version
2 | IF ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0 )
3 | MESSAGE(FATAL_ERROR "Requires Intel 18.0 or higher ")
4 | ENDIF()
5 |
6 | # Enable OpenMP
7 | IF(QMC_OMP)
8 | SET(ENABLE_OPENMP 1)
9 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qopenmp")
10 | ENDIF(QMC_OMP)
11 |
12 | # Suppress compile warnings
13 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
14 |
15 | # Set extra optimization specific flags
16 | SET( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -restrict -unroll -ip" )
17 | SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -restrict -unroll -ip" )
18 | SET( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -restrict -unroll -ip" )
19 |
20 | # Set prefetch flag
21 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qopt-prefetch" )
22 |
23 | #check if -ftz is accepted
24 | CHECK_CXX_COMPILER_FLAG( "${CMAKE_CXX_FLAGS} -ftz" INTEL_FTZ )
25 | IF( INTEL_FTZ)
26 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftz" )
27 | ENDIF( INTEL_FTZ)
28 |
29 | #------------------------
30 | # Not on Cray's machine
31 | #------------------------
32 | IF(NOT $ENV{CRAYPE_VERSION} MATCHES ".")
33 |
34 | SET(X_OPTION "^-x| -x")
35 | SET(AX_OPTION "^-ax| -ax")
36 | #check if the user has already specified -x option for cross-compiling.
37 | if(NOT (CMAKE_CXX_FLAGS MATCHES ${X_OPTION} OR CMAKE_CXX_FLAGS MATCHES ${AX_OPTION}))
38 | #check if -xHost is accepted
39 | CHECK_CXX_COMPILER_FLAG( "-xHost" INTEL_CXX_FLAGS )
40 | IF(INTEL_CXX_FLAGS)
41 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost")
42 | ENDIF(INTEL_CXX_FLAGS)
43 | endif() #(CMAKE_CXX_FLAGS MATCHES "-x" OR CMAKE_CXX_FLAGS MATCHES "-ax")
44 |
45 | ENDIF(NOT $ENV{CRAYPE_VERSION} MATCHES ".")
46 |
--------------------------------------------------------------------------------
/src/Utilities/Communicate.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2018 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by: Mark Dewing, mdewing@anl.gov Argonne National Laboratory
8 | //
9 | // File created by: Mark Dewing, mdewing@anl.gov Argonne National Laboratory
10 | //////////////////////////////////////////////////////////////////////////////////////
11 |
12 |
13 | /** @file Communicate.cpp
14 | * @brief Defintion of Communicate and CommunicateMPI classes.
15 | */
16 | #include
17 | #include
18 |
19 | Communicate::Communicate(int argc, char** argv)
20 | {
21 | #ifdef HAVE_MPI
22 | MPI_Init(&argc, &argv);
23 | m_world = MPI_COMM_WORLD;
24 | MPI_Comm_rank(m_world, &m_rank);
25 | MPI_Comm_size(m_world, &m_size);
26 | #else
27 | m_rank = 0;
28 | m_size = 1;
29 | #endif
30 | }
31 |
32 | Communicate::~Communicate()
33 | {
34 | #ifdef HAVE_MPI
35 | MPI_Finalize();
36 | #endif
37 | }
38 |
39 | void Communicate::reduce(int& value)
40 | {
41 | #ifdef HAVE_MPI
42 | int local_value = value;
43 | MPI_Reduce(&local_value, &value, 1, MPI_INT, MPI_SUM, 0, m_world);
44 | #endif
45 | }
46 |
47 | void Communicate::reduce(float& value)
48 | {
49 | #ifdef HAVE_MPI
50 | float local_value = value;
51 | MPI_Reduce(&local_value, &value, 1, MPI_FLOAT, MPI_SUM, 0, m_world);
52 | #endif
53 | }
54 |
55 | void Communicate::reduce(double& value)
56 | {
57 | #ifdef HAVE_MPI
58 | double local_value = value;
59 | MPI_Reduce(&local_value, &value, 1, MPI_DOUBLE, MPI_SUM, 0, m_world);
60 | #endif
61 | }
62 |
--------------------------------------------------------------------------------
/src/Particle/ParticleSet_builder.cpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Ye Luo, yeluo@anl.gov,
9 | // Argonne National Laboratory
10 | //
11 | // File created by:
12 | // Ye Luo, yeluo@anl.gov,
13 | // Argonne National Laboratory
14 | ////////////////////////////////////////////////////////////////////////////////
15 |
16 |
17 | #include
18 | #include
19 | #include
20 |
21 | namespace qmcplusplus
22 | {
23 | int build_ions(ParticleSet& ions, const Tensor& tmat, Tensor& lattice)
24 | {
25 | ions.setName("ion");
26 | ions.Lattice.BoxBConds = 1;
27 | lattice = tile_cell(ions, tmat, static_cast(1.0));
28 | ions.RSoA = ions.R; // fill the SoA
29 |
30 | return ions.getTotalNum();
31 | }
32 |
33 | int build_els(ParticleSet& els, const ParticleSet& ions, RandomGenerator& rng)
34 | {
35 | els.setName("e");
36 | const int nels = count_electrons(ions, 1);
37 | const int nels3 = 3 * nels;
38 |
39 | { // create up/down electrons
40 | els.Lattice.BoxBConds = 1;
41 | els.Lattice.set(ions.Lattice);
42 | std::vector ud(2);
43 | ud[0] = nels / 2;
44 | ud[1] = nels - ud[0];
45 | els.create(ud);
46 | els.R.InUnit = 1;
47 | rng.generate_uniform(&els.R[0][0], nels3);
48 | els.convert2Cart(els.R); // convert to Cartiesian
49 | els.RSoA = els.R;
50 | }
51 |
52 | return nels;
53 | }
54 |
55 | } // namespace qmcplusplus
56 |
--------------------------------------------------------------------------------
/src/Particle/ParticleAttrib.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | //
9 | // File created by: Jeongnim Kim, jeongnim.kim@intel.com, Intel Corp.
10 | ////////////////////////////////////////////////////////////////////////////////
11 |
12 | /**@file ParticleAttrib.h
13 | *
14 | * Declaraton of ParticleAttrib derived from Vector
15 | */
16 |
17 | #ifndef OHMMS_NEW_PARTICLEATTRIB_PEPE_H
18 | #define OHMMS_NEW_PARTICLEATTRIB_PEPE_H
19 |
20 | #include
21 |
22 | namespace qmcplusplus
23 | {
24 | template>
25 | class ParticleAttrib : public Vector
26 | {
27 | typedef Vector __my_base;
28 |
29 | public:
30 | /// The unit type
31 | int InUnit;
32 |
33 | /** constructor with size n*/
34 | explicit inline ParticleAttrib(size_t n = 0) : __my_base(n), InUnit(0) {}
35 |
36 | /** constructor with an initialized ref */
37 | explicit inline ParticleAttrib(T* ref, size_t n) : __my_base(ref, n), InUnit(0) {}
38 |
39 | ParticleAttrib(const ParticleAttrib& rhs) = default;
40 | inline ParticleAttrib& operator=(const ParticleAttrib& rhs) = default;
41 |
42 | /** assignment operator to enable PETE */
43 | template
44 | inline ParticleAttrib& operator=(const RHS& rhs)
45 | {
46 | assign(*this, rhs);
47 | return *this;
48 | }
49 |
50 | //@{set/set the unit
51 | inline void setUnit(int i) { InUnit = i; }
52 | inline int getUnit() const { return InUnit; }
53 | //@}
54 | };
55 | } // namespace qmcplusplus
56 |
57 | #endif // OHMMS_PARTICLEATTRIB_PEPE_H
58 |
--------------------------------------------------------------------------------
/src/Utilities/OutputManager.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2017 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by: Mark Dewing, mdewing@anl.gov Argonne National Laboratory
8 | //
9 | // File created by: Mark Dewing, mdewing@anl.gov Argonne National Laboratory
10 | //////////////////////////////////////////////////////////////////////////////////////
11 |
12 |
13 | #include
14 |
15 |
16 | InfoStream infoSummary(&std::cout);
17 | InfoStream infoLog(&std::cout);
18 | InfoStream infoError(&std::cerr);
19 | InfoStream infoDebug(&std::cout);
20 |
21 | OutputManagerClass outputManager(Verbosity::LOW);
22 |
23 |
24 | void OutputManagerClass::setVerbosity(Verbosity level)
25 | {
26 | global_verbosity_level = level;
27 | if (isActive(Verbosity::DEBUG))
28 | {
29 | infoSummary.resume();
30 | infoLog.resume();
31 | infoDebug.resume();
32 | }
33 | else if (isActive(Verbosity::HIGH))
34 | {
35 | infoSummary.resume();
36 | infoLog.resume();
37 | infoDebug.pause();
38 | }
39 | else if (isActive(Verbosity::LOW))
40 | {
41 | infoSummary.resume();
42 | infoLog.pause();
43 | infoDebug.pause();
44 | }
45 | }
46 |
47 | bool OutputManagerClass::isActive(Verbosity level) { return level <= global_verbosity_level; }
48 |
49 | void OutputManagerClass::pause()
50 | {
51 | infoSummary.pause();
52 | infoLog.pause();
53 | }
54 |
55 | void OutputManagerClass::resume()
56 | {
57 | infoSummary.resume();
58 | infoLog.resume();
59 | }
60 |
61 | void OutputManagerClass::shutOff()
62 | {
63 | infoSummary.shutOff();
64 | infoLog.shutOff();
65 | infoError.shutOff();
66 | infoDebug.shutOff();
67 | }
68 |
--------------------------------------------------------------------------------
/src/Utilities/qmcpack_version.cpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2017 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
9 | //
10 | // File created by:
11 | // Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
12 | ////////////////////////////////////////////////////////////////////////////////
13 |
14 | #include
15 | #include
16 |
17 | #define STR_EXPAND(x) #x
18 | #define STR(x) STR_EXPAND(x)
19 |
20 | // Wrapper around the auto-generated Git repository revision
21 | // information file (git-rev.h)
22 | // If not building from a git repository, the git-rev.h file is empty
23 | #include "git-rev.h"
24 |
25 | #ifdef GIT_BRANCH_RAW
26 | #define QMCPACK_GIT_BRANCH STR(GIT_BRANCH_RAW)
27 | #define QMCPACK_GIT_HASH STR(GIT_HASH_RAW)
28 | #define QMCPACK_GIT_COMMIT_LAST_CHANGED STR(GIT_COMMIT_LAST_CHANGED_RAW)
29 | #define QMCPACK_GIT_COMMIT_SUBJECT GIT_COMMIT_SUBJECT_RAW
30 | #endif
31 |
32 | using std::endl;
33 | using qmcplusplus::app_summary;
34 |
35 | void print_version(bool verbose)
36 | {
37 | #ifdef QMCPACK_GIT_BRANCH
38 | app_summary() << "miniqmc git branch: " << QMCPACK_GIT_BRANCH << endl;
39 | app_summary() << "miniqmc git commit: " << QMCPACK_GIT_HASH << endl;
40 |
41 | if (verbose)
42 | {
43 | app_summary() << "miniqmc git commit date: " << QMCPACK_GIT_COMMIT_LAST_CHANGED << endl;
44 | app_summary() << "miniqmc git commit subject: " << QMCPACK_GIT_COMMIT_SUBJECT << endl;
45 | }
46 |
47 | #else
48 | app_summary() << "miniqmc not built from git repository" << endl;
49 | #endif
50 | app_summary() << endl;
51 | }
52 |
--------------------------------------------------------------------------------
/src/Particle/DistanceTable.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Jeremy McMinnis, jmcminis@gmail.com,
9 | // University of Illinois at Urbana-Champaign
10 | // Jeongnim Kim, jeongnim.kim@gmail.com,
11 | // University of Illinois at Urbana-Champaign
12 | //
13 | // File created by:
14 | // Jeongnim Kim, jeongnim.kim@gmail.com,
15 | // University of Illinois at Urbana-Champaign
16 | ////////////////////////////////////////////////////////////////////////////////
17 |
18 | #ifndef QMCPLUSPLUS_DISTANCETABLE_H
19 | #define QMCPLUSPLUS_DISTANCETABLE_H
20 |
21 | #include "Particle/ParticleSet.h"
22 | #include "Utilities/PooledData.h"
23 |
24 | namespace qmcplusplus
25 | {
26 | /** Class to manage multiple DistanceTableData objects.
27 | *
28 | * \date 2008-09-19
29 | * DistanceTable::add functions
30 | * are kept for compatibility only. New codes should use a member function
31 | * of ParticleSet to add a distance table
32 | * int ParticleSet::addTable(const ParticleSet& source)
33 | *
34 | *\todo DistanceTable should work as a factory, as well, to instantiate
35 | *DistanceTableData
36 | * subject to different boundary conditions.
37 | * Lattice/CrystalLattice.h and Lattice/CrystalLattice.cpp can be owned by
38 | *DistanceTable
39 | * to generically control the crystalline structure.
40 | */
41 |
42 | /// free function to create a distable table of s-s
43 | DistanceTableData* createDistanceTable(ParticleSet& s, int dt_type);
44 |
45 | /// free function create a distable table of s-t
46 | DistanceTableData* createDistanceTable(const ParticleSet& s, ParticleSet& t, int dt_type);
47 | } // namespace qmcplusplus
48 | #endif
49 |
--------------------------------------------------------------------------------
/src/Numerics/Einspline/bspline.h:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////////////
2 | // einspline: a library for creating and evaluating B-splines //
3 | // Copyright (C) 2007 Kenneth P. Esler, Jr. //
4 | // //
5 | // This program is free software; you can redistribute it and/or modify //
6 | // it under the terms of the GNU General Public License as published by //
7 | // the Free Software Foundation; either version 2 of the License, or //
8 | // (at your option) any later version. //
9 | // //
10 | // This program is distributed in the hope that it will be useful, //
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of //
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13 | // GNU General Public License for more details. //
14 | // //
15 | // You should have received a copy of the GNU General Public License //
16 | // along with this program; if not, write to the Free Software //
17 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, //
18 | // Boston, MA 02110-1301 USA //
19 | /////////////////////////////////////////////////////////////////////////////
20 |
21 | #ifndef BSPLINE_H
22 | #define BSPLINE_H
23 |
24 | #include "bspline_base.h"
25 | ////////////////////////////////////////////////////////////
26 | ////////////////////////////////////////////////////////////
27 | //// Bspline structure definitions ////
28 | ////////////////////////////////////////////////////////////
29 | ////////////////////////////////////////////////////////////
30 | #include "bspline_structs.h"
31 | #include "multi_bspline_structs.h"
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/src/Numerics/OhmmsPETE/OhmmsMatrixOperators.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Jeremy McMinnis, jmcminis@gmail.com,
9 | // University of Illinois at Urbana-Champaign
10 | //
11 | // File created by:
12 | // Jeongnim Kim, jeongnim.kim@gmail.com,
13 | // University of Illinois at Urbana-Champaign
14 | ////////////////////////////////////////////////////////////////////////////////
15 |
16 | #ifndef OHMMS_MATRIXOPERATOR_H
17 | #define OHMMS_MATRIXOPERATOR_H
18 |
19 |
20 | namespace qmcplusplus
21 | {
22 | template
23 | inline Matrix& assign(Matrix& lhs, const RHS& rhs)
24 | {
25 | typedef typename CreateLeaf::Leaf_t Leaf_t;
26 | evaluate(lhs, OpAssign(), MakeReturn::make(CreateLeaf::make(rhs)));
27 | return lhs;
28 | }
29 |
30 | template
31 | inline Matrix& operator+=(Matrix& lhs, const RHS& rhs)
32 | {
33 | typedef typename CreateLeaf::Leaf_t Leaf_t;
34 | evaluate(lhs, OpAddAssign(), MakeReturn::make(CreateLeaf::make(rhs)));
35 | return lhs;
36 | }
37 |
38 | template
39 | inline Matrix& operator-=(Matrix& lhs, const RHS& rhs)
40 | {
41 | typedef typename CreateLeaf::Leaf_t Leaf_t;
42 | evaluate(lhs, OpSubtractAssign(), MakeReturn::make(CreateLeaf::make(rhs)));
43 | return lhs;
44 | }
45 |
46 | template
47 | inline Matrix& operator*=(Matrix& lhs, const RHS& rhs)
48 | {
49 | typedef typename CreateLeaf::Leaf_t Leaf_t;
50 | evaluate(lhs, OpMultiplyAssign(), MakeReturn::make(CreateLeaf::make(rhs)));
51 | return lhs;
52 | }
53 |
54 | } // namespace qmcplusplus
55 |
56 | #endif // OHMMS_MATRIXOPERATOR_H
57 |
--------------------------------------------------------------------------------
/src/Utilities/Clock.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Jeongnim Kim, jeongnim.kim@gmail.com,
9 | // University of Illinois at Urbana-Champaign
10 | // Jeremy McMinnis, jmcminis@gmail.com,
11 | // University of Illinois at Urbana-Champaign
12 | // Mark A. Berrill, berrillma@ornl.gov,
13 | // Oak Ridge National Laboratory
14 | //
15 | // File created by:
16 | // Jeongnim Kim, jeongnim.kim@gmail.com,
17 | // University of Illinois at Urbana-Champaign
18 | ////////////////////////////////////////////////////////////////////////////////
19 |
20 | #ifndef QMCPLUSPLUS_CLOCK_H
21 | #define QMCPLUSPLUS_CLOCK_H
22 |
23 | #include
24 | #include
25 | #include "Utilities/Configuration.h"
26 |
27 | namespace qmcplusplus
28 | {
29 | #if defined(USE_FAKE_CLOCK)
30 | extern double fake_cpu_clock_value;
31 | extern double fake_cpu_clock_increment;
32 | double fake_cpu_clock()
33 | {
34 | fake_cpu_clock_value += fake_cpu_clock_increment;
35 | return fake_cpu_clock_value;
36 | }
37 | #define cpu_clock fake_cpu_clock
38 | #else
39 | #if defined(__bgq__)
40 | __inline__ unsigned long long getticks(void)
41 | {
42 | unsigned long long int result = 0;
43 | __asm__ volatile("\tmfspr %0,268 \n" : "=r"(result));
44 | return result;
45 | }
46 |
47 | inline double cpu_clock()
48 | {
49 | // BG/Q node - using 1.6e9 ticks per second
50 | const double SEC_PER_TICKS = 6.25e-10;
51 | return static_cast(getticks()) * SEC_PER_TICKS;
52 | }
53 |
54 | #else
55 | #if defined(ENABLE_OPENMP)
56 | inline double cpu_clock() { return omp_get_wtime(); }
57 | #else
58 | inline double cpu_clock()
59 | {
60 | struct timeval tv;
61 | gettimeofday(&tv, NULL);
62 | return (double)tv.tv_sec + (1.e-6) * tv.tv_usec;
63 | }
64 | #endif //
65 | #endif
66 | #endif
67 | } // namespace qmcplusplus
68 | #endif
69 |
--------------------------------------------------------------------------------
/src/QMCWaveFunctions/DeterminantHelper.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2019 QMCPACK developers.
6 | //
7 | // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | //
9 | // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 | //////////////////////////////////////////////////////////////////////////////////////
11 |
12 |
13 | #ifndef QMCPLUSPLUS_DETERMINANT_HELPER_H
14 | #define QMCPLUSPLUS_DETERMINANT_HELPER_H
15 |
16 | #include
17 |
18 | namespace qmcplusplus
19 | {
20 | template
21 | inline T evaluatePhase(T sign_v)
22 | {
23 | return T((sign_v > 0) ? 0.0 : M_PI);
24 | }
25 |
26 | template
27 | inline T evaluatePhase(const std::complex& psi)
28 | {
29 | return T(std::arg(psi));
30 | }
31 |
32 | /** evaluate the log(|psi|) and phase
33 | * @param psi real/complex value
34 | * @param phase phase of psi
35 | * @return log(|psi|)
36 | */
37 | template
38 | inline T evaluateLogAndPhase(const T psi, T& phase)
39 | {
40 | if (psi < 0.0)
41 | {
42 | phase = M_PI;
43 | return std::log(-psi);
44 | }
45 | else
46 | {
47 | phase = 0.0;
48 | return std::log(psi);
49 | }
50 | }
51 |
52 | template
53 | inline T evaluateLogAndPhase(const std::complex& psi, T& phase)
54 | {
55 | phase = std::arg(psi);
56 | if (phase < 0.0)
57 | phase += 2.0 * M_PI;
58 | return std::log(std::abs(psi));
59 | }
60 |
61 | /** generic conversion from type T1 to type T2 using implicit conversion
62 | */
63 | template
64 | inline void convert(const T1& in, T2& out)
65 | {
66 | out = static_cast(in);
67 | }
68 |
69 | /** specialization of conversion from complex to real
70 | */
71 | template
72 | inline void convert(const std::complex& in, T2& out)
73 | {
74 | out = static_cast(in.real());
75 | }
76 |
77 | } // namespace qmcplusplus
78 |
79 | #endif // QMCPLUSPLUS_DETERMINANT_HELPER_H
80 |
--------------------------------------------------------------------------------
/src/Numerics/Spline2/bspline_traits.hpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | //
9 | // File created by: Jeongnim Kim, jeongnim.kim@intel.com, Intel Corp.
10 | ////////////////////////////////////////////////////////////////////////////////
11 | // -*- C++ -*-
12 | /** @file bspline_traits.hpp
13 | *
14 | * extend spline/bspline_traints by introducing
15 | * bspline_traits with only speciliazation with 3D
16 | */
17 | #ifndef QMCPLUSPLUS_BSPLINE_SPLINE2_TRAITS_H
18 | #define QMCPLUSPLUS_BSPLINE_SPLINE2_TRAITS_H
19 |
20 | #include
21 |
22 | namespace qmcplusplus
23 | {
24 | /** trait class to map (datatype,D) to Einspline engine type */
25 | template
26 | struct bspline_traits
27 | {};
28 |
29 | template<>
30 | struct bspline_traits
31 | {
32 | typedef multi_UBspline_3d_s SplineType;
33 | typedef UBspline_3d_s SingleSplineType;
34 | typedef BCtype_s BCType;
35 | typedef float real_type;
36 | typedef float value_type;
37 | };
38 |
39 | template<>
40 | struct bspline_traits
41 | {
42 | typedef multi_UBspline_3d_d SplineType;
43 | typedef UBspline_3d_d SingleSplineType;
44 | typedef BCtype_d BCType;
45 | typedef double real_type;
46 | typedef double value_type;
47 | };
48 |
49 | /** helper class to determine the value_type of einspline objects
50 | */
51 | template
52 | struct bspline_type
53 | {};
54 |
55 | template<>
56 | struct bspline_type
57 | {
58 | typedef float value_type;
59 | };
60 |
61 | template<>
62 | struct bspline_type
63 | {
64 | typedef double value_type;
65 | };
66 |
67 | template<>
68 | struct bspline_type
69 | {
70 | typedef float value_type;
71 | };
72 |
73 | template<>
74 | struct bspline_type
75 | {
76 | typedef double value_type;
77 | };
78 | } // namespace qmcplusplus
79 | #endif
80 |
--------------------------------------------------------------------------------
/src/Particle/ParticleSet.BC.cpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Jeremy McMinnis, jmcminis@gmail.com,
9 | // University of Illinois at Urbana-Champaign
10 | // Jeongnim Kim, jeongnim.kim@gmail.com,
11 | // University of Illinois at Urbana-Champaign
12 | // Mark A. Berrill, berrillma@ornl.gov,
13 | // Oak Ridge National Laboratory
14 | //
15 | // File created by:
16 | // Jeongnim Kim, jeongnim.kim@gmail.com,
17 | // University of Illinois at Urbana-Champaign
18 | ////////////////////////////////////////////////////////////////////////////////
19 |
20 | /**@file ParticleSet.BC.cpp
21 | * @brief definition of functions controlling Boundary Conditions
22 | */
23 | #include "Particle/ParticleSet.h"
24 | #include "Particle/FastParticleOperators.h"
25 |
26 | namespace qmcplusplus
27 | {
28 | void ParticleSet::convert2Unit(ParticlePos_t& pinout)
29 | {
30 | if (pinout.getUnit() == PosUnit::LatticeUnit)
31 | return;
32 | else
33 | {
34 | pinout.setUnit(PosUnit::LatticeUnit);
35 | ConvertPosUnit::apply(pinout,
36 | Lattice.G,
37 | 0,
38 | pinout.size());
39 | }
40 | }
41 |
42 | void ParticleSet::convert2Cart(ParticlePos_t& pinout)
43 | {
44 | if (pinout.getUnit() == PosUnit::CartesianUnit)
45 | return;
46 | else
47 | {
48 | pinout.setUnit(PosUnit::CartesianUnit);
49 | ConvertPosUnit::apply(pinout,
50 | Lattice.R,
51 | 0,
52 | pinout.size());
53 | }
54 | }
55 | } // namespace qmcplusplus
56 |
--------------------------------------------------------------------------------
/src/Particle/VirtualParticleSet.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
9 | //
10 | // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
11 | //////////////////////////////////////////////////////////////////////////////////////
12 |
13 |
14 | /** @file VirtualParticleSet.cpp
15 | * A proxy class to the quantum ParticleSet
16 | */
17 |
18 | #include
19 | #include
20 | #include
21 |
22 | namespace qmcplusplus
23 | {
24 | VirtualParticleSet::VirtualParticleSet(const ParticleSet& p, int nptcl) : refPS(p)
25 | {
26 | setName("virtual");
27 |
28 | //initialize local data structure
29 | Lattice = p.Lattice;
30 | TotalNum = nptcl;
31 | R.resize(nptcl);
32 | RSoA.resize(nptcl);
33 |
34 | //create distancetables
35 | if (refPS.DistTables.size())
36 | {
37 | DistTables.resize(refPS.DistTables.size());
38 | for (int i = 0; i < DistTables.size(); ++i)
39 | DistTables[i] = createDistanceTable(refPS.DistTables[i]->origin(), *this, refPS.DistTables[0]->DTType);
40 | }
41 | }
42 |
43 | /// move virtual particles to new postions and update distance tables
44 | void VirtualParticleSet::makeMoves(int jel, const ParticlePos_t& vitualPos, bool sphere, int iat)
45 | {
46 | ScopedTimer local_timer(timers[Timer_makeMove]);
47 |
48 | if (sphere && iat < 0)
49 | APP_ABORT("VirtualParticleSet::makeMoves is invoked incorrectly, the flag sphere=true requires iat specified!");
50 | onSphere = sphere;
51 | refPtcl = jel;
52 | refSourcePtcl = iat;
53 | R = vitualPos;
54 | RSoA.copyIn(R);
55 | for (int i = 0; i < DistTables.size(); i++)
56 | DistTables[i]->evaluate(*this);
57 | }
58 |
59 | } // namespace qmcplusplus
60 |
--------------------------------------------------------------------------------
/src/Particle/Lattice/LatticeOperations.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Jeremy McMinnis, jmcminis@gmail.com,
9 | // University of Illinois at Urbana-Champaign
10 | // Jeongnim Kim, jeongnim.kim@gmail.com,
11 | // University of Illinois at Urbana-Champaign
12 | //
13 | // File created by:
14 | // Jeongnim Kim, jeongnim.kim@gmail.com,
15 | // University of Illinois at Urbana-Champaign
16 | ////////////////////////////////////////////////////////////////////////////////
17 |
18 | #ifndef OHMMS_LATTICEOPERATIONS_H
19 | #define OHMMS_LATTICEOPERATIONS_H
20 | #include "Numerics/OhmmsPETE/TinyVector.h"
21 |
22 | namespace qmcplusplus
23 | {
24 | template
25 | struct CheckBoxConds
26 | {
27 | inline static bool inside(const TinyVector& u)
28 | {
29 | bool yes = (u[0] > 0.0 && u[0] < 1.0);
30 | for (int i = 1; i < D; ++i)
31 | yes &= (u[i] > 0.0 && u[i] < 1.0);
32 | return yes;
33 | }
34 |
35 | inline static bool inside(const TinyVector& u, TinyVector& ubox)
36 | {
37 | for (int i = 0; i < D; ++i)
38 | ubox[i] = u[i] - std::floor(u[i]);
39 | return true;
40 | }
41 | };
42 |
43 | template
44 | struct CheckBoxConds
45 | {
46 | inline static bool inside(const TinyVector& u)
47 | {
48 | return (u[0] > 0.0 && u[0] < 1.0) && (u[1] > 0.0 && u[1] < 1.0) && (u[2] > 0.0 && u[2] < 1.0);
49 | }
50 |
51 | inline static bool inside(const TinyVector& u, const TinyVector& bc)
52 | {
53 | return (bc[0] || (u[0] > 0.0 && u[0] < 1.0)) && (bc[1] || (u[1] > 0.0 && u[1] < 1.0)) &&
54 | (bc[2] || (u[2] > 0.0 && u[2] < 1.0));
55 | }
56 |
57 | inline static bool inside(const TinyVector& u, TinyVector& ubox)
58 | {
59 | ubox[0] = u[0] - std::floor(u[0]);
60 | ubox[1] = u[1] - std::floor(u[1]);
61 | ubox[2] = u[2] - std::floor(u[2]);
62 | return true;
63 | }
64 | };
65 | } // namespace qmcplusplus
66 |
67 | #endif
68 |
--------------------------------------------------------------------------------
/src/Particle/VirtualParticleSet.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
9 | //
10 | // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
11 | //////////////////////////////////////////////////////////////////////////////////////
12 |
13 |
14 | /** @file VirtualParticleSet.h
15 | * A proxy class to the quantum ParticleSet
16 | */
17 | #ifndef QMCPLUSPLUS_VIRTUAL_PARTICLESET_H
18 | #define QMCPLUSPLUS_VIRTUAL_PARTICLESET_H
19 |
20 | #include
21 | #include
22 |
23 | namespace qmcplusplus
24 | {
25 | /** Introduced to handle virtual moves and ratio computations, e.g. for non-local PP evaluations.
26 | */
27 | class VirtualParticleSet : public ParticleSet
28 | {
29 | private:
30 | /// true, if virtual particles are on a sphere for NLPP
31 | bool onSphere;
32 |
33 | public:
34 | /// Reference particle
35 | int refPtcl;
36 | /// Reference source particle, used when onSphere=true
37 | int refSourcePtcl;
38 |
39 | /// ParticleSet this object refers to
40 | const ParticleSet& refPS;
41 |
42 | inline bool isOnSphere() const { return onSphere; }
43 |
44 | /** constructor
45 | * @param p ParticleSet whose virtual moves are handled by this object
46 | * @param nptcl number of virtual particles
47 | */
48 | VirtualParticleSet(const ParticleSet& p, int nptcl);
49 |
50 | /** move virtual particles to new postions and update distance tables
51 | * @param jel reference particle that all the VP moves from
52 | * @param vitualPos new positions
53 | * @param sphere set true if VP are on a sphere around the reference source particle
54 | * @param iat reference source particle
55 | */
56 | void makeMoves(int jel, const ParticlePos_t& vitualPos, bool sphere = false, int iat = -1);
57 | };
58 | } // namespace qmcplusplus
59 | #endif
60 |
--------------------------------------------------------------------------------
/src/QMCWaveFunctions/SPOSet_builder.cpp:
--------------------------------------------------------------------------------
1 | // This file is distributed under the University of Illinois/NCSA Open Source
2 | // License. See LICENSE file in top directory for details.
3 | //
4 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
5 | //
6 | // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
7 | //
8 | // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
9 | //////////////////////////////////////////////////////////////////////////////////////
10 |
11 |
12 | #include "QMCWaveFunctions/SPOSet_builder.h"
13 | #include
14 | #include "QMCWaveFunctions/einspline_spo.hpp"
15 | #include "QMCWaveFunctions/einspline_spo_ref.hpp"
16 |
17 | namespace qmcplusplus
18 | {
19 | SPOSet* build_SPOSet(bool useRef,
20 | int nx,
21 | int ny,
22 | int nz,
23 | int num_splines,
24 | int nblocks,
25 | const Tensor& lattice_b,
26 | bool init_random)
27 | {
28 | if (useRef)
29 | {
30 | auto* spo_main = new miniqmcreference::einspline_spo_ref;
31 | spo_main->set(nx, ny, nz, num_splines, nblocks);
32 | spo_main->Lattice.set(lattice_b);
33 | return dynamic_cast(spo_main);
34 | }
35 | else
36 | {
37 | auto* spo_main = new einspline_spo;
38 | spo_main->set(nx, ny, nz, num_splines, nblocks);
39 | spo_main->Lattice.set(lattice_b);
40 | return dynamic_cast(spo_main);
41 | }
42 | }
43 |
44 | SPOSet* build_SPOSet_view(bool useRef, const SPOSet* SPOSet_main, int team_size, int member_id)
45 | {
46 | if (useRef)
47 | {
48 | auto* temp_ptr =
49 | dynamic_cast*>(SPOSet_main);
50 | auto* spo_view =
51 | new miniqmcreference::einspline_spo_ref(*temp_ptr, team_size, member_id);
52 | return dynamic_cast(spo_view);
53 | }
54 | else
55 | {
56 | auto* temp_ptr = dynamic_cast*>(SPOSet_main);
57 | auto* spo_view = new einspline_spo(*temp_ptr, team_size, member_id);
58 | return dynamic_cast(spo_view);
59 | }
60 | }
61 |
62 | } // namespace qmcplusplus
63 |
--------------------------------------------------------------------------------
/src/Numerics/OhmmsPETE/OhmmsVectorOperators.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Jeremy McMinnis, jmcminis@gmail.com,
9 | // University of Illinois at Urbana-Champaign
10 | //
11 | // File created by:
12 | // Jeongnim Kim, jeongnim.kim@gmail.com,
13 | // University of Illinois at Urbana-Champaign
14 | ////////////////////////////////////////////////////////////////////////////////
15 |
16 | #ifndef OHMMS_VECTOR_OPERATORS_H
17 | #define OHMMS_VECTOR_OPERATORS_H
18 |
19 | namespace qmcplusplus
20 | {
21 | template
22 | inline Vector& assign(Vector& lhs, const RHS& rhs)
23 | {
24 | typedef typename CreateLeaf::Leaf_t Leaf_t;
25 | evaluate(lhs, OpAssign(), MakeReturn::make(CreateLeaf::make(rhs)));
26 | return lhs;
27 | }
28 |
29 | template
30 | inline Vector& operator+=(Vector& lhs, const RHS& rhs)
31 | {
32 | typedef typename CreateLeaf::Leaf_t Leaf_t;
33 | evaluate(lhs, OpAddAssign(), MakeReturn::make(CreateLeaf::make(rhs)));
34 | return lhs;
35 | }
36 |
37 | template
38 | inline Vector& operator-=(Vector& lhs, const RHS& rhs)
39 | {
40 | typedef typename CreateLeaf::Leaf_t Leaf_t;
41 | evaluate(lhs, OpSubtractAssign(), MakeReturn::make(CreateLeaf::make(rhs)));
42 | return lhs;
43 | }
44 |
45 | template
46 | inline Vector& operator*=(Vector& lhs, const RHS& rhs)
47 | {
48 | typedef typename CreateLeaf::Leaf_t Leaf_t;
49 | evaluate(lhs, OpMultiplyAssign(), MakeReturn::make(CreateLeaf::make(rhs)));
50 | return lhs;
51 | }
52 |
53 | template
54 | inline Vector& operator/=(Vector& lhs, const RHS& rhs)
55 | {
56 | typedef typename CreateLeaf::Leaf_t Leaf_t;
57 | evaluate(lhs, OpDivideAssign(), MakeReturn::make(CreateLeaf::make(rhs)));
58 | return lhs;
59 | }
60 |
61 | } // namespace qmcplusplus
62 |
63 | #endif // GENERATED_OPERATORS_H
64 |
--------------------------------------------------------------------------------
/CMake/GNUCompilers.cmake:
--------------------------------------------------------------------------------
1 | # Check compiler version
2 | IF ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8 )
3 | MESSAGE(FATAL_ERROR "Requires gcc 4.8 or higher ")
4 | ENDIF()
5 |
6 | # Enable OpenMP
7 | IF(QMC_OMP)
8 | SET(ENABLE_OPENMP 1)
9 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
10 | ENDIF(QMC_OMP)
11 |
12 | # Set gnu specfic flags (which we always want)
13 | ADD_DEFINITIONS( -Drestrict=__restrict__ )
14 |
15 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-limit=1000 -fstrict-aliasing -funroll-all-loops -D__forceinline=inline")
16 |
17 | # Suppress compile warnings
18 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
19 |
20 | # Set extra optimization specific flags
21 | SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math" )
22 | SET( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -ffast-math" )
23 |
24 | #--------------------------------------
25 | # Special architectural flags
26 | #--------------------------------------
27 | # case arch
28 | # x86_64: -march
29 | # powerpc: -mpcu
30 | # arm: -mpcu
31 | # default or cray: none
32 | #--------------------------------------
33 | IF($ENV{CRAYPE_VERSION} MATCHES ".")
34 | # It's a cray machine. Don't do anything
35 | ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
36 | # the case for x86_64
37 | #check if the user has already specified -march=XXXX option for cross-compiling.
38 | if(NOT CMAKE_CXX_FLAGS MATCHES "-march=")
39 | # use -march=native
40 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
41 | endif(NOT CMAKE_CXX_FLAGS MATCHES "-march=")
42 | ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
43 | # the case for PowerPC and ARM
44 | #check if the user has already specified -mcpu=XXXX option for cross-compiling.
45 | if(NOT CMAKE_CXX_FLAGS MATCHES "-mcpu=")
46 | # use -mcpu=native
47 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
48 | endif(NOT CMAKE_CXX_FLAGS MATCHES "-mcpu=")
49 | ENDIF()
50 |
51 | # Add static flags if necessary
52 | IF(QMC_BUILD_STATIC)
53 | SET(CMAKE_CXX_LINK_FLAGS " -static")
54 | ENDIF(QMC_BUILD_STATIC)
55 |
56 | # Coverage
57 | IF (ENABLE_GCOV)
58 | SET(GCOV_SUPPORTED TRUE)
59 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
60 | SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
61 | SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
62 | ENDIF(ENABLE_GCOV)
63 |
64 |
65 |
--------------------------------------------------------------------------------
/src/Numerics/OptimizableFunctorBase.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Miguel Morales, moralessilva2@llnl.gov,
9 | // Lawrence Livermore National Laboratory
10 | // Jeremy McMinnis, jmcminis@gmail.com,
11 | // University of Illinois at Urbana-Champaign
12 | // Jeongnim Kim, jeongnim.kim@gmail.com,
13 | // University of Illinois at Urbana-Champaign
14 | //
15 | // File created by:
16 | // Jeongnim Kim, jeongnim.kim@gmail.com,
17 | // University of Illinois at Urbana-Champaign
18 | ////////////////////////////////////////////////////////////////////////////////
19 |
20 | /** @file OptimizableFunctorBase.h
21 | * @brief Define a base class for one-dimensional functions with optimizable
22 | * variables
23 | */
24 | #ifndef QMCPLUSPLUS_OPTIMIZABLEFUNCTORBASE_H
25 | #define QMCPLUSPLUS_OPTIMIZABLEFUNCTORBASE_H
26 |
27 | #include "config.h"
28 |
29 | /** Base class for any functor with optimizable parameters
30 | *
31 | * Derived classes from OptimizableFunctorBase are called "functor"s and
32 | * can be used as a template signature for Jastrow functions.
33 | * - OneBodyJastroOrbital
34 | * - TwoBodyJastroOrbital
35 | * Functor in qmcpack denotes any function which returns a value at a point,
36 | * e.g.,
37 | * GTO, STO, one-dimensional splines etc. OptimizableFunctorBase is introduced
38 | * for
39 | * optimizations. The virtual functions are intended for non-critical operations
40 | * that
41 | * are executed infrequently during optimizations.
42 | *
43 | * This class handles myVars of opt_variables_type (Optimize/VariableSet.h). A
44 | * derived class
45 | * can insert any number of variables it handles during optimizations, by
46 | * calling
47 | * myVars.insert(name,value);
48 | * Unlike VarList which uses map, VariableSet is serialized in that the internal
49 | * order is according
50 | * to insert calls.
51 | */
52 | struct OptimizableFunctorBase
53 | {
54 | /// typedef for real values
55 | typedef OHMMS_PRECISION real_type;
56 | /// maximum cutoff
57 | real_type cutoff_radius;
58 | /// default constructor
59 | inline OptimizableFunctorBase() {}
60 | /// virtual destrutor
61 | virtual ~OptimizableFunctorBase() {}
62 | };
63 |
64 | #endif
65 |
--------------------------------------------------------------------------------
/src/Utilities/InfoStream.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2017 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
8 | //
9 | // File created by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
10 | //////////////////////////////////////////////////////////////////////////////////////
11 |
12 |
13 | /** @file InfoStream.h
14 | * @brief Declaration of InfoStream class.
15 | */
16 |
17 | #ifndef INFOSTREAM_H
18 | #define INFOSTREAM_H
19 |
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | /**
26 | * Interface to output streams. Can redirect output to stdout/stderr, a file, or a null stream.
27 | */
28 |
29 | class InfoStream
30 | {
31 | public:
32 | InfoStream(std::ostream* output_stream)
33 | : prevStream(NULL), nullStream(new std::ostream(NULL)), ownStream(false)
34 | {
35 | currStream = output_stream;
36 | }
37 |
38 | InfoStream(InfoStream& in)
39 | : prevStream(NULL), nullStream(new std::ostream(NULL)), ownStream(false)
40 | {
41 | redirectToSameStream(in);
42 | }
43 |
44 | ~InfoStream();
45 |
46 | std::ostream& getStream(const std::string& tag = "") { return *currStream; }
47 |
48 | void setStream(std::ostream* output_stream) { currStream = output_stream; }
49 |
50 |
51 | void flush() { currStream->flush(); }
52 |
53 | /// Stop output (redirect to a null stream)
54 | void pause();
55 |
56 | /// Continue output on the stream used before pausing
57 | void resume();
58 |
59 | /// Open a file and output to that file
60 | void redirectToFile(const std::string& fname);
61 |
62 | /// Copy a stream
63 | void redirectToSameStream(InfoStream& info);
64 |
65 | /// Permanently turn off the stream
66 | void shutOff();
67 |
68 | private:
69 | // Keep track of whether we should delete the stream or not
70 | bool ownStream;
71 |
72 | std::ostream* currStream;
73 |
74 | // save stream during pause
75 | std::ostream* prevStream;
76 |
77 | // Created at construction. Used during pause
78 | std::ostream* nullStream;
79 | };
80 |
81 | template
82 | inline InfoStream& operator<<(InfoStream& o, const T& val)
83 | {
84 | o.getStream() << val;
85 | return o;
86 | }
87 |
88 |
89 | #endif
90 |
--------------------------------------------------------------------------------
/CMake/FindMKL.cmake:
--------------------------------------------------------------------------------
1 | # Simple file to refine MKL search.
2 | # It relies on FindLAPACK to locate MKL library files and set up linker options first.
3 | INCLUDE( CheckCXXSourceCompiles )
4 |
5 | SET(MKL_LIBRARIES ${LAPACK_LINKER_FLAGS} ${LAPACK_LIBRARIES})
6 |
7 | MESSAGE(STATUS "Looking for Intel MKL library header files")
8 |
9 | # Finding and setting the MKL_INCLUDE_DIRECTORIES based on MKL_ROOT, $ENV{MKLROOT}, $ENV{MKL_ROOT}, $ENV{MKL_HOME}
10 | # Extremely Basic Support of common mkl module environment variables
11 | FIND_PATH(MKL_INCLUDE_DIRECTORIES "mkl.h"
12 | HINTS ${MKL_ROOT} $ENV{MKLROOT} $ENV{MKL_ROOT} $ENV{MKL_HOME}
13 | PATH_SUFFIXES include)
14 | IF(NOT MKL_INCLUDE_DIRECTORIES)
15 | # Finding MKL headers in the system
16 | FIND_PATH(MKL_INCLUDE_DIRECTORIES "mkl.h" PATH_SUFFIXES mkl)
17 | ENDIF()
18 |
19 | IF(MKL_INCLUDE_DIRECTORIES)
20 | MESSAGE(STATUS "MKL_INCLUDE_DIRECTORIES: ${MKL_INCLUDE_DIRECTORIES}")
21 | ELSE(MKL_INCLUDE_DIRECTORIES)
22 | MESSAGE(STATUS "mkl.h cannot be found")
23 | IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
24 | MESSAGE(FATAL_ERROR "Intel's standard compilervar.sh sets the env variable MKLROOT.\n"
25 | "If you are invoking icc without the customary environment\n"
26 | "you must set the the environment variable or pass cmake MKL_ROOT.")
27 | ELSE(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
28 | MESSAGE(FATAL_ERROR "Pass mkl root directory to cmake via MKL_ROOT." )
29 | ENDIF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
30 | ENDIF(MKL_INCLUDE_DIRECTORIES)
31 |
32 | # Check for mkl.h
33 | FILE( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_mkl.cxx"
34 | "#include \n #include \n int main() { return 0; }\n" )
35 | TRY_COMPILE(HAVE_MKL ${CMAKE_BINARY_DIR}
36 | ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_mkl.cxx
37 | CMAKE_FLAGS
38 | "-DINCLUDE_DIRECTORIES=${MKL_INCLUDE_DIRECTORIES} "
39 | LINK_LIBRARIES "${MKL_LIBRARIES}"
40 | OUTPUT_VARIABLE MKL_OUT)
41 | IF( NOT HAVE_MKL )
42 | MESSAGE( "${MKL_OUT}" )
43 | ENDIF( NOT HAVE_MKL )
44 |
45 | IF ( HAVE_MKL )
46 | SET( MKL_FOUND TRUE )
47 | MESSAGE(STATUS "MKL found: HAVE_MKL=${HAVE_MKL}")
48 |
49 | #Add BLAS_LAPACK header
50 | SET_TARGET_PROPERTIES(Math::BLAS_LAPACK PROPERTIES INTERFACE_COMPILE_DEFINITIONS "HAVE_MKL"
51 | INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIRECTORIES}")
52 |
53 | ELSE( HAVE_MKL )
54 | SET( MKL_FOUND FALSE )
55 | MESSAGE(STATUS "MKL header files not found")
56 | ENDIF( HAVE_MKL )
57 |
--------------------------------------------------------------------------------
/src/Utilities/tests/test_ParallelBlock.cpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2019 QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
9 | //
10 | // File created by:
11 | // Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
12 | ////////////////////////////////////////////////////////////////////////////////
13 |
14 | #include
15 | #include
16 | #include "catch.hpp"
17 | #include "Utilities/ParallelBlock.hpp"
18 |
19 | /** @file
20 | *
21 | * We assume omp and std threading are always available.
22 | * Boost::HANA would simplify this...
23 | * i.e. one test could be written for all the implementations
24 | */
25 |
26 | namespace qmcplusplus
27 | {
28 |
29 |
30 | template
31 | struct testTaskBarrier
32 | {
33 | static void test(const int ip,
34 | ParallelBlockBarrier& barrier,
35 | std::atomic& counter)
36 | {
37 | counter.fetch_add(1);
38 | }
39 | };
40 |
41 | template
42 | struct testTask
43 | {
44 | static void test(const int ip,
45 | std::atomic& counter)
46 | {
47 | counter.fetch_add(1);
48 | }
49 | };
50 |
51 |
52 | TEST_CASE("ParallelBlock OPENMP with Block Barrier", "[Utilities]") {
53 | int threads = 8;
54 | constexpr ParallelBlockThreading DT = ParallelBlockThreading::OPENMP;
55 | ParallelBlock par_block(threads);
56 | ParallelBlockBarrier barrier(threads);
57 | std::atomic counter;
58 | counter = 0;
59 | par_block(testTaskBarrier::test, barrier, counter);
60 | REQUIRE(counter == 8);
61 | }
62 |
63 | TEST_CASE("ParallelBlock OPENMP", "[Utilities]") {
64 | int threads = 8;
65 | constexpr ParallelBlockThreading DT = ParallelBlockThreading::OPENMP;
66 | ParallelBlock par_block(threads);
67 | std::atomic counter;
68 | counter = 0;
69 | par_block(testTask::test, counter);
70 | REQUIRE(counter == 8);
71 | }
72 |
73 | TEST_CASE("ParallelBlock std::thread", "[Utilities]") {
74 | int threads = 8;
75 | constexpr ParallelBlockThreading DTS = ParallelBlockThreading::STD;
76 | ParallelBlock par_block(threads);
77 | std::atomic counter;
78 | counter = 0;
79 | par_block(testTask::test, std::ref(counter));
80 | REQUIRE(counter == 8);
81 | }
82 |
83 | }
84 |
85 |
--------------------------------------------------------------------------------
/src/Numerics/OhmmsPETE/PosTransformer.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | //
9 | // File created by:
10 | // Jeongnim Kim, jeongnim.kim@intel.com,
11 | // Intel Corp.
12 | ////////////////////////////////////////////////////////////////////////////////
13 | // -*- C++ -*-
14 | /** @file PosTransformer.h
15 | * @brief Support funtions to handle position type data manged by soa
16 | */
17 | #ifndef QMCPLUSPLUS_SOA_FAST_PARTICLE_OPERATORS_H
18 | #define QMCPLUSPLUS_SOA_FAST_PARTICLE_OPERATORS_H
19 |
20 | namespace qmcplusplus
21 | {
22 | /** General conversion function from AoS[nrows][ncols] to SoA[ncols][ldb]
23 | * @param nrows the first dimension
24 | * @param ncols the second dimension
25 | * @param iptr input pointer
26 | * @param lda stride of iptr
27 | * @param out output pointer
28 | * @param lda strided of out
29 | *
30 | * Modeled after blas/lapack for lda/ldb
31 | */
32 | template
33 | void PosAoS2SoA(int nrows, int ncols, const T1* restrict iptr, int lda, T2* restrict out, int ldb)
34 | {
35 | T2* restrict x = out;
36 | T2* restrict y = out + ldb;
37 | T2* restrict z = out + 2 * ldb;
38 | #if !defined(__ibmxl__)
39 | #pragma omp simd aligned(x, y, z)
40 | #endif
41 | for (int i = 0; i < nrows; ++i)
42 | {
43 | x[i] = iptr[i * ncols]; // x[i]=in[i][0];
44 | y[i] = iptr[i * ncols + 1]; // y[i]=in[i][1];
45 | z[i] = iptr[i * ncols + 2]; // z[i]=in[i][2];
46 | }
47 | }
48 |
49 | /** General conversion function from SoA[ncols][ldb] to AoS[nrows][ncols]
50 | * @param nrows the first dimension
51 | * @param ncols the second dimension
52 | * @param iptr input pointer
53 | * @param lda stride of iptr
54 | * @param out output pointer
55 | * @param lda strided of out
56 | *
57 | * Modeled after blas/lapack for lda/ldb
58 | */
59 | template
60 | void PosSoA2AoS(int nrows, int ncols, const T1* restrict iptr, int lda, T2* restrict out, int ldb)
61 | {
62 | const T1* restrict x = iptr;
63 | const T1* restrict y = iptr + lda;
64 | const T1* restrict z = iptr + 2 * lda;
65 | #if !defined(__ibmxl__)
66 | #pragma omp simd aligned(x, y, z)
67 | #endif
68 | for (int i = 0; i < nrows; ++i)
69 | {
70 | out[i * ldb] = x[i]; // out[i][0]=x[i];
71 | out[i * ldb + 1] = y[i]; // out[i][1]=y[i];
72 | out[i * ldb + 2] = z[i]; // out[i][2]=z[i];
73 | }
74 | }
75 |
76 | } // namespace qmcplusplus
77 | #endif
78 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Important Notice for qmcpack developers and end-users:
2 |
3 | i) The original programs developed by Jeongnim Kim and her collaborators
4 | are distributed under UIUC/NCSA Open Source License (below).
5 |
6 | ii) Some packages/features are not available under open source license and require
7 | separate license agreements with the authors. Contact the responsible authors.
8 |
9 | iii) autoconf/automake scripts are distributed under GPL (see COPYING).
10 |
11 | iv) The sources derived from any package distributed under GPL contain
12 | explicit acknowledgments of the original works and are distributed under GPL.
13 |
14 | -------------
15 | University of Illinois/NCSA Open Source License
16 |
17 | Copyright (c) 2003, University of Illinois Board of Trustees.
18 | All rights reserved.
19 |
20 | Developed by:
21 | Jeongnim Kim
22 | Condensed Matter Physics,
23 | National Center for Supercomputing Applications, University of Illinois
24 | Materials computation Center, University of Illinois
25 | http://www.mcc.uiuc.edu/qmc/
26 |
27 | Permission is hereby granted, free of charge, to any person obtaining a
28 | copy of this software and associated documentation files (the
29 | ``Software''), to deal with the Software without restriction, including
30 | without limitation the rights to use, copy, modify, merge, publish,
31 | distribute, sublicense, and/or sell copies of the Software, and to
32 | permit persons to whom the Software is furnished to do so, subject to
33 | the following conditions:
34 |
35 | * Redistributions of source code must retain the above copyright
36 | notice, this list of conditions and the following disclaimers.
37 | * Redistributions in binary form must reproduce the above copyright
38 | notice, this list of conditions and the following disclaimers in
39 | the documentation and/or other materials provided with the
40 | distribution.
41 | * Neither the names of the NCSA, the MCC, the University of Illinois,
42 | nor the names of its contributors may be used to endorse or promote
43 | products derived from this Software without specific prior written
44 | permission.
45 |
46 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
47 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
49 | THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
50 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
51 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
52 | OTHER DEALINGS WITH THE SOFTWARE.
53 |
--------------------------------------------------------------------------------
/src/Drivers/tests/test_MiniQMCOptions.cpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2019 QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
9 | //
10 | // File created by:
11 | // Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
12 | ////////////////////////////////////////////////////////////////////////////////
13 |
14 | #include
15 | #include
16 | #include "catch.hpp"
17 | #include "Drivers/MiniQMCOptions.h"
18 |
19 | /** @file
20 | *
21 | * For now we omit testing help and version output
22 | */
23 |
24 | namespace qmcplusplus
25 | {
26 |
27 | TEST_CASE("MiniQMCOptions Read", "[Application]") {
28 | int argc = 28;
29 | std::vector opt_strs = {"dummy_progname",
30 | "-a","256",
31 | "-b",
32 | "-c","8",
33 | "-g","2 1 3",
34 | "-j",
35 | "-m","256",
36 | "-n","10",
37 | "-N","1",
38 | "-r","0.75",
39 | "-s","140",
40 | "-t","fine",
41 | "-v",
42 | "-w","200",
43 | "-C","10",
44 | "-x","1.7"
45 | };
46 |
47 | std::vector option_ptrs;
48 | option_ptrs.reserve(argc + 1);
49 | std::transform(begin(opt_strs), end(opt_strs),
50 | std::back_inserter(option_ptrs),
51 | [](std::string& s) { char * ptr = new char[s.length() + 1];
52 | std::strcpy(ptr, s.c_str() );
53 | return ptr;});
54 | option_ptrs.push_back(nullptr);
55 | MiniQMCOptions mq_opt = readOptions(argc, option_ptrs.data());
56 | REQUIRE(mq_opt.valid);
57 | std::for_each(begin(option_ptrs), end(option_ptrs),
58 | [](char* c) { delete[] c; });
59 | REQUIRE(mq_opt.splines_per_block == 256);
60 | REQUIRE(mq_opt.useRef);
61 | REQUIRE(mq_opt.crowd_size == 8);
62 | REQUIRE(mq_opt.num_crowds == 10);
63 | REQUIRE(mq_opt.na == 2);
64 | REQUIRE(mq_opt.nb == 1);
65 | REQUIRE(mq_opt.nc == 3);
66 | REQUIRE(mq_opt.enableJ3);
67 | REQUIRE(mq_opt.nx == 256 * 37); // PD: yes this 37 is hard coded into the options
68 | REQUIRE(mq_opt.ny == 256 * 37); // I carried it over from miniqmc_sync_move.cpp
69 | REQUIRE(mq_opt.nz == 256 * 37);
70 | REQUIRE(mq_opt.nsteps == 10);
71 | REQUIRE(mq_opt.nsubsteps == 1);
72 | REQUIRE(mq_opt.accept_ratio == 0.75);
73 | REQUIRE(mq_opt.iseed == 140);
74 | REQUIRE(mq_opt.timer_level_name == "fine");
75 | REQUIRE(mq_opt.verbose);
76 | REQUIRE(mq_opt.walkers_per_rank == 200);
77 | REQUIRE(mq_opt.Rmax == ValueApprox(1.7));
78 |
79 |
80 | }
81 |
82 | }
83 |
84 |
--------------------------------------------------------------------------------
/src/Particle/tests/test_particle.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2019 QMCPACK developers.
6 | //
7 | // File developed by: Mark Dewing, markdewing@gmail.com, University of Illinois at Urbana-Champaign
8 | //
9 | // File created by: Mark Dewing, markdewing@gmail.com, University of Illinois at Urbana-Champaign
10 | //////////////////////////////////////////////////////////////////////////////////////
11 |
12 |
13 | #include
14 | #include
15 |
16 | #include "catch.hpp"
17 |
18 | #include "Utilities/Configuration.h"
19 | #include "Numerics/OhmmsPETE/OhmmsMatrix.h"
20 | #include "Numerics/OhmmsPETE/TinyVector.h"
21 | #include "Particle/Lattice/CrystalLattice.h"
22 | #include "Particle/Lattice/ParticleBConds.h"
23 | #include "Particle/ParticleSet.h"
24 | #include "Particle/DistanceTable.h"
25 | #include "Particle/DistanceTableData.h"
26 |
27 | using std::string;
28 |
29 | namespace qmcplusplus
30 | {
31 | TEST_CASE("symmetric_distance_table PBC", "[particle]")
32 | {
33 | ParticleSet source;
34 |
35 | CrystalLattice grid;
36 | grid.BoxBConds = true; // periodic
37 | grid.R = ParticleSet::Tensor_t(6.74632230, 6.74632230, 0.00000000, 0.00000000, 3.37316115, 3.37316115, 3.37316115,
38 | 0.00000000, 3.37316115);
39 | grid.reset();
40 |
41 | source.setName("electrons");
42 | source.Lattice.set(grid);
43 |
44 | source.create(4);
45 | source.R[0] = ParticleSet::PosType(0.00000000, 0.00000000, 0.00000000);
46 | source.R[1] = ParticleSet::PosType(1.68658058, 1.68658058, 1.68658058);
47 | source.R[2] = ParticleSet::PosType(3.37316115, 3.37316115, 0.00000000);
48 | source.R[3] = ParticleSet::PosType(5.05974172, 5.05974172, 1.68658058);
49 |
50 | int TableID = source.addTable(source, DT_SOA);
51 | source.update();
52 |
53 | REQUIRE(source.DistTables[TableID]->Distances[1][2] == Approx(2.9212432441));
54 | REQUIRE(source.DistTables[TableID]->Distances[2][1] == Approx(2.9212432441));
55 | REQUIRE(source.DistTables[TableID]->Displacements[1][2][0] == Approx(1.68658057));
56 | REQUIRE(source.DistTables[TableID]->Displacements[1][2][1] == Approx(1.68658057));
57 | REQUIRE(source.DistTables[TableID]->Displacements[1][2][2] == Approx(-1.68658058));
58 | REQUIRE(source.DistTables[TableID]->Displacements[2][1][0] == Approx(-1.68658057));
59 | REQUIRE(source.DistTables[TableID]->Displacements[2][1][1] == Approx(-1.68658057));
60 | REQUIRE(source.DistTables[TableID]->Displacements[2][1][2] == Approx(1.68658057));
61 | }
62 |
63 | } // namespace qmcplusplus
64 |
--------------------------------------------------------------------------------
/testing/nightly_scripts/nightly_anl_bora.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Setup for bora.alcf.anl.gov
4 | #
5 | # Run the nightlies
6 | #
7 |
8 | source /etc/profile.d/z00_lmod.sh
9 | if [ -d /scratch/packages/modulefiles ]; then
10 | module use /scratch/packages/modulefiles
11 | fi
12 |
13 | module purge
14 | module load cmake intel/18.3 intel-mkl llvm/dev-latest
15 |
16 | export TEST_SITE_NAME=bora.alcf.anl.gov
17 | export N_PROCS_BUILD=24
18 | export N_PROCS=32
19 |
20 | # run on the 1st socket
21 | NUMA_ID=0
22 |
23 | #Must be an absolute path
24 | place=/scratch/MINIQMC_CI_BUILDS_DO_NOT_REMOVE
25 |
26 | if [ ! -e $place ]; then
27 | mkdir $place
28 | fi
29 |
30 | if [ -e $place ]; then
31 | cd $place
32 |
33 | echo --- Hostname --- $HOSTNAME
34 | echo --- Checkout for $sys `date`
35 |
36 | branch=OMP_offload
37 | entry=miniqmc-${branch}
38 |
39 | if [ ! -e $entry ]; then
40 | echo --- Cloning miniQMC git `date`
41 | git clone https://github.com/QMCPACK/miniqmc.git $entry
42 | else
43 | echo --- Updating local miniQMC git `date`
44 | cd $entry
45 | git pull
46 | cd ..
47 | fi
48 |
49 | if [ -e $entry/CMakeLists.txt ]; then
50 | cd $entry
51 |
52 | git checkout $branch
53 |
54 | for sys in Clang-Real Clang-Real-Mixed Clang-Offload-Real Clang-Offload-Real-Mixed Intel-Real Intel-Real-Mixed Clang-Nightly-Offload-Real
55 | do
56 |
57 | folder=build_$sys
58 |
59 | if [ -e $folder ]; then
60 | rm -r $folder
61 | fi
62 | mkdir $folder
63 | cd $folder
64 |
65 | echo --- Building for $sys `date`
66 |
67 | # create log file folder if not exist
68 | mydate=`date +%y_%m_%d`
69 | if [ ! -e $place/log/$entry/$mydate ];
70 | then
71 | mkdir -p $place/log/$entry/$mydate
72 | fi
73 |
74 | if [[ $sys == *"Intel"* ]]; then
75 | module load llvm/dev-latest
76 | CTEST_FLAGS="-DCMAKE_CXX_COMPILER=icpc;-DCMAKE_CXX_FLAGS=-xCOMMON-AVX512"
77 | elif [[ $sys == *"Clang"* ]]; then
78 | if [[ $sys == *"Nightly"* ]]; then
79 | module load llvm/dev-latest
80 | else
81 | module load llvm/master-nightly
82 | fi
83 | CTEST_FLAGS="-DCMAKE_CXX_COMPILER=clang++"
84 | fi
85 |
86 | if [[ $sys == *"Offload"* ]]; then
87 | CTEST_FLAGS="$CTEST_FLAGS;-DENABLE_OFFLOAD=1;-DUSE_OBJECT_TARGET=ON"
88 | fi
89 |
90 | if [[ $sys == *"Complex"* ]]; then
91 | CTEST_FLAGS="$CTEST_FLAGS;-DQMC_COMPLEX=1"
92 | fi
93 |
94 | if [[ $sys == *"-Mixed"* ]]; then
95 | CTEST_FLAGS="$CTEST_FLAGS;-DQMC_MIXED_PRECISION=1"
96 | fi
97 |
98 | export MINIQMC_TEST_SUBMIT_NAME=${sys}-Release
99 |
100 | numactl -N $NUMA_ID \
101 | ctest -DCMAKE_CONFIGURE_OPTIONS=$CTEST_FLAGS -S $PWD/../CMake/ctest_script.cmake -VV --timeout 800 &> $place/log/$entry/$mydate/${MINIQMC_TEST_SUBMIT_NAME}.log
102 |
103 | cd ..
104 | echo --- Finished $sys `date`
105 | done
106 |
107 | else
108 | echo "ERROR: No CMakeLists. Bad git clone."
109 | exit 1
110 | fi
111 |
112 | else
113 | echo "ERROR: No directory $place"
114 | exit 1
115 | fi
116 |
--------------------------------------------------------------------------------
/src/Utilities/SIMD/Mallocator.hpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source License.
3 | // See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 | //
9 | // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 | //////////////////////////////////////////////////////////////////////////////////////
11 | // -*- C++ -*-
12 | /** @file Mallocator.hpp
13 | */
14 | #ifndef QMCPLUSPLUS_ALIGNED_ALLOCATOR_H
15 | #define QMCPLUSPLUS_ALIGNED_ALLOCATOR_H
16 |
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | namespace qmcplusplus
23 | {
24 | template
25 | struct Mallocator
26 | {
27 | typedef T value_type;
28 | typedef size_t size_type;
29 | typedef T* pointer;
30 | typedef const T* const_pointer;
31 |
32 | Mallocator() = default;
33 | template
34 | Mallocator(const Mallocator&)
35 | {}
36 |
37 | template
38 | struct rebind
39 | {
40 | typedef Mallocator other;
41 | };
42 |
43 | T* allocate(std::size_t n)
44 | {
45 | void* pt(nullptr);
46 | std::size_t asize = n * sizeof(T);
47 | std::size_t amod = asize % ALIGN;
48 | if (amod != 0)
49 | asize += ALIGN - amod;
50 |
51 | #if __STDC_VERSION__ >= 201112L || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)
52 | // as per C11 standard asize must be an integral multiple of ALIGN
53 | // or behavior is undefined. Some implementations support all positive
54 | // values of asize but the standard has not been amended
55 | // This is also not guaranteed threadsafe until it appeared in
56 | // the C++17 standard.
57 | pt = aligned_alloc(ALIGN, asize);
58 | #else
59 | // While posix memalign can deal with asize violating the C11 standard
60 | // assumptions made later by our simd code namely copyn require allocation
61 | // of the entire aligned block to avoid heap buffer read overflows later
62 | posix_memalign(&pt, ALIGN, asize);
63 | #endif
64 | if (pt == nullptr)
65 | throw std::runtime_error("Allocation failed in Mallocator, requested size in bytes = " +
66 | std::to_string(n * sizeof(T)));
67 | return static_cast(pt);
68 | }
69 |
70 | void deallocate(T* p, std::size_t) { free(p); }
71 | };
72 |
73 | template
74 | bool operator==(const Mallocator&, const Mallocator&)
75 | {
76 | return ALIGN1 == ALIGN2;
77 | }
78 | template
79 | bool operator!=(const Mallocator&, const Mallocator&)
80 | {
81 | return ALIGN1 != ALIGN2;
82 | }
83 | } // namespace qmcplusplus
84 |
85 | #endif
86 |
--------------------------------------------------------------------------------
/src/Particle/DistanceTableAB.cpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Ken Esler, kpesler@gmail.com,
9 | // University of Illinois at Urbana-Champaign
10 | // Jeremy McMinnis, jmcminis@gmail.com,
11 | // University of Illinois at Urbana-Champaign
12 | // Jeongnim Kim, jeongnim.kim@gmail.com,
13 | // University of Illinois at Urbana-Champaign
14 | // Jaron T. Krogel, krogeljt@ornl.gov,
15 | // Oak Ridge National Laboratory
16 | // Mark A. Berrill, berrillma@ornl.gov,
17 | // Oak Ridge National Laboratory
18 | //
19 | // File created by:
20 | // Jeongnim Kim, jeongnim.kim@gmail.com,
21 | // University of Illinois at Urbana-Champaign
22 | ////////////////////////////////////////////////////////////////////////////////
23 |
24 | #include "Particle/DistanceTable.h"
25 | #include "Particle/DistanceTableData.h"
26 | #include "Particle/Lattice/ParticleBConds.h"
27 | #include "Utilities/SIMD/algorithm.hpp"
28 | #include "Particle/DistanceTableBA.h"
29 |
30 | namespace qmcplusplus
31 | {
32 | /** Adding AsymmetricDTD to the list, e.g., el-el distance table
33 | *\param s source/target particle set
34 | *\return index of the distance table with the name
35 | */
36 | DistanceTableData* createDistanceTable(const ParticleSet& s, ParticleSet& t, int dt_type)
37 | {
38 | typedef OHMMS_PRECISION RealType;
39 | enum
40 | {
41 | DIM = OHMMS_DIM
42 | };
43 | DistanceTableData* dt = 0;
44 | int sc = t.Lattice.SuperCellEnum;
45 | std::ostringstream o;
46 | o << " Distance table for AB: source = " << s.getName() << " target = " << t.getName() << "\n";
47 | if (sc == SUPERCELL_BULK)
48 | {
49 | o << " Using SoaDistanceTableBA of SoA layout " << PPPG << std::endl;
50 | dt = new DistanceTableBA(s, t);
51 | o << " Setting Rmax = " << s.Lattice.SimulationCellRadius;
52 | }
53 | else
54 | {
55 | APP_ABORT("DistanceTableData::createDistanceTable Slab/Wire/Open boundary "
56 | "conditions are disabled in miniQMC!\n");
57 | }
58 |
59 | // set dt properties
60 | dt->CellType = sc;
61 | dt->DTType = DT_SOA;
62 | std::ostringstream p;
63 | p << s.getName() << "_" << t.getName();
64 | dt->Name = p.str(); // assign the table name
65 |
66 | o << " using Cartesian coordinates";
67 | if (omp_get_thread_num() == 0)
68 | {
69 | app_log() << o.str() << std::endl;
70 | app_log().flush();
71 | }
72 | return dt;
73 | }
74 |
75 | } // namespace qmcplusplus
76 | /***************************************************************************
77 | * $RCSfile$ $Author$
78 | * $Revision$ $Date$
79 | * $Id$
80 | ***************************************************************************/
81 |
--------------------------------------------------------------------------------
/src/Drivers/MiniQMCOptions.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2019 QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
9 | //
10 | // File created by:
11 | // Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
12 | ////////////////////////////////////////////////////////////////////////////////
13 |
14 | #ifndef QMCPLUSPLUS_MINIQMC_OPTIONS_H
15 | #define QMCPLUSPLUS_MINIQMC_OPTIONS_H
16 |
17 | #include
18 | #include
19 | #include
20 | #include "Utilities/qmcpack_version.h"
21 | #include "Utilities/NewTimer.h"
22 |
23 | namespace qmcplusplus
24 | {
25 | enum MiniQMCTimers
26 | {
27 | Timer_Total,
28 | Timer_Init,
29 | Timer_Diffusion,
30 | Timer_ECP,
31 | Timer_Value,
32 | Timer_evalGrad,
33 | Timer_evalVGH,
34 | Timer_ratioGrad,
35 | Timer_Update,
36 | };
37 |
38 | /** Reads and holds the options to support more flexible non 'c main()' drivers
39 | *
40 | */
41 | class MiniQMCOptions
42 | {
43 | public:
44 | TimerNameList_t MiniQMCTimerNames{
45 | {Timer_Total, "Total"},
46 | {Timer_Init, "Initialization"},
47 | {Timer_Diffusion, "Diffusion"},
48 | {Timer_ECP, "Pseudopotential"},
49 | {Timer_Value, "Value"},
50 | {Timer_evalGrad, "Current Gradient"},
51 | {Timer_evalVGH, "Spline Hessian Evaluation"},
52 | {Timer_ratioGrad, "New Gradient"},
53 | {Timer_Update, "Update"},
54 | };
55 |
56 | static void print_help();
57 |
58 | using QMCT = QMCTraits;
59 | //Devices device = Devices::CPU;
60 | bool valid = true;
61 | //int device_number = 0;
62 | int na = 1;
63 | int nb = 1;
64 | int nc = 1;
65 | int nsteps = 5;
66 | int iseed = 11;
67 | int nx = 37, ny = 37, nz = 37;
68 | int num_crowds = 1;
69 | int splines_per_block = -1;
70 | int nsubsteps = 1;
71 | int nels = 0;
72 | // Set cutoff for NLPP use.
73 | // This makes precision an issue to select at run time.
74 | QMCT::RealType Rmax = 1.7;
75 | QMCT::RealType accept_ratio = 0.5;
76 | //useRef is a particular implementation of numerous objects fix that remove this option
77 | //and many branch statements
78 | bool useRef = false;
79 | bool enableJ3 = false;
80 | bool enableCrowd = false;
81 | bool verbose = false;
82 | std::string timer_level_name = "fine";
83 | TimerList_t Timers;
84 | int crowd_size = 1;
85 | int walkers_per_rank = 0;
86 | MiniQMCOptions() = default;
87 | MiniQMCOptions(const MiniQMCOptions&) = default;
88 | };
89 |
90 | MiniQMCOptions readOptions(int argc,char** argv);
91 |
92 | } // namespace qmcplusplus
93 |
94 | #endif
95 |
--------------------------------------------------------------------------------
/CMake/ClangCompilers.cmake:
--------------------------------------------------------------------------------
1 | # Check compiler version
2 | IF ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.3 )
3 | MESSAGE(STATUS "Compiler Version ${CMAKE_CXX_COMPILER_VERSION}")
4 | MESSAGE(FATAL_ERROR "Requires clang 3.3 or higher ")
5 | ENDIF()
6 |
7 | # Enable OpenMP
8 | IF(QMC_OMP)
9 | SET(ENABLE_OPENMP 1)
10 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
11 | ENDIF(QMC_OMP)
12 |
13 | # Set clang specfic flags (which we always want)
14 | ADD_DEFINITIONS( -Drestrict=__restrict__ )
15 |
16 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer -fstrict-aliasing -D__forceinline=inline")
17 | SET( HAVE_POSIX_MEMALIGN 0 ) # Clang doesn't support -malign-double
18 |
19 | # Set extra optimization specific flags
20 | SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math" )
21 | SET( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -ffast-math" )
22 |
23 | #--------------------------------------
24 | # Special architectural flags
25 | #--------------------------------------
26 | # case arch
27 | # x86_64: -march
28 | # powerpc: -mpcu
29 | # arm: -mpcu
30 | # default or cray: none
31 | #--------------------------------------
32 | IF($ENV{CRAYPE_VERSION} MATCHES ".")
33 | # It's a cray machine. Don't do anything
34 | ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
35 | # the case for x86_64
36 | #check if the user has already specified -march=XXXX option for cross-compiling.
37 | if(NOT CMAKE_CXX_FLAGS MATCHES "-march=")
38 | # use -march=native
39 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
40 | endif(NOT CMAKE_CXX_FLAGS MATCHES "-march=")
41 | ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
42 | # the case for PowerPC and ARM
43 | #check if the user has already specified -mcpu=XXXX option for cross-compiling.
44 | if(NOT CMAKE_CXX_FLAGS MATCHES "-mcpu=")
45 | # use -mcpu=native
46 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
47 | endif(NOT CMAKE_CXX_FLAGS MATCHES "-mcpu=")
48 | ENDIF()
49 |
50 | # Add static flags if necessary
51 | IF(QMC_BUILD_STATIC)
52 | SET(CMAKE_CXX_LINK_FLAGS " -static")
53 | ENDIF(QMC_BUILD_STATIC)
54 |
55 | # Coverage
56 | IF (ENABLE_GCOV)
57 | SET(GCOV_COVERAGE TRUE)
58 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
59 | SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
60 | SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
61 | ENDIF(ENABLE_GCOV)
62 |
63 | SET(XRAY_PROFILE FALSE CACHE BOOL "Use llvm xray profiling")
64 | SET(XRAY_INSTRUCTION_THRESHOLD 200 CACHE STRING "Instruction threshold for xray instrumentation")
65 |
66 | IF(XRAY_PROFILE)
67 | set(XRAY_FLAGS "-fxray-instrument -fxray-instruction-threshold=${XRAY_INSTRUCTION_THRESHOLD}")
68 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XRAY_FLAGS}")
69 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XRAY_FLAGS}")
70 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${XRAY_FLAGS}")
71 | ENDIF(XRAY_PROFILE)
72 |
--------------------------------------------------------------------------------
/external_codes/catch/log_complex_approx.hpp:
--------------------------------------------------------------------------------
1 | #ifndef CATCH_LOG_COMPLEX_APPROX
2 | #define CATCH_LOG_COMPLEX_APPROX
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | // Copy and modify the ComplexApprox class to handle complex numbers for log(complex)
9 |
10 | namespace Catch {
11 | namespace Detail {
12 | class LogComplexApprox
13 | {
14 | std::complex m_value;
15 | double m_epsilon;
16 |
17 | public:
18 |
19 | LogComplexApprox(const std::complex &value) : m_value(value) {
20 | init_epsilon();
21 | }
22 |
23 | LogComplexApprox(const std::complex &value) : m_value(value) {
24 | init_epsilon();
25 | }
26 |
27 | LogComplexApprox(const double &value) : m_value(value) {
28 | init_epsilon();
29 | }
30 |
31 | LogComplexApprox(const float &value) : m_value(value) {
32 | init_epsilon();
33 | }
34 |
35 | void init_epsilon() {
36 | // Copied from catch.hpp - would be better to copy it from Approx object
37 | m_epsilon = std::numeric_limits::epsilon()*100;
38 | }
39 |
40 | LogComplexApprox& epsilon(double new_epsilon)
41 | {
42 | m_epsilon = new_epsilon;
43 | return *this;
44 | }
45 |
46 | double epsilon() const
47 | {
48 | return m_epsilon;
49 | }
50 |
51 | friend bool operator == (std::complex const& lhs, LogComplexApprox const& rhs)
52 | {
53 | return std::exp(lhs) == ComplexApprox(std::exp(rhs.m_value)).epsilon(rhs.m_epsilon);
54 | }
55 |
56 | friend bool operator == (std::complex const& lhs, LogComplexApprox const& rhs)
57 | {
58 | return std::exp(lhs) == ComplexApprox(std::exp(rhs.m_value)).epsilon(rhs.m_epsilon);
59 | }
60 |
61 | friend bool operator == (LogComplexApprox const &lhs, std::complex const& rhs)
62 | {
63 | return operator==( rhs, lhs );
64 | }
65 |
66 | friend bool operator == (LogComplexApprox const &lhs, std::complex const& rhs)
67 | {
68 | return operator==( rhs, lhs );
69 | }
70 |
71 | std::string toString() const {
72 | std::ostringstream oss;
73 | oss <<"LogComplexApprox( " << ::Catch::Detail::stringify(m_value) << " )";
74 | return oss.str();
75 | }
76 |
77 | friend std::ostream& operator << ( std::ostream& os, LogComplexApprox const& ca )
78 | {
79 | os << ca.toString();
80 | return os;
81 | }
82 | };
83 | }
84 |
85 | template<>
86 | struct StringMaker {
87 | static std::string convert(Catch::Detail::LogComplexApprox const &value);
88 | };
89 |
90 | #ifdef CATCH_IMPL
91 | std::string StringMaker::convert(Catch::Detail::LogComplexApprox const& value)
92 | {
93 | return value.toString();
94 | }
95 | #endif
96 | }
97 |
98 | using Catch::Detail::LogComplexApprox;
99 |
100 | #endif
101 |
--------------------------------------------------------------------------------
/src/Particle/DistanceTableAA.cpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // This file is distributed under the University of Illinois/NCSA Open Source
3 | // License. See LICENSE file in top directory for details.
4 | //
5 | // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 | //
7 | // File developed by:
8 | // Ken Esler, kpesler@gmail.com,
9 | // University of Illinois at Urbana-Champaign
10 | // Jeremy McMinnis, jmcminis@gmail.com,
11 | // University of Illinois at Urbana-Champaign
12 | // Jeongnim Kim, jeongnim.kim@gmail.com,
13 | // University of Illinois at Urbana-Champaign
14 | // Jaron T. Krogel, krogeljt@ornl.gov,
15 | // Oak Ridge National Laboratory
16 | // Mark A. Berrill, berrillma@ornl.gov,
17 | // Oak Ridge National Laboratory
18 | //
19 | // File created by:
20 | // Jeongnim Kim, jeongnim.kim@gmail.com,
21 | // University of Illinois at Urbana-Champaign
22 | ////////////////////////////////////////////////////////////////////////////////
23 |
24 | #include "Particle/DistanceTable.h"
25 | #include "Particle/DistanceTableData.h"
26 | #include "Particle/Lattice/ParticleBConds.h"
27 | #include "Particle/DistanceTableAA.h"
28 |
29 | namespace qmcplusplus
30 | {
31 | /** Adding SymmetricDTD to the list, e.g., el-el distance table
32 | *\param s source/target particle set
33 | *\return index of the distance table with the name
34 | */
35 | DistanceTableData* createDistanceTable(ParticleSet& s, int dt_type)
36 | {
37 | typedef OHMMS_PRECISION RealType;
38 | enum
39 | {
40 | DIM = OHMMS_DIM
41 | };
42 | int sc = s.Lattice.SuperCellEnum;
43 | DistanceTableData* dt = 0;
44 | std::ostringstream o;
45 | bool useSoA = (dt_type == DT_SOA || dt_type == DT_SOA_PREFERRED);
46 | o << " Distance table for AA: source/target = " << s.getName() << " useSoA =" << useSoA << "\n";
47 | if (sc == SUPERCELL_BULK)
48 | {
49 | o << " Using SoaDistanceTableAA of SoA layout " << PPPG << std::endl;
50 | dt = new DistanceTableAA(s);
51 | o << "\n Setting Rmax = " << s.Lattice.SimulationCellRadius;
52 | }
53 | else
54 | {
55 | APP_ABORT("DistanceTableData::createDistanceTable Slab/Wire/Open boundary "
56 | "conditions are disabled in miniQMC!\n");
57 | }
58 |
59 | // set dt properties
60 | dt->CellType = sc;
61 | dt->DTType = DT_SOA;
62 | std::ostringstream p;
63 | p << s.getName() << "_" << s.getName();
64 | dt->Name = p.str(); // assign the table name
65 |
66 | o << " using Cartesian coordinates";
67 | if (omp_get_thread_num() == 0)
68 | {
69 | app_log() << o.str() << std::endl;
70 | app_log().flush();
71 | }
72 |
73 | return dt;
74 | }
75 |
76 | } // namespace qmcplusplus
77 | /***************************************************************************
78 | * $RCSfile$ $Author$
79 | * $Revision$ $Date$
80 | * $Id$
81 | ***************************************************************************/
82 |
--------------------------------------------------------------------------------
/src/Numerics/Einspline/bspline_structs.h:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////////////
2 | // einspline: a library for creating and evaluating B-splines //
3 | // Copyright (C) 2007 Kenneth P. Esler, Jr. //
4 | // //
5 | // This program is free software; you can redistribute it and/or modify //
6 | // it under the terms of the GNU General Public License as published by //
7 | // the Free Software Foundation; either version 2 of the License, or //
8 | // (at your option) any later version. //
9 | // //
10 | // This program is distributed in the hope that it will be useful, //
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of //
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13 | // GNU General Public License for more details. //
14 | // //
15 | // You should have received a copy of the GNU General Public License //
16 | // along with this program; if not, write to the Free Software //
17 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, //
18 | // Boston, MA 02110-1301 USA //
19 | /////////////////////////////////////////////////////////////////////////////
20 |
21 | #ifndef BSPLINE_STRUCTS_STD_H
22 | #define BSPLINE_STRUCTS_STD_H
23 | #include