Skip to content

moved FindOrFetchScaLAPACK to vg cmake kit + bump vg cmake kit and BT… #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 5 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ FetchContent_Declare(
BINARY_DIR ${${VG_CMAKE_KIT_PREFIX_DIR}}/cmake/vg-build
SUBBUILD_DIR ${${VG_CMAKE_KIT_PREFIX_DIR}}/cmake/vg-subbuild
)
FetchContent_GetProperties(vg_cmake_kit)
if (NOT vg_cmake_kit_POPULATED)
FetchContent_MakeAvailable(vg_cmake_kit)
endif(NOT vg_cmake_kit_POPULATED)
FetchContent_MakeAvailable(vg_cmake_kit)
list(APPEND CMAKE_MODULE_PATH "${vg_cmake_kit_SOURCE_DIR}/modules")

project (TiledArray LANGUAGES)
enable_language(CXX)
Expand Down Expand Up @@ -320,34 +318,15 @@ include(external/umpire.cmake)
# - no => BLAS/LAPACK will be discovered by BLAS++/LAPACK++ (loaded by BTAS) which use standard CMake modules or
# their custom modules; if needed, ScaLAPACK will be discovered by BLACS++
if (ENABLE_WFN91_LINALG_DISCOVERY_KIT)
include("${vg_cmake_kit_SOURCE_DIR}/modules/FetchWfn91LinAlgModules.cmake")
if(ENABLE_SCALAPACK)
find_package(ScaLAPACK REQUIRED)
# Propagate ScaLAPACK -> BLAS/LAPACK if not set
# (ScaLAPACK necessarily contains a BLAS/LAPACK linker by standard)
# TODO: Tell David to write a macro that hides this verbosity from user space
if( NOT BLAS_LIBRARIES )
set( BLAS_LIBRARIES "${ScaLAPACK_LIBRARIES}" CACHE STRING "BLAS LIBRARIES" )
endif()
if( NOT LAPACK_LIBRARIES )
set( LAPACK_LIBRARIES "${ScaLAPACK_LIBRARIES}" CACHE STRING "LAPACK LIBRARIES" )
endif()
else(ENABLE_SCALAPACK)
find_package(LAPACK REQUIRED)
# Propagate LAPACK -> BLAS if not set
# (LAPACK necessarily contains a BLAS linker by standard)
# TODO: Tell David to write a macro that hides this verbosity from user space
if( NOT BLAS_LIBRARIES )
set( BLAS_LIBRARIES "${LAPACK_LIBRARIES}" CACHE STRING "BLAS LIBRARIES" )
endif()
endif(ENABLE_SCALAPACK)
include(FetchWfn91LinAlgModules)
include(FindLinalg)
endif(ENABLE_WFN91_LINALG_DISCOVERY_KIT)
# BTAS does a better job of building and checking Boost since it uses Boost::serialization
# it also memorized the location of its config for use from install tree
include(FindOrFetchBTAS)
include(FindOrFetchBoost)
if(ENABLE_SCALAPACK)
include(FindOrFetchScaLAPACK)
include(external/scalapackpp.cmake)
endif()
if (TA_ENABLE_RANGEV3)
include(FindOrFetchRangeV3)
Expand Down
8 changes: 4 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 5702259d5d207fe5a8e0c975c3cf1f610dcf381a . If usable BTAS installation is not found, TiledArray will download and compile
- [BTAS](http://github.com/ValeevGroup/BTAS), tag d971de75c492ad049471d9c29685aa8292c63a0f . 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 b8069a25460b696d21cc8b739a91c9249da26575 .
- [MADNESS](https://github.com/m-a-d-n-e-s-s/madness), tag 9357dccd0cf91c0857d05ceb5f10b833fcd63308 .
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*.
Expand All @@ -68,8 +68,8 @@ Optional prerequisites:
- [Umpire](github.com/LLNL/Umpire) -- portable memory manager for heterogeneous platforms (tag f9640e0fa4245691cdd434e4f719ac5f7d455f82).
- [Doxygen](http://www.doxygen.nl/) -- for building documentation (version 1.8.12 or later).
- [ScaLAPACK](http://www.netlib.org/scalapack/) -- a distributed-memory linear algebra package. If detected, the following C++ components will also be sought and downloaded, if missing:
- [blacspp](https://github.com/wavefunction91/blacspp.git) -- a modern C++ (C++17) wrapper for BLACS (tag 88076f1706be083ead882f6ce0bfc6884a72fc03)
- [scalapackpp](https://github.com/wavefunction91/scalapackpp.git) -- a modern C++ (C++17) wrapper for ScaLAPACK (tag 28433942197aee141cd9e96ed1d00f6ec7b902cb)
- [scalapackpp](https://github.com/wavefunction91/scalapackpp.git) -- a modern C++ (C++17) wrapper for ScaLAPACK (tag 28433942197aee141cd9e96ed1d00f6ec7b902cb); pulls and builds the following additional prerequisite
- [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.

Expand Down
3 changes: 0 additions & 3 deletions bin/admin/dependency-versions-update-hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ def replace_dep_id(topsrc, file_ext, dep_name, old_id, new_id, search_prefix = '
# Umpire tag in INSTALL.md
any_files_changed |= replace_dep_id(topsrc, 'md', 'Umpire', umpire_old_tag, umpire_new_tag, '', '')

# BLACSPP tag in INSTALL.md
any_files_changed |= replace_dep_id(topsrc, 'md', 'BLACSPP', blacspp_old_tag, blacspp_new_tag, '', '')

# SCALAPACKPP tag in INSTALL.md
any_files_changed |= replace_dep_id(topsrc, 'md', 'SCALAPACKPP', scalapackpp_old_tag, scalapackpp_new_tag, '', '')

Expand Down
46 changes: 0 additions & 46 deletions cmake/modules/FindOrFetchScaLAPACK.cmake

This file was deleted.

20 changes: 20 additions & 0 deletions external/scalapackpp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
if (NOT TARGET scalapackpp::scalapackpp)
set(VGCMAKEKIT_TRACKED_SCALAPACKPP_TAG ${TA_TRACKED_SCALAPACKPP_TAG})
include(FindOrFetchScaLAPACKPP)
endif()

# built {blacs,scalapack}pp as a subproject?
if (TARGET blacspp AND TARGET scalapackpp)
install( TARGETS blacspp scalapackpp EXPORT tiledarray COMPONENT tiledarray )
# Add these dependencies to External
add_dependencies(External-tiledarray scalapackpp )
endif()

if (TARGET blacspp::blacspp AND TARGET scalapackpp::scalapackpp)
add_library( TiledArray_SCALAPACK INTERFACE )
target_link_libraries( TiledArray_SCALAPACK INTERFACE scalapackpp::scalapackpp blacspp::blacspp)

install( TARGETS TiledArray_SCALAPACK EXPORT tiledarray COMPONENT tiledarray )

set( TILEDARRAY_HAS_SCALAPACK 1 )
endif()
13 changes: 5 additions & 8 deletions external/versions.cmake
Original file line number Diff line number Diff line change
@@ -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 619b611652174e3c5d04ef00394422f8cd355aec)
set(TA_TRACKED_VGCMAKEKIT_TAG d29dc6177884557d13fb87f364eb76350e8ddc9c)

# Boost explicitly downgraded to 1.59 from 1.68
set(TA_TRACKED_BOOST_VERSION 1.59)
Expand All @@ -19,23 +19,20 @@ 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 b8069a25460b696d21cc8b739a91c9249da26575)
set(TA_TRACKED_MADNESS_PREVIOUS_TAG f9aa38e4f46c5ea6ca6bbceb945beae5230f9ad0)
set(TA_TRACKED_MADNESS_TAG 9357dccd0cf91c0857d05ceb5f10b833fcd63308)
set(TA_TRACKED_MADNESS_PREVIOUS_TAG b8069a25460b696d21cc8b739a91c9249da26575)
set(TA_TRACKED_MADNESS_VERSION 0.10.1)
set(TA_TRACKED_MADNESS_PREVIOUS_VERSION 0.10.1)

set(TA_TRACKED_BTAS_TAG 5702259d5d207fe5a8e0c975c3cf1f610dcf381a)
set(TA_TRACKED_BTAS_PREVIOUS_TAG e540f265e1d16cc35b1b6726470160ed0046c530)
set(TA_TRACKED_BTAS_TAG d971de75c492ad049471d9c29685aa8292c63a0f)
set(TA_TRACKED_BTAS_PREVIOUS_TAG 5702259d5d207fe5a8e0c975c3cf1f610dcf381a)

set(TA_TRACKED_CUTT_TAG 0e8685bf82910bc7435835f846e88f1b39f47f09)
set(TA_TRACKED_CUTT_PREVIOUS_TAG 592198b93c93b7ca79e7900b9a9f2e79f9dafec3)

set(TA_TRACKED_UMPIRE_TAG f9640e0fa4245691cdd434e4f719ac5f7d455f82)
set(TA_TRACKED_UMPIRE_PREVIOUS_TAG v6.0.0)

#set(TA_TRACKED_BLACSPP_TAG 20cfd414c5b719be1c958f4a2d57abef06df83b6 )
#set(TA_TRACKED_BLACSPP_PREVIOUS_TAG da4ada57e578cf944325a7152164306742551596 )

set(TA_TRACKED_SCALAPACKPP_TAG bf17a7246af38d34523bd0099b01d9961d06d311 )
set(TA_TRACKED_SCALAPACKPP_PREVIOUS_TAG 043f85d7f31ec6009740ab466bcb5008af7b0814 )

Expand Down