Skip to content
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

Trilinos Master Merge PR Generator: Auto PR created to promote from master_merge_20250131_175819 branch to master #13768

Merged
merged 23 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
63f0913
Bump actions/stale from 9.0.0 to 9.1.0
dependabot[bot] Jan 27, 2025
8554ac0
Bump github/codeql-action from 3.28.1 to 3.28.6
dependabot[bot] Jan 27, 2025
383c22f
Merge Pull Request #13753 from trilinos/Trilinos/dependabot/github_ac…
trilinos-autotester Jan 28, 2025
7a2169d
Merge Pull Request #13752 from trilinos/Trilinos/dependabot/github_ac…
trilinos-autotester Jan 28, 2025
722f50a
Stohos: Silence shadow warning
cgcgcg Jan 29, 2025
5f56a7d
Merge Pull Request #13754 from cgcgcg/Trilinos/stokhosWarning
trilinos-autotester Jan 29, 2025
95f6e5d
Amesos2 : fix out-of-bound access in matrix-gather
iyamazaki Jan 29, 2025
cd92dd7
Amesos2 : gather-matrix with sort
iyamazaki Jan 29, 2025
3f51305
Amesos2 : update matrix-gather with Epetra
iyamazaki Jan 29, 2025
fa1cd20
Fix Amesos2 + SuperLU issue coming from EMPTY macro
vbrunini Jan 29, 2025
58b47cf
Tacho : variant-3 solve with OpenMP
iyamazaki Jan 29, 2025
1f014c9
Update check names in anticipation of requirement
sebrowne Jan 29, 2025
05e0df1
TrilinosCouplings: Minor fixes to allow builds w/o Epetra stack (#13757)
csiefer2 Jan 29, 2025
c205885
Remove unused import
sebrowne Jan 30, 2025
e571022
Tacho: muliple RHSs
iyamazaki Jan 30, 2025
64d17de
Automatic snapshot commit from seacas at 94e88d4519
gsjaardema Jan 30, 2025
c0c3a10
Fix compiler warning about unused variable
gsjaardema Jan 30, 2025
0155834
Tacho : unused variables
iyamazaki Jan 30, 2025
5a7b624
Merge pull request #13755 from iyamazaki/amesos2-bound
iyamazaki Jan 30, 2025
c314124
Merge Pull Request #13760 from sebrowne/Trilinos/at2-name-update
trilinos-autotester Jan 30, 2025
dd1423b
Merge pull request #13756 from trilinos/malachi/add-undef-empty-to-am…
jhux2 Jan 30, 2025
dd813e0
Merge pull request #13763 from iyamazaki/tacho-variant3
iyamazaki Jan 30, 2025
221f025
Merge Pull Request #13762 from gsjaardema/Trilinos/SEACAS-snapshot-20…
trilinos-autotester Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/AT2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
skip_after_successful_duplicate: 'true'

gcc10-openmpi416-EXPERIMENTAL:
gcc10-openmpi4:
needs: pre-checks
runs-on: [self-hosted, gcc-10.3.0_openmpi-4.1.6]
if: ${{ needs.pre-checks.outputs.should_skip != 'true' && (github.event.action == 'synchronize' || github.event.action == 'opened' || github.event.review.state == 'APPROVED') }}
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
echo "https://github.com/trilinos/Trilinos/wiki/Containers" >> $GITHUB_STEP_SUMMARY
echo "https://gitlab-ex.sandia.gov/trilinos-project/trilinos-containers/-/wikis/Containers-at-Sandia" >> $GITHUB_STEP_SUMMARY

cuda11-EXPERIMENTAL:
cuda11:
needs: pre-checks
runs-on: [self-hosted, cuda-11.4.2_gcc-10.3.0_openmpi-4.1.6]
if: ${{ needs.pre-checks.outputs.should_skip != 'true' && (github.event.action == 'synchronize' || github.event.action == 'opened' || github.event.review.state == 'APPROVED') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Initialize CodeQL
uses: github/codeql-action/init@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/init@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
Expand Down Expand Up @@ -108,6 +108,6 @@ jobs:
ninja -j 16

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/analyze@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/upload-sarif@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
debug-only: false
ascending: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


import sys
import imp
import shutil
import unittest

Expand Down
150 changes: 108 additions & 42 deletions packages/amesos2/src/Amesos2_EpetraCrsMatrix_MatrixAdapter_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,20 @@ namespace Amesos2 {
int myNRows = this->mat_->NumMyRows();
int myNnz = this->mat_->NumMyNonzeros();
if(current_phase == PREORDERING || current_phase == SYMBFACT) {
// workspace for column major
KV_GS pointers_t;
KV_GO indices_t;

// gether rowptr
Kokkos::resize(recvCounts, nRanks);
Kokkos::resize(recvDispls, nRanks+1);

// index-bases
global_ordinal_t rowIndexBase = rowMap->getIndexBase();
global_ordinal_t colIndexBase = colMap->getIndexBase();
// map from global to local
host_ordinal_type_array perm_g2l;
host_ordinal_type_array perm_l2g;
// workspace for column major
KV_GS pointers_t;
KV_GO indices_t;
bool need_to_perm = false;
{
#ifdef HAVE_AMESOS2_TIMERS
Teuchos::RCP< Teuchos::Time > gatherTime = Teuchos::TimeMonitor::getNewCounter ("Amesos2::gather(rowptr)");
Expand All @@ -142,13 +149,38 @@ namespace Amesos2 {
}
recvDispls(nRanks) = 0;
}
if (myRank == 0 && column_major) {
// gether g2l perm (convert to 0-base)
{
host_ordinal_type_array lclMap;
Kokkos::resize(lclMap, myNRows);
if (myRank == 0) {
Kokkos::resize(perm_g2l, nRows);
Kokkos::resize(perm_l2g, nRows);
} else {
Kokkos::resize(perm_g2l, 1);
}
for (int i=0; i < myNRows; i++) {
lclMap(i) = rowMap->getGlobalElement(i);
}
Teuchos::gatherv<int, local_ordinal_t> (lclMap.data(), myNRows, perm_g2l.data(),
recvCounts.data(), recvDispls.data(),
0, *comm);
if (myRank == 0) {
for (int i=0; i < nRows; i++) {
perm_g2l(i) -= rowIndexBase;
perm_l2g(perm_g2l(i)) = i;
if (i != perm_g2l(i)) need_to_perm = true;
}
}
}
if (myRank == 0 && (column_major || need_to_perm)) {
Kokkos::resize(pointers_t, nRows+1);
} else if (myRank != 0) {
Kokkos::resize(pointers_t, 2);
}
int *pointers_ = (myRank != 0 || column_major ? pointers_t.data() : pointers.data());
Teuchos::gatherv<int, local_ordinal_t> (&lclRowptr[1], myNRows, &pointers_[1],
local_ordinal_t sendIdx = (myNRows > 0 ? 1 : 0); // To skip sending the first rowptr entry (note: 0, if local matrix is empty)
local_ordinal_t *pointers_ = ((myRank != 0 || (column_major || need_to_perm)) ? pointers_t.data() : pointers.data());
Teuchos::gatherv<int, local_ordinal_t> (&lclRowptr[sendIdx], myNRows, &pointers_[1],
recvCounts.data(), recvDispls.data(),
0, *comm);
if (myRank == 0) {
Expand All @@ -157,13 +189,17 @@ namespace Amesos2 {
recvCounts(0) = pointers_[recvDispls(1)];
local_ordinal_t displs = recvCounts(0);
for (int p = 1; p < nRanks; p++) {
// save recvCounts from pth MPI
recvCounts(p) = pointers_[recvDispls(p+1)];
// shift pointers for pth MPI to global
for (int i = 1+recvDispls(p); i <= recvDispls(p+1); i++) {
pointers_[i] += displs;
// skip "Empty" submatrix (no rows)
// recvCounts(p) is zero, while pointers_[recvDispls(p+1)] now contains nnz from p-1
if (recvDispls(p+1) > recvDispls(p)) {
// save recvCounts from pth MPI
recvCounts(p) = pointers_[recvDispls(p+1)];
// shift pointers for pth MPI to global
for (int i = 1+recvDispls(p); i <= recvDispls(p+1); i++) {
pointers_[i] += displs;
}
displs += recvCounts(p);
}
displs += recvCounts(p);
}
ret = pointers_[nRows];
}
Expand All @@ -182,43 +218,70 @@ namespace Amesos2 {
}
// -- convert to global colids
KV_GO lclColind_ ("localColind_", myNnz);
for (int i = 0; i < int(myNnz); i++) lclColind_(i) = colMap->getGlobalElement((lclColind[i]));
if (column_major) {
for (int i = 0; i < int(myNnz); i++) lclColind_(i) = (colMap->getGlobalElement((lclColind[i])) - colIndexBase);
if (column_major || need_to_perm) {
Kokkos::resize(indices_t, indices.extent(0));
Teuchos::gatherv<int, local_ordinal_t> (lclColind_.data(), myNnz, indices_t.data(),
Teuchos::gatherv<int, local_ordinal_t> (lclColind_.data(), myNnz, indices_t.data(),
recvCounts.data(), recvDispls.data(),
0, *comm);
} else {
Teuchos::gatherv<int, local_ordinal_t> (lclColind_.data(), myNnz, indices.data(),
Teuchos::gatherv<int, local_ordinal_t> (lclColind_.data(), myNnz, indices.data(),
recvCounts.data(), recvDispls.data(),
0, *comm);
}
}
if (myRank == 0 && column_major) {
if (myRank == 0) {
#ifdef HAVE_AMESOS2_TIMERS
Teuchos::RCP< Teuchos::Time > gatherTime = Teuchos::TimeMonitor::getNewCounter ("Amesos2::gather(transpose index)");
Teuchos::TimeMonitor GatherTimer(*gatherTime);
#endif
// Map to transpose
Kokkos::resize(transpose_map, ret);
// Transopose to convert to CSC
for (int i=0; i<=nRows; i++) {
pointers(i) = 0;
}
for (int k=0; k<ret; k++) {
if (indices_t(k) < nRows-1) {
pointers(indices_t(k)+2) ++;
if (column_major) {
// Map to transpose
Kokkos::resize(transpose_map, ret);
// Transopose to convert to CSC
for (int i=0; i<=nRows; i++) {
pointers(i) = 0;
}
}
for (int i=1; i < nRows; i++) {
pointers(i+1) += pointers(i);
}
for (int i=0; i<nRows; i++) {
for (int k=pointers_t(i); k<pointers_t(i+1); k++) {
transpose_map(k) = pointers(1+indices_t(k));
indices(pointers(1+indices_t(k))) = i;
pointers(1+indices_t(k)) ++;
for (int k=0; k<ret; k++) {
int col = indices_t(k);
if (col < nRows-1) {
pointers(col+2) ++;
}
}
for (int i=1; i < nRows; i++) {
pointers(i+1) += pointers(i);
}
// nonzeroes in each column are sorted in ascending row
for (int row=0; row<nRows; row++) {
int i = perm_g2l(row);
for (int k=pointers_t(i); k<pointers_t(i+1); k++) {
int col = indices_t(k);
transpose_map(k) = pointers(1+col);
indices(pointers(1+col)) = row;
pointers(1+col) ++;
}
}
} else if (need_to_perm) {
// Map to permute
Kokkos::resize(transpose_map, ret);
for (int i=0; i<nRows; i++) {
int row = perm_g2l(i);
pointers(row+2) = pointers_t(i+1)-pointers_t(i);
}
for (int i=1; i < nRows; i++) {
pointers(i+1) += pointers(i);
}
for (int i=0; i<nRows; i++) {
int row = perm_g2l(i);
for (int k=pointers_t(i); k<pointers_t(i+1); k++) {
int col = indices_t(k);
transpose_map(k) = pointers(1+row);
indices(pointers(1+row)) = col;
pointers(1+row) ++;
}
}
} else {
Kokkos::resize(transpose_map, 0);
}
}
}
Expand All @@ -229,22 +292,25 @@ namespace Amesos2 {
Teuchos::RCP< Teuchos::Time > gatherTime = Teuchos::TimeMonitor::getNewCounter ("Amesos2::gather(nzvals)");
Teuchos::TimeMonitor GatherTimer(*gatherTime);
#endif
if (column_major) {
// gather nzvals
if (transpose_map.extent(0) > 0) {
Kokkos::resize(nzvals_t, nzvals.extent(0));
Teuchos::gatherv<int, scalar_t> (lclNzvals, myNnz, nzvals_t.data(),
Teuchos::gatherv<int, scalar_t> (lclNzvals, myNnz, nzvals_t.data(),
recvCounts.data(), recvDispls.data(),
0, *comm);
} else {
Teuchos::gatherv<int, scalar_t> (lclNzvals, myNnz, nzvals.data(),
Teuchos::gatherv<int, scalar_t> (lclNzvals, myNnz, nzvals.data(),
recvCounts.data(), recvDispls.data(),
0, *comm);
}
}
if (myRank == 0 && column_major) {
if (myRank == 0) {
// Insert Numerical values to transopose matrix
ret = pointers(nRows);
for (int k=0; k<ret; k++) {
nzvals(transpose_map(k)) = nzvals_t(k);
if (transpose_map.extent(0) > 0) {
for (int k=0; k<ret; k++) {
nzvals(transpose_map(k)) = nzvals_t(k);
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/amesos2/src/Amesos2_Superlu_FunctionMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ namespace SLU {
#include "slu_util.h"
#include "superlu_enum_consts.h"

#undef EMPTY

void
at_plus_a(
const int n, /* number of columns in matrix A. */
Expand Down
2 changes: 2 additions & 0 deletions packages/amesos2/src/Amesos2_Superludist_TypeMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ namespace SLUD {
}
#endif // HAVE_TEUCHOS_COMPLEX

#undef EMPTY

// multiplication of SLUD types
template <typename slu_scalar_t, typename slu_mag_t>
struct slu_dist_mult {};
Expand Down
Loading
Loading