From 0cfa6627af1dc20bb641f8021d54837ae3cdf2d2 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 28 Jul 2026 23:12:52 +0200 Subject: [PATCH] Issue warning message only once --- src/maths/KLU/klusmp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/maths/KLU/klusmp.c b/src/maths/KLU/klusmp.c index 4b68eb1f9..8e20d1d26 100644 --- a/src/maths/KLU/klusmp.c +++ b/src/maths/KLU/klusmp.c @@ -1828,6 +1828,8 @@ SMPfindElt (SMPmatrix *eMatrix, int Row, int Col, int CreateIfMissing) { MatrixPtr Matrix = eMatrix->SPmatrix ; + static bool nomsg = TRUE; + if (eMatrix->CKTkluMODE) { int i ; @@ -1859,7 +1861,10 @@ SMPfindElt (SMPmatrix *eMatrix, int Row, int Col, int CreateIfMissing) Row = Matrix->ExtToIntRowMap [Row] ; Col = Matrix->ExtToIntColMap [Col] ; if (Row < 0 || Col < 0) { - fprintf(stderr, "Warning: element not found, as internal Row/Col map is not avaialable!\n"); + if (nomsg) { + fprintf(stderr, "Warning: element not found, as internal Row/Col map is not avaialable!\n"); + nomsg = FALSE; + } return NULL; } Element = Matrix->FirstInCol [Col] ;