Loading CMakeLists.txt +7 −6 Original line number Diff line number Diff line Loading @@ -148,6 +148,7 @@ set(DCA_LIBS ctaux ctint ss_ct_hyb g0_interpolation function_transform gaussian_quadrature nfft Loading Loading @@ -230,12 +231,12 @@ if (DCA_WITH_TESTS_FAST OR DCA_WITH_TESTS_EXTENSIVE OR DCA_WITH_TESTS_STOCHASTI DCA_WITH_TESTS_PERFORMANCE) include(dca_testing) if (((CMAKE_BUILD_TYPE STREQUAL "Release") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") OR (CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")) AND (DCA_WITH_TESTS_FAST OR DCA_WITH_TESTS_EXTENSIVE)) message(WARNING "Tests are built with NDEBUG defined!") endif() # if (((CMAKE_BUILD_TYPE STREQUAL "Release") OR # (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") OR # (CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")) AND # (DCA_WITH_TESTS_FAST OR DCA_WITH_TESTS_EXTENSIVE)) # message(WARNING "Tests are built with NDEBUG defined!") # endif() set(BENCHMARK_ENABLE_TESTING OFF) add_subdirectory(${gtest_dir}) Loading applications/dca/main_dca.cpp +38 −29 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ #include <iostream> #include "dca/config/dca.hpp" #include "dca/application/dca_loop_dispatch.hpp" #include "dca/config/cmake_options.hpp" Loading @@ -26,12 +25,7 @@ #include "dca/util/signal_handler.hpp" #include "dca/io/writer.hpp" int main(int argc, char** argv) { if (argc < 2) { std::cerr << "Usage: " << argv[0] << " input_file.json" << std::endl; return -1; } int dca_main(int argc, char** argv) { Concurrency concurrency(argc, argv); try { Loading Loading @@ -75,6 +69,7 @@ int main(int argc, char** argv) { parameters.update_domains(); dca::DistType distribution = parameters.get_g4_distribution(); { switch (distribution) { #ifdef DCA_HAVE_MPI case dca::DistType::BLOCKED: { Loading @@ -84,7 +79,8 @@ int main(int argc, char** argv) { #else case dca::DistType::BLOCKED: { throw std::runtime_error( "Input calls for function Blocked distribution but DCA is only supports this with MPI."); "Input calls for function Blocked distribution but DCA is only supports this with " "MPI."); } break; #endif #ifdef DCA_HAVE_MPI Loading @@ -95,7 +91,8 @@ int main(int argc, char** argv) { #else case dca::DistType::LINEAR: { throw std::runtime_error( "Input calls for function Linear distribution but DCA is only supports this with MPI."); "Input calls for function Linear distribution but DCA is only supports this with " "MPI."); } break; #endif case dca::DistType::NONE: { Loading @@ -104,10 +101,22 @@ int main(int argc, char** argv) { } break; } } } catch (const std::exception& err) { std::cout << "Unhandled exception in main function:\n\t" << err.what() << std::endl; concurrency.abort(); } return 0; } int main(int argc, char** argv) { if (argc < 2) { std::cerr << "Usage: " << argv[0] << " input_file.json" << std::endl; return -1; } return dca_main(argc, argv); } build-aux/spock_load_cray_modules.sh +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ module load cmake/3.21 # at least 3.21 is required for ROCM module load ninja module load magma/2.6.1 module load fftw module load cray-hdf5/1.12.0.6 module load cray-hdf5/1.12.0.7 module load cray-fftw/3.3.8.10 module load cray-libsci/21.06.1.1 module load cray-mpich/8.1.7 Loading cmake/dca_external_libs.cmake +14 −7 Original line number Diff line number Diff line Loading @@ -9,6 +9,9 @@ set(DCA_EXTERNAL_LIBS "" CACHE INTERNAL "") set(DCA_EXTERNAL_INCLUDE_DIRS "" CACHE INTERNAL "") set(DCA_EXTERNAL_IO_LIBS "" CACHE INTERNAL "") set(DCA_EXTERNAL_IO_INCLUDE_DIRS "" CACHE INTERNAL "") ################################################################################ # Lapack if (NOT DCA_HAVE_LAPACK) Loading Loading @@ -39,10 +42,11 @@ list(APPEND DCA_EXTERNAL_LIBS ${LAPACK_LIBRARIES}) ################################################################################ # HDF5 find_package(HDF5 COMPONENTS C CXX) list(APPEND DCA_EXTERNAL_LIBS ${HDF5_CXX_LIBRARIES}) list(APPEND DCA_EXTERNAL_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${HDF5_INCLUDE_DIR}) find_package(HDF5 REQUIRED COMPONENTS C CXX) # append the library target not HDF_LIBRARIES, in modern cmake you need the target. # on spock this is all that will work with cray's hdf5 list(APPEND DCA_EXTERNAL_IO_LIBS hdf5::hdf5_cpp) ################################################################################ # ADIOS2 Loading @@ -50,8 +54,8 @@ if (DCA_WITH_ADIOS2) set(DCA_HAVE_ADIOS2 FALSE CACHE INTERNAL "") find_package(ADIOS2) if (ADIOS2_FOUND) list(APPEND DCA_EXTERNAL_LIBS ${ADIOS2_LIBRARIES}) list(APPEND DCA_EXTERNAL_INCLUDE_DIRS ${ADIOS2_INCLUDE_DIRS}) list(APPEND DCA_EXTERNAL_IO_LIBS ${ADIOS2_LIBRARIES}) list(APPEND DCA_EXTERNAL_IO_INCLUDE_DIRS ${ADIOS2_INCLUDE_DIRS}) set(DCA_HAVE_ADIOS2 TRUE CACHE INTERNAL "") #message("ADIOS2: libraries ${ADIOS2_LIBRARIES}") endif() Loading @@ -76,5 +80,8 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/libs/simplex_gm_rule) list(APPEND DCA_EXTERNAL_LIBS ${GNUPLOT_INTERFACE_LIBRARY}) list(APPEND DCA_EXTERNAL_INCLUDE_DIRS ${GNUPLOT_INTERFACE_INCLUDE_DIR}) # message("DCA_EXTERNAL_LIBS = ${DCA_EXTERNAL_LIBS}") # message("DCA_EXTERNAL_INCLUDE_DIRS = ${DCA_EXTERNAL_INCLUDE_DIRS}") list(APPEND DCA_EXTERNAL_LIBS ${DCA_EXTERNAL_IO_LIBS}) list(APPEND DCA_EXTERNAL_INCLUDE_DIRS ${DCA_EXTERNAL_IO_INCLUDE_DIRS}) message("DCA_EXTERNAL_LIBS = ${DCA_EXTERNAL_LIBS}") message("DCA_EXTERNAL_INCLUDE_DIRS = ${DCA_EXTERNAL_INCLUDE_DIRS}") include/dca/application/dca_loop_dispatch.hpp +19 −17 Original line number Diff line number Diff line Loading @@ -20,30 +20,32 @@ template <dca::DistType DT> class DCALoopDispatch { public: void operator()(ParametersType& parameters, Concurrency& concurrency) { // Create and initialize the DCA data object. DcaDataType<DT> dca_data(parameters); dca_data.initialize(); DcaLoopType<DT> dca_loop(parameters, dca_data, concurrency); { Profiler profiler(__FUNCTION__, __FILE__, __LINE__); // Create and initialize the DCA data object. try { dca_loop.initialize(); } catch (const std::exception& exc) { } catch (const std::exception& exc) { std::cout << "unhandled exception in dca_loop.initialize(): " << exc.what() << std::endl; throw exc; } try { dca_loop.execute(); } catch (const std::exception& exc) { } catch (const std::exception& exc) { std::cout << "unhandled exception in dca_loop.execute(): " << exc.what() << std::endl; throw exc; } try { dca_loop.finalize(); Profiler::stop(concurrency, parameters.get_filename_profiling()); } catch (const std::exception& exc) { } catch (const std::exception& exc) { std::cout << "unhandled exception in dca_loop.execute(): " << exc.what() << std::endl; throw exc; } Loading Loading
CMakeLists.txt +7 −6 Original line number Diff line number Diff line Loading @@ -148,6 +148,7 @@ set(DCA_LIBS ctaux ctint ss_ct_hyb g0_interpolation function_transform gaussian_quadrature nfft Loading Loading @@ -230,12 +231,12 @@ if (DCA_WITH_TESTS_FAST OR DCA_WITH_TESTS_EXTENSIVE OR DCA_WITH_TESTS_STOCHASTI DCA_WITH_TESTS_PERFORMANCE) include(dca_testing) if (((CMAKE_BUILD_TYPE STREQUAL "Release") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") OR (CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")) AND (DCA_WITH_TESTS_FAST OR DCA_WITH_TESTS_EXTENSIVE)) message(WARNING "Tests are built with NDEBUG defined!") endif() # if (((CMAKE_BUILD_TYPE STREQUAL "Release") OR # (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") OR # (CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")) AND # (DCA_WITH_TESTS_FAST OR DCA_WITH_TESTS_EXTENSIVE)) # message(WARNING "Tests are built with NDEBUG defined!") # endif() set(BENCHMARK_ENABLE_TESTING OFF) add_subdirectory(${gtest_dir}) Loading
applications/dca/main_dca.cpp +38 −29 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ #include <iostream> #include "dca/config/dca.hpp" #include "dca/application/dca_loop_dispatch.hpp" #include "dca/config/cmake_options.hpp" Loading @@ -26,12 +25,7 @@ #include "dca/util/signal_handler.hpp" #include "dca/io/writer.hpp" int main(int argc, char** argv) { if (argc < 2) { std::cerr << "Usage: " << argv[0] << " input_file.json" << std::endl; return -1; } int dca_main(int argc, char** argv) { Concurrency concurrency(argc, argv); try { Loading Loading @@ -75,6 +69,7 @@ int main(int argc, char** argv) { parameters.update_domains(); dca::DistType distribution = parameters.get_g4_distribution(); { switch (distribution) { #ifdef DCA_HAVE_MPI case dca::DistType::BLOCKED: { Loading @@ -84,7 +79,8 @@ int main(int argc, char** argv) { #else case dca::DistType::BLOCKED: { throw std::runtime_error( "Input calls for function Blocked distribution but DCA is only supports this with MPI."); "Input calls for function Blocked distribution but DCA is only supports this with " "MPI."); } break; #endif #ifdef DCA_HAVE_MPI Loading @@ -95,7 +91,8 @@ int main(int argc, char** argv) { #else case dca::DistType::LINEAR: { throw std::runtime_error( "Input calls for function Linear distribution but DCA is only supports this with MPI."); "Input calls for function Linear distribution but DCA is only supports this with " "MPI."); } break; #endif case dca::DistType::NONE: { Loading @@ -104,10 +101,22 @@ int main(int argc, char** argv) { } break; } } } catch (const std::exception& err) { std::cout << "Unhandled exception in main function:\n\t" << err.what() << std::endl; concurrency.abort(); } return 0; } int main(int argc, char** argv) { if (argc < 2) { std::cerr << "Usage: " << argv[0] << " input_file.json" << std::endl; return -1; } return dca_main(argc, argv); }
build-aux/spock_load_cray_modules.sh +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ module load cmake/3.21 # at least 3.21 is required for ROCM module load ninja module load magma/2.6.1 module load fftw module load cray-hdf5/1.12.0.6 module load cray-hdf5/1.12.0.7 module load cray-fftw/3.3.8.10 module load cray-libsci/21.06.1.1 module load cray-mpich/8.1.7 Loading
cmake/dca_external_libs.cmake +14 −7 Original line number Diff line number Diff line Loading @@ -9,6 +9,9 @@ set(DCA_EXTERNAL_LIBS "" CACHE INTERNAL "") set(DCA_EXTERNAL_INCLUDE_DIRS "" CACHE INTERNAL "") set(DCA_EXTERNAL_IO_LIBS "" CACHE INTERNAL "") set(DCA_EXTERNAL_IO_INCLUDE_DIRS "" CACHE INTERNAL "") ################################################################################ # Lapack if (NOT DCA_HAVE_LAPACK) Loading Loading @@ -39,10 +42,11 @@ list(APPEND DCA_EXTERNAL_LIBS ${LAPACK_LIBRARIES}) ################################################################################ # HDF5 find_package(HDF5 COMPONENTS C CXX) list(APPEND DCA_EXTERNAL_LIBS ${HDF5_CXX_LIBRARIES}) list(APPEND DCA_EXTERNAL_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${HDF5_INCLUDE_DIR}) find_package(HDF5 REQUIRED COMPONENTS C CXX) # append the library target not HDF_LIBRARIES, in modern cmake you need the target. # on spock this is all that will work with cray's hdf5 list(APPEND DCA_EXTERNAL_IO_LIBS hdf5::hdf5_cpp) ################################################################################ # ADIOS2 Loading @@ -50,8 +54,8 @@ if (DCA_WITH_ADIOS2) set(DCA_HAVE_ADIOS2 FALSE CACHE INTERNAL "") find_package(ADIOS2) if (ADIOS2_FOUND) list(APPEND DCA_EXTERNAL_LIBS ${ADIOS2_LIBRARIES}) list(APPEND DCA_EXTERNAL_INCLUDE_DIRS ${ADIOS2_INCLUDE_DIRS}) list(APPEND DCA_EXTERNAL_IO_LIBS ${ADIOS2_LIBRARIES}) list(APPEND DCA_EXTERNAL_IO_INCLUDE_DIRS ${ADIOS2_INCLUDE_DIRS}) set(DCA_HAVE_ADIOS2 TRUE CACHE INTERNAL "") #message("ADIOS2: libraries ${ADIOS2_LIBRARIES}") endif() Loading @@ -76,5 +80,8 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/libs/simplex_gm_rule) list(APPEND DCA_EXTERNAL_LIBS ${GNUPLOT_INTERFACE_LIBRARY}) list(APPEND DCA_EXTERNAL_INCLUDE_DIRS ${GNUPLOT_INTERFACE_INCLUDE_DIR}) # message("DCA_EXTERNAL_LIBS = ${DCA_EXTERNAL_LIBS}") # message("DCA_EXTERNAL_INCLUDE_DIRS = ${DCA_EXTERNAL_INCLUDE_DIRS}") list(APPEND DCA_EXTERNAL_LIBS ${DCA_EXTERNAL_IO_LIBS}) list(APPEND DCA_EXTERNAL_INCLUDE_DIRS ${DCA_EXTERNAL_IO_INCLUDE_DIRS}) message("DCA_EXTERNAL_LIBS = ${DCA_EXTERNAL_LIBS}") message("DCA_EXTERNAL_INCLUDE_DIRS = ${DCA_EXTERNAL_INCLUDE_DIRS}")
include/dca/application/dca_loop_dispatch.hpp +19 −17 Original line number Diff line number Diff line Loading @@ -20,30 +20,32 @@ template <dca::DistType DT> class DCALoopDispatch { public: void operator()(ParametersType& parameters, Concurrency& concurrency) { // Create and initialize the DCA data object. DcaDataType<DT> dca_data(parameters); dca_data.initialize(); DcaLoopType<DT> dca_loop(parameters, dca_data, concurrency); { Profiler profiler(__FUNCTION__, __FILE__, __LINE__); // Create and initialize the DCA data object. try { dca_loop.initialize(); } catch (const std::exception& exc) { } catch (const std::exception& exc) { std::cout << "unhandled exception in dca_loop.initialize(): " << exc.what() << std::endl; throw exc; } try { dca_loop.execute(); } catch (const std::exception& exc) { } catch (const std::exception& exc) { std::cout << "unhandled exception in dca_loop.execute(): " << exc.what() << std::endl; throw exc; } try { dca_loop.finalize(); Profiler::stop(concurrency, parameters.get_filename_profiling()); } catch (const std::exception& exc) { } catch (const std::exception& exc) { std::cout << "unhandled exception in dca_loop.execute(): " << exc.what() << std::endl; throw exc; } Loading