mdolab / mdolab/adflow

turbKSP crashes for certain flow conditions

Open
#211 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Fortran
Stars
332
Forks
124
PR merge metrics
No merged PRs in 30d

Description

Description

Using turbKSP ("ANKUseTurbDADI": False) can cause optimizations to crash seemingly randomly with the following error:

[106]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[106]PETSC ERROR: Argument out of range
[106]PETSC ERROR: Inserting a new blocked indexed nonzero block (1231606, 1253914) into matrix
[106]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[106]PETSC ERROR: Petsc Release Version 3.15.1, Jun 17, 2021
[106]PETSC ERROR: #1 MatSetValuesBlocked_MPIBAIJ() at packages/petsc-3.15.1/src/mat/impls/baij/mpi/mpibaij.c:427
[106]PETSC ERROR: #2 MatSetValuesBlocked() at packages/petsc-3.15.1/src/mat/interface/matrix.c:1866
 ---------------------------------------------------------------------------
PETSc or MPI Error. Error Code 63. Detected on Proc **
Error at line:   644 in file: adjointUtils.F90
 ---------------------------------------------------------------------------

The reason for this is not clear, especially because this occurs in the middle of optimizations and analyses in previous iterations work fine.

Code versions
  • PETSc: 3.15

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the crash with turbKSP enabled via ANKUseTurbDADI=False, then inspect adjointUtils.F90 around line 644 and the PETSc matrix operation in the failing optimization iteration. Compare the flow conditions and matrix indices with successful iterations. Done means the reported conditions no longer produce the PETSc or MPI error, with a regression check if the project provides one.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
hpc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.