assert error message is not usable

Open
#254 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
hpc

Research direction

Start at ArraySlice.hpp:294 and reproduce the assertion output described in the issue. Trace how the assertion message is assembled and identify why the string expressions appear unexpanded. Done means the LVArray bounds-check assertion presents a readable error message; the payload names no test to run.

Written by the indexing model from the issue text.

Description

When I run geosx I happen to have assert errors in LVArray that are not easy to understand as strings are not correctly built:
ArraySlice.hpp:294: std::enable_if<<expression>, T &>::type LvArray::ArraySlice<T, NDIM_TPARAM, USD_TPARAM, INDEX_TYPE>::operator[](INDEX_TYPE) const [with int U = 1; T = const int; int NDIM_TPARAM = 1; int USD_TPARAM = -1; INDEX_TYPE = int]: block: [31,0,0], thread: [4,0,0] Assertion `false && "EXP = " "index < 0 || index >= m_dims[ 0 ]" "MSG = " "\"Array Bounds Check Failed: index=\" << index << \" m_dims[0]=\" << m_dims[0]"` failed.

Dominant language
C++
Stars
49
Forks
9
Avg merge
5d 15h
Merged PRs (30d)
1

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.

More from GEOS-DEV/LvArray

All issues in GEOS-DEV/LvArray

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.