From 9568d8a67896b93c65ca6da2379884df2e85a024 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Thu, 26 Oct 2023 08:46:02 -0400 Subject: [PATCH 01/12] [cmake] bump VG kit, BTAS, and MADNESS tags - refresh VG kit to include several linalgpp fixes - refresh BTAS to pull in https://github.com/ValeevGroup/BTAS/pull/166 - refresh MADNESS to pull in https://github.com/m-a-d-n-e-s-s/madness/pull/507 --- INSTALL.md | 4 ++-- external/versions.cmake | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 720943ac33..6841ba0ca2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -40,9 +40,9 @@ Both methods are supported. However, for most users we _strongly_ recommend to b - Boost.Container: header-only - Boost.Test: header-only or (optionally) as a compiled library, *only used for unit testing* - Boost.Range: header-only, *only used for unit testing* -- [BTAS](http://github.com/ValeevGroup/BTAS), tag 3c91f086090390930bba62c6512c4e74a5520e76 . If usable BTAS installation is not found, TiledArray will download and compile +- [BTAS](http://github.com/ValeevGroup/BTAS), tag bf0c376d5cdd6f668174b2a4c67b19634d1c0da7 . If usable BTAS installation is not found, TiledArray will download and compile BTAS from source. *This is the recommended way to compile BTAS for all users*. -- [MADNESS](https://github.com/m-a-d-n-e-s-s/madness), tag 1f307ebbe6604539493e165a7a2b00b366711fd8 . +- [MADNESS](https://github.com/m-a-d-n-e-s-s/madness), tag 4f7d30b0a738621037b96bb5b820029835753667 . Only the MADworld runtime and BLAS/LAPACK C API component of MADNESS is used by TiledArray. If usable MADNESS installation is not found, TiledArray will download and compile MADNESS from source. *This is the recommended way to compile MADNESS for all users*. diff --git a/external/versions.cmake b/external/versions.cmake index c9e6149311..ff7aad41ac 100644 --- a/external/versions.cmake +++ b/external/versions.cmake @@ -1,7 +1,7 @@ # for each dependency track both current and previous id (the variable for the latter must contain PREVIOUS) # to be able to auto-update them -set(TA_TRACKED_VGCMAKEKIT_TAG e68b3b4e8a57a175bb9d1b4e4cfa7d31b9363de5) +set(TA_TRACKED_VGCMAKEKIT_TAG d6746098e63deab4032309c4455bb084a17ff51a) # Boost explicitly downgraded to 1.59 from 1.68 set(TA_TRACKED_BOOST_VERSION 1.59) @@ -19,13 +19,13 @@ set(TA_INSTALL_EIGEN_PREVIOUS_VERSION 3.3.7) set(TA_INSTALL_EIGEN_URL_HASH SHA256=b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626) set(TA_INSTALL_EIGEN_PREVIOUS_URL_HASH MD5=b9e98a200d2455f06db9c661c5610496) -set(TA_TRACKED_MADNESS_TAG 1f307ebbe6604539493e165a7a2b00b366711fd8) -set(TA_TRACKED_MADNESS_PREVIOUS_TAG 3d585293f0094588778dbd3bec24b65e7bbe6a5d) +set(TA_TRACKED_MADNESS_TAG 4f7d30b0a738621037b96bb5b820029835753667) +set(TA_TRACKED_MADNESS_PREVIOUS_TAG 1f307ebbe6604539493e165a7a2b00b366711fd8) set(TA_TRACKED_MADNESS_VERSION 0.10.1) set(TA_TRACKED_MADNESS_PREVIOUS_VERSION 0.10.1) -set(TA_TRACKED_BTAS_TAG 3c91f086090390930bba62c6512c4e74a5520e76) -set(TA_TRACKED_BTAS_PREVIOUS_TAG 5a45699b78d0540b490c8c769b61033bd4d4f49c) +set(TA_TRACKED_BTAS_TAG bf0c376d5cdd6f668174b2a4c67b19634d1c0da7) +set(TA_TRACKED_BTAS_PREVIOUS_TAG 3c91f086090390930bba62c6512c4e74a5520e76) set(TA_TRACKED_LIBRETT_TAG 6eed30d4dd2a5aa58840fe895dcffd80be7fbece) set(TA_TRACKED_LIBRETT_PREVIOUS_TAG 354e0ccee54aeb2f191c3ce2c617ebf437e49d83) From 75950bef52adcc1166d988037f470fb4af1c85eb Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Fri, 27 Oct 2023 16:15:55 -0400 Subject: [PATCH 02/12] [cmake] bump TTG tag to sync with most recent master --- external/versions.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/versions.cmake b/external/versions.cmake index ff7aad41ac..9aa1db064a 100644 --- a/external/versions.cmake +++ b/external/versions.cmake @@ -40,5 +40,5 @@ set(TA_TRACKED_RANGEV3_TAG 2e0591c57fce2aca6073ad6e4fdc50d841827864) set(TA_TRACKED_RANGEV3_PREVIOUS_TAG dbdaa247a25a0daa24c68f1286a5693c72ea0006) set(TA_TRACKED_TTG_URL https://github.com/TESSEorg/ttg) -set(TA_TRACKED_TTG_TAG 0adff52aa1ebdad013ab3843a7a68c2bb06b60a8) -set(TA_TRACKED_TTG_PREVIOUS_TAG a9a1a55b45f7503da39d8466a1a421155ac5ca2a) +set(TA_TRACKED_TTG_TAG 4643df546d52481c7ad4bf5b7cce45289dc6b222) +set(TA_TRACKED_TTG_PREVIOUS_TAG 0adff52aa1ebdad013ab3843a7a68c2bb06b60a8) From 8b06a678fb14065a9bc312fa7ba36791dfa6d475 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Fri, 27 Oct 2023 16:20:43 -0400 Subject: [PATCH 03/12] automate TTG tag synchronization between versions.cmake and INSTALL.md --- INSTALL.md | 2 +- bin/admin/dependency-versions-update-hook.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 6841ba0ca2..cfcaefaa06 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -75,7 +75,7 @@ Optional prerequisites: - [blacspp](https://github.com/wavefunction91/blacspp.git) -- a modern C++ (C++17) wrapper for BLACS - Python3 interpreter -- to test (optionally-built) Python bindings - [Range-V3](https://github.com/ericniebler/range-v3.git) -- a Ranges library that served as the basis for Ranges component of C++20; only used for some unit testing of the functionality anticipated to be supported by future C++ standards. -- [TTG](https://github.com/TESSEorg/ttg.git) -- C++ implementation of the Template Task Graph programming model for fine-grained flow-graph composition of distributed memory programs. +- [TTG](https://github.com/TESSEorg/ttg.git) -- C++ implementation of the Template Task Graph programming model for fine-grained flow-graph composition of distributed memory programs (tag 4643df546d52481c7ad4bf5b7cce45289dc6b222). Many of these dependencies can be installed with a package manager, such as Homebrew on OS X or apt-get on Debian Linux distributions; diff --git a/bin/admin/dependency-versions-update-hook.py b/bin/admin/dependency-versions-update-hook.py index 686b98b49a..739049f834 100755 --- a/bin/admin/dependency-versions-update-hook.py +++ b/bin/admin/dependency-versions-update-hook.py @@ -126,6 +126,11 @@ def replace_dep_id(topsrc, file_ext, dep_name, old_id, new_id, search_prefix = ' scalapackpp_old_tag = tokens[2] else: scalapackpp_new_tag = tokens[2] + elif tokens[1].find('TTG') != -1: + if tokens[1].find('PREVIOUS') != -1: + ttg_old_tag = tokens[2] + else: + ttg_new_tag = tokens[2] any_files_changed = False @@ -155,6 +160,9 @@ def replace_dep_id(topsrc, file_ext, dep_name, old_id, new_id, search_prefix = ' # SCALAPACKPP tag in INSTALL.md any_files_changed |= replace_dep_id(topsrc, 'md', 'SCALAPACKPP', scalapackpp_old_tag, scalapackpp_new_tag, '', '') +# TTG tag in INSTALL.md +any_files_changed |= replace_dep_id(topsrc, 'md', 'TTG', ttg_old_tag, ttg_new_tag, '', '') + if any_files_changed: sys.exit(1) else: From b9466a10b7b79ef13557a0a5956d5e5e01ac2f41 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Fri, 27 Oct 2023 16:22:13 -0400 Subject: [PATCH 04/12] [ci] test TTG Cholesky when using PaRSEC as backend (GHA only) --- .github/workflows/ci.yml | 1 + src/TiledArray/math/linalg/ttg/cholesky.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7753a3436d..44210103e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,7 @@ jobs: -DCMAKE_PREFIX_PATH="/usr/local/opt/bison;/usr/local/opt/scalapack" -DTA_ASSERT_POLICY=TA_ASSERT_THROW -DENABLE_SCALAPACK=ON + -DTA_TTG=${{ matrix.task_backend == 'PaRSEC' }} steps: - uses: actions/checkout@v2 diff --git a/src/TiledArray/math/linalg/ttg/cholesky.h b/src/TiledArray/math/linalg/ttg/cholesky.h index 66a67a8034..0017d1ae1e 100644 --- a/src/TiledArray/math/linalg/ttg/cholesky.h +++ b/src/TiledArray/math/linalg/ttg/cholesky.h @@ -86,7 +86,7 @@ auto cholesky(const Array& A, TiledRange l_trange = {}, [[maybe_unused]] auto connected = make_graph_executable(potrf_ttg.get()); // uncomment to trace - ::ttg::trace_on(); + //::ttg::trace_on(); // start ::ttg::execute(); @@ -175,7 +175,7 @@ auto cholesky_linv(const Array& A, TiledRange l_trange = {}, [[maybe_unused]] auto connected = make_graph_executable(trtri_ttg.get()); // uncomment to trace - ::ttg::trace_on(); + //::ttg::trace_on(); // start ::ttg::execute(); From 97655c08d667425b234158dd7f912700f810e24b Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Fri, 27 Oct 2023 16:50:35 -0400 Subject: [PATCH 05/12] [ci] bump TTG tag again so that it pulls in latest MADNESS --- INSTALL.md | 2 +- external/versions.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index cfcaefaa06..9f71cd221a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -75,7 +75,7 @@ Optional prerequisites: - [blacspp](https://github.com/wavefunction91/blacspp.git) -- a modern C++ (C++17) wrapper for BLACS - Python3 interpreter -- to test (optionally-built) Python bindings - [Range-V3](https://github.com/ericniebler/range-v3.git) -- a Ranges library that served as the basis for Ranges component of C++20; only used for some unit testing of the functionality anticipated to be supported by future C++ standards. -- [TTG](https://github.com/TESSEorg/ttg.git) -- C++ implementation of the Template Task Graph programming model for fine-grained flow-graph composition of distributed memory programs (tag 4643df546d52481c7ad4bf5b7cce45289dc6b222). +- [TTG](https://github.com/TESSEorg/ttg.git) -- C++ implementation of the Template Task Graph programming model for fine-grained flow-graph composition of distributed memory programs (tag 18ecba5ddfa2953698642d75ec509a0735e0cd3e). Many of these dependencies can be installed with a package manager, such as Homebrew on OS X or apt-get on Debian Linux distributions; diff --git a/external/versions.cmake b/external/versions.cmake index 9aa1db064a..0e68e87eb2 100644 --- a/external/versions.cmake +++ b/external/versions.cmake @@ -40,5 +40,5 @@ set(TA_TRACKED_RANGEV3_TAG 2e0591c57fce2aca6073ad6e4fdc50d841827864) set(TA_TRACKED_RANGEV3_PREVIOUS_TAG dbdaa247a25a0daa24c68f1286a5693c72ea0006) set(TA_TRACKED_TTG_URL https://github.com/TESSEorg/ttg) -set(TA_TRACKED_TTG_TAG 4643df546d52481c7ad4bf5b7cce45289dc6b222) -set(TA_TRACKED_TTG_PREVIOUS_TAG 0adff52aa1ebdad013ab3843a7a68c2bb06b60a8) +set(TA_TRACKED_TTG_TAG 18ecba5ddfa2953698642d75ec509a0735e0cd3e) +set(TA_TRACKED_TTG_PREVIOUS_TAG 4643df546d52481c7ad4bf5b7cce45289dc6b222) From 3526ac9ac2c49527f4f820a7ec194164e0b5291b Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Tue, 31 Oct 2023 13:00:17 -0400 Subject: [PATCH 06/12] [ci] bump TTG tag to pull in https://github.com/TESSEorg/ttg/commit/d3668525151f91c8da341f1780d5e623e2cf6c2b --- INSTALL.md | 2 +- external/versions.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 9f71cd221a..7ecbfa3607 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -75,7 +75,7 @@ Optional prerequisites: - [blacspp](https://github.com/wavefunction91/blacspp.git) -- a modern C++ (C++17) wrapper for BLACS - Python3 interpreter -- to test (optionally-built) Python bindings - [Range-V3](https://github.com/ericniebler/range-v3.git) -- a Ranges library that served as the basis for Ranges component of C++20; only used for some unit testing of the functionality anticipated to be supported by future C++ standards. -- [TTG](https://github.com/TESSEorg/ttg.git) -- C++ implementation of the Template Task Graph programming model for fine-grained flow-graph composition of distributed memory programs (tag 18ecba5ddfa2953698642d75ec509a0735e0cd3e). +- [TTG](https://github.com/TESSEorg/ttg.git) -- C++ implementation of the Template Task Graph programming model for fine-grained flow-graph composition of distributed memory programs (tag 26da9b40872660b864794658d4fdeee1a95cb4d6). Many of these dependencies can be installed with a package manager, such as Homebrew on OS X or apt-get on Debian Linux distributions; diff --git a/external/versions.cmake b/external/versions.cmake index 0e68e87eb2..325735c821 100644 --- a/external/versions.cmake +++ b/external/versions.cmake @@ -40,5 +40,5 @@ set(TA_TRACKED_RANGEV3_TAG 2e0591c57fce2aca6073ad6e4fdc50d841827864) set(TA_TRACKED_RANGEV3_PREVIOUS_TAG dbdaa247a25a0daa24c68f1286a5693c72ea0006) set(TA_TRACKED_TTG_URL https://github.com/TESSEorg/ttg) -set(TA_TRACKED_TTG_TAG 18ecba5ddfa2953698642d75ec509a0735e0cd3e) -set(TA_TRACKED_TTG_PREVIOUS_TAG 4643df546d52481c7ad4bf5b7cce45289dc6b222) +set(TA_TRACKED_TTG_TAG 26da9b40872660b864794658d4fdeee1a95cb4d6) +set(TA_TRACKED_TTG_PREVIOUS_TAG 18ecba5ddfa2953698642d75ec509a0735e0cd3e) From 5980cc6152d4f21f0983d76bab798a5ef7aa966e Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Tue, 31 Oct 2023 14:24:45 -0400 Subject: [PATCH 07/12] [ci] bump TTG tag to pull in https://github.com/TESSEorg/ttg/commit/3fe4a06dbf4b05091269488aab38223da1f8cb8e --- INSTALL.md | 2 +- external/versions.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 7ecbfa3607..b188ba19f5 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -75,7 +75,7 @@ Optional prerequisites: - [blacspp](https://github.com/wavefunction91/blacspp.git) -- a modern C++ (C++17) wrapper for BLACS - Python3 interpreter -- to test (optionally-built) Python bindings - [Range-V3](https://github.com/ericniebler/range-v3.git) -- a Ranges library that served as the basis for Ranges component of C++20; only used for some unit testing of the functionality anticipated to be supported by future C++ standards. -- [TTG](https://github.com/TESSEorg/ttg.git) -- C++ implementation of the Template Task Graph programming model for fine-grained flow-graph composition of distributed memory programs (tag 26da9b40872660b864794658d4fdeee1a95cb4d6). +- [TTG](https://github.com/TESSEorg/ttg.git) -- C++ implementation of the Template Task Graph programming model for fine-grained flow-graph composition of distributed memory programs (tag 3fe4a06dbf4b05091269488aab38223da1f8cb8e). Many of these dependencies can be installed with a package manager, such as Homebrew on OS X or apt-get on Debian Linux distributions; diff --git a/external/versions.cmake b/external/versions.cmake index 325735c821..b1e615e117 100644 --- a/external/versions.cmake +++ b/external/versions.cmake @@ -40,5 +40,5 @@ set(TA_TRACKED_RANGEV3_TAG 2e0591c57fce2aca6073ad6e4fdc50d841827864) set(TA_TRACKED_RANGEV3_PREVIOUS_TAG dbdaa247a25a0daa24c68f1286a5693c72ea0006) set(TA_TRACKED_TTG_URL https://github.com/TESSEorg/ttg) -set(TA_TRACKED_TTG_TAG 26da9b40872660b864794658d4fdeee1a95cb4d6) -set(TA_TRACKED_TTG_PREVIOUS_TAG 18ecba5ddfa2953698642d75ec509a0735e0cd3e) +set(TA_TRACKED_TTG_TAG 3fe4a06dbf4b05091269488aab38223da1f8cb8e) +set(TA_TRACKED_TTG_PREVIOUS_TAG 26da9b40872660b864794658d4fdeee1a95cb4d6) From b6617fd3efbc48bb3b3fc2e0a4c3ce1bd3c3587a Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 1 Nov 2023 09:30:52 -0400 Subject: [PATCH 08/12] [ci] bump MAD tag to pull in https://github.com/m-a-d-n-e-s-s/madness/pull/508 --- INSTALL.md | 2 +- external/versions.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index b188ba19f5..1181e2d570 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -42,7 +42,7 @@ Both methods are supported. However, for most users we _strongly_ recommend to b - Boost.Range: header-only, *only used for unit testing* - [BTAS](http://github.com/ValeevGroup/BTAS), tag bf0c376d5cdd6f668174b2a4c67b19634d1c0da7 . If usable BTAS installation is not found, TiledArray will download and compile BTAS from source. *This is the recommended way to compile BTAS for all users*. -- [MADNESS](https://github.com/m-a-d-n-e-s-s/madness), tag 4f7d30b0a738621037b96bb5b820029835753667 . +- [MADNESS](https://github.com/m-a-d-n-e-s-s/madness), tag 03c82cf2780d9e96298cc9140ac128c73eacd3b1 . Only the MADworld runtime and BLAS/LAPACK C API component of MADNESS is used by TiledArray. If usable MADNESS installation is not found, TiledArray will download and compile MADNESS from source. *This is the recommended way to compile MADNESS for all users*. diff --git a/external/versions.cmake b/external/versions.cmake index b1e615e117..b5c6309e6f 100644 --- a/external/versions.cmake +++ b/external/versions.cmake @@ -19,8 +19,8 @@ set(TA_INSTALL_EIGEN_PREVIOUS_VERSION 3.3.7) set(TA_INSTALL_EIGEN_URL_HASH SHA256=b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626) set(TA_INSTALL_EIGEN_PREVIOUS_URL_HASH MD5=b9e98a200d2455f06db9c661c5610496) -set(TA_TRACKED_MADNESS_TAG 4f7d30b0a738621037b96bb5b820029835753667) -set(TA_TRACKED_MADNESS_PREVIOUS_TAG 1f307ebbe6604539493e165a7a2b00b366711fd8) +set(TA_TRACKED_MADNESS_TAG 03c82cf2780d9e96298cc9140ac128c73eacd3b1) +set(TA_TRACKED_MADNESS_PREVIOUS_TAG 4f7d30b0a738621037b96bb5b820029835753667) set(TA_TRACKED_MADNESS_VERSION 0.10.1) set(TA_TRACKED_MADNESS_PREVIOUS_VERSION 0.10.1) From 5a619b5ed5280700e88a053fc771c37960a6babe Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 1 Nov 2023 09:33:02 -0400 Subject: [PATCH 09/12] initialize MADWorld before TTG to have them share context + tell PaRSEC context to use full (WORLD) comm if TTG is used --- CMakeLists.txt | 2 +- src/TiledArray/tiledarray.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 604db1ee85..b0b5aac514 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -309,10 +309,10 @@ endif() if(ENABLE_HIP) include(external/hip.cmake) endif() +include(${PROJECT_SOURCE_DIR}/cmake/modules/FindOrFetchMADWorld.cmake) if (TA_TTG) include(${PROJECT_SOURCE_DIR}/cmake/modules/FindOrFetchTTG.cmake) endif(TA_TTG) -include(${PROJECT_SOURCE_DIR}/cmake/modules/FindOrFetchMADWorld.cmake) detect_MADNESS_configuration() include(external/eigen.cmake) # the FetchContent-based version will not work due to BLT target name conflicts diff --git a/src/TiledArray/tiledarray.cpp b/src/TiledArray/tiledarray.cpp index 74244e59bd..7d58434979 100644 --- a/src/TiledArray/tiledarray.cpp +++ b/src/TiledArray/tiledarray.cpp @@ -106,8 +106,16 @@ TiledArray::World& TiledArray::initialize(int& argc, char**& argv, initialized_accessor() = true; quiet_accessor() = quiet; - // if have TTG initialize it also + // if have TTG, initialize it also #if TILEDARRAY_HAS_TTG + // MADNESS/PaRSEC creates PaRSEC context that uses MPI_COMM_SELF to avoid + // creation of a PaRSEC comm thread to be able to use TTG/PaRSEC need to + // tell PaRSEC context to use the full communicator + if (madness::ParsecRuntime::context()->nb_nodes != default_world.size()) { + auto default_world_comm = default_world.mpi.comm().Get_mpi_comm(); + parsec_remote_dep_set_ctx(madness::ParsecRuntime::context(), + (intptr_t)default_world_comm); + } ttg::initialize(argc, argv, -1, madness::ParsecRuntime::context()); #endif From 765ba8c398e6ccf9c051814a28dc4281a95d83f3 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 1 Nov 2023 14:16:27 -0400 Subject: [PATCH 10/12] FindOrFetchMADWorld: make sure MADWorld uses PaRSEC as backend if configured with TA_TTG --- cmake/modules/FindOrFetchMADWorld.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/modules/FindOrFetchMADWorld.cmake b/cmake/modules/FindOrFetchMADWorld.cmake index 7be76bac5a..5961a4f05d 100644 --- a/cmake/modules/FindOrFetchMADWorld.cmake +++ b/cmake/modules/FindOrFetchMADWorld.cmake @@ -12,7 +12,15 @@ if (NOT TARGET MADworld) # TA-specific configuration set(MADNESS_BUILD_MADWORLD_ONLY ON CACHE BOOL "Whether to build MADNESS runtime only") - set(ENABLE_PARSEC OFF CACHE BOOL "Whether to use PaRSEC as the task backend of MADWorld") + if (TA_TTG) + if (NOT DEFINED MADNESS_TASK_BACKEND) + set(MADNESS_TASK_BACKEND PaRSEC CACHE STRING "The task backend to use for MADNESS tasks") + else () + if (NOT(${MADNESS_TASK_BACKEND} STREQUAL PaRSEC)) + message(FATAL_ERROR "must set MADNESS_TASK_BACKEND=PaRSEC if configuring with TA_TTG=ON") + endif() + endif() + endif() set(MPI_THREAD "multiple" CACHE INTERNAL "MADNESS requires MPI_THREAD_MULTIPLE") set(MADNESS_ASSUMES_ASLR_DISABLED ${TA_ASSUMES_ASLR_DISABLED} CACHE BOOL "Whether MADNESS assumes ASLR to be disabled") set(MPI_CXX_SKIP_MPICXX ON CACHE BOOL "Whether to disable search for C++ MPI-2 bindings") From 7e412dfb46c1f22dc52aa416480acab655a791e9 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 1 Nov 2023 14:17:11 -0400 Subject: [PATCH 11/12] Revert testing TTG Cholesky in CI until initialization issues between MADNESS and TTG are resolved. MADNESS needs to create PaRSEC taskpool lazily so that both MADNESS and TTG can be initialized with empty PaRSEC context created by TA This reverts commit b9466a10b7b79ef13557a0a5956d5e5e01ac2f41. --- .github/workflows/ci.yml | 1 - src/TiledArray/math/linalg/ttg/cholesky.h | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44210103e8..7753a3436d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,6 @@ jobs: -DCMAKE_PREFIX_PATH="/usr/local/opt/bison;/usr/local/opt/scalapack" -DTA_ASSERT_POLICY=TA_ASSERT_THROW -DENABLE_SCALAPACK=ON - -DTA_TTG=${{ matrix.task_backend == 'PaRSEC' }} steps: - uses: actions/checkout@v2 diff --git a/src/TiledArray/math/linalg/ttg/cholesky.h b/src/TiledArray/math/linalg/ttg/cholesky.h index 0017d1ae1e..66a67a8034 100644 --- a/src/TiledArray/math/linalg/ttg/cholesky.h +++ b/src/TiledArray/math/linalg/ttg/cholesky.h @@ -86,7 +86,7 @@ auto cholesky(const Array& A, TiledRange l_trange = {}, [[maybe_unused]] auto connected = make_graph_executable(potrf_ttg.get()); // uncomment to trace - //::ttg::trace_on(); + ::ttg::trace_on(); // start ::ttg::execute(); @@ -175,7 +175,7 @@ auto cholesky_linv(const Array& A, TiledRange l_trange = {}, [[maybe_unused]] auto connected = make_graph_executable(trtri_ttg.get()); // uncomment to trace - //::ttg::trace_on(); + ::ttg::trace_on(); // start ::ttg::execute(); From 30f9eb540e39b04b5a76b80ec0dbca0489d8bc43 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 1 Nov 2023 14:20:05 -0400 Subject: [PATCH 12/12] disable trace output in TTG Cholesky --- src/TiledArray/math/linalg/ttg/cholesky.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TiledArray/math/linalg/ttg/cholesky.h b/src/TiledArray/math/linalg/ttg/cholesky.h index 66a67a8034..0017d1ae1e 100644 --- a/src/TiledArray/math/linalg/ttg/cholesky.h +++ b/src/TiledArray/math/linalg/ttg/cholesky.h @@ -86,7 +86,7 @@ auto cholesky(const Array& A, TiledRange l_trange = {}, [[maybe_unused]] auto connected = make_graph_executable(potrf_ttg.get()); // uncomment to trace - ::ttg::trace_on(); + //::ttg::trace_on(); // start ::ttg::execute(); @@ -175,7 +175,7 @@ auto cholesky_linv(const Array& A, TiledRange l_trange = {}, [[maybe_unused]] auto connected = make_graph_executable(trtri_ttg.get()); // uncomment to trace - ::ttg::trace_on(); + //::ttg::trace_on(); // start ::ttg::execute();