Skip to content

Commit

Permalink
Merge pull request #471 from ValeevGroup/evaleev/fix/nonzero-lobound-…
Browse files Browse the repository at this point in the history
…array-to-eigen

array<->eigen conversions + assignment to block expressions work with arrays/expressions with nonzero lobound/base
  • Loading branch information
evaleev authored Sep 22, 2024
2 parents 8af44bd + ae1cf06 commit 8ab356e
Show file tree
Hide file tree
Showing 34 changed files with 1,555 additions and 451 deletions.
12 changes: 6 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ ubuntu:
metrics: build/metrics.txt
parallel:
matrix:
- IMAGE : [ "ubuntu:22.04", "ubuntu:20.04" ]
- IMAGE : [ "ubuntu:20.04" ]
CXX: [ g++ ]
BUILD_TYPE : [ "Release" ]
BUILD_TYPE : [ "RelWithDebInfo" ]
BLA_VENDOR : [ "BLAS_PREFERENCE_LIST=IntelMKL" ]
BLA_THREADS : [ "IntelMKL_THREAD_LAYER=tbb" ]
# ENABLE_SCALAPACK : [ "ENABLE_SCALAPACK=ON", "ENABLE_SCALAPACK=OFF" ]
TA_PYTHON : [ "TA_PYTHON=OFF" ] # needs to be fixed for MKL
RUNNER_TAGS: [ saas-linux-small-amd64 ]
- IMAGE : [ "ubuntu:22.04", "ubuntu:20.04" ]
- IMAGE : [ "ubuntu:22.04" ]
CXX: [ g++, clang++-13 ]
BUILD_TYPE : [ "Release", "Debug" ]
BUILD_TYPE : [ "RelWithDebInfo" ]
ENABLE_SCALAPACK : [ "ENABLE_SCALAPACK=ON", "ENABLE_SCALAPACK=OFF" ]
RUNNER_TAGS: [ saas-linux-small-amd64 ]
- IMAGE : [ "ubuntu:22.04", "ubuntu:20.04" ]
- IMAGE : [ "ubuntu:22.04" ]
CXX: [ g++ ]
BUILD_TYPE : [ "Release", "Debug" ]
BUILD_TYPE : [ "RelWithDebInfo" ]
ENABLE_CUDA : [ "ENABLE_CUDA=ON" ]
TA_TARGETS : [ "tiledarray examples-tiledarray check_serial-tiledarray" ]
RUNNER_TAGS: [ cuda ]
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Both methods are supported. However, for most users we _strongly_ recommend to b
- [Range-V3](https://github.com/ericniebler/range-v3.git) -- a Ranges library that served as the basis for Ranges component of C++20 and later.
- [BTAS](http://github.com/ValeevGroup/BTAS), tag 4e8f5233aa7881dccdfcc37ce07128833926d3c2 . 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 96ac90e8f193ccfaf16f346b4652927d2d362e75 .
- [MADNESS](https://github.com/m-a-d-n-e-s-s/madness), tag 95589b0d020a076f93d02eead6da654b23dd3d91 .
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 Down
4 changes: 2 additions & 2 deletions external/versions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,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 96ac90e8f193ccfaf16f346b4652927d2d362e75)
set(TA_TRACKED_MADNESS_PREVIOUS_TAG 3d0ae2fad1b97e347ca6dd98b9f1b9e74e629f52)
set(TA_TRACKED_MADNESS_TAG 95589b0d020a076f93d02eead6da654b23dd3d91)
set(TA_TRACKED_MADNESS_PREVIOUS_TAG 96ac90e8f193ccfaf16f346b4652927d2d362e75)
set(TA_TRACKED_MADNESS_VERSION 0.10.1)
set(TA_TRACKED_MADNESS_PREVIOUS_VERSION 0.10.1)

Expand Down
7 changes: 1 addition & 6 deletions python/src/TiledArray/python/trange.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ auto list(const TiledRange &trange) {
return v;
}

// template<>
inline TiledRange make_trange(std::vector<std::vector<int64_t> > trange) {
std::vector<TiledRange1> trange1;
for (auto tr : trange) {
Expand All @@ -58,11 +57,7 @@ inline TiledRange make_trange(std::vector<std::vector<int64_t> > trange) {
inline TiledRange make_trange(std::vector<int64_t> shape, size_t block) {
std::vector<TiledRange1> trange1;
for (size_t i = 0; i < shape.size(); ++i) {
std::vector<int64_t> tr1;
for (size_t j = 0; j <= (shape[i] + block - 1); j += block) {
tr1.push_back(std::min<int64_t>(j, shape[i]));
}
trange1.push_back(TiledRange1(tr1.begin(), tr1.end()));
trange1.emplace_back(TiledRange1::make_uniform(shape[i], block));
}
return TiledRange(trange1.begin(), trange1.end());
}
Expand Down
248 changes: 200 additions & 48 deletions src/TiledArray/conversions/btas.h

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions src/TiledArray/conversions/concat.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ DistArray<Tile, Policy> concat(
using std::begin;
using std::end;

index b(r), e(r); // updated for concatted modes only
index b(r), e(r); // updated for concatenated modes only
std::fill(begin(b), end(b), 0);
for (auto i = 0ul; i != arrays.size(); ++i) {
auto& tr = arrays[i].trange();
Expand Down Expand Up @@ -97,9 +97,6 @@ DistArray<Tile, Policy> concat(
result.make_tsrexpr(annot).block(tile_begin_end[i].first,
tile_begin_end[i].second) =
arrays[i].make_tsrexpr(annot);
result.make_tsrexpr(annot).block(tile_begin_end[i].first,
tile_begin_end[i].second) =
arrays[i].make_tsrexpr(annot);
}
}
result.world().gop.fence();
Expand Down
Loading

0 comments on commit 8ab356e

Please sign in to comment.