From 1099b5452e09315c7e60323cb9da8dd982c62e89 Mon Sep 17 00:00:00 2001 From: Francesco Lannutti Date: Tue, 21 Jun 2016 15:03:21 +0200 Subject: [PATCH] Avoid crashing during the Sensitivity Analysis in KLU, stating that it isn't supported --- src/spicelib/analysis/cktsens.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/spicelib/analysis/cktsens.c b/src/spicelib/analysis/cktsens.c index 8c3ea519d..cea920caa 100644 --- a/src/spicelib/analysis/cktsens.c +++ b/src/spicelib/analysis/cktsens.c @@ -62,6 +62,15 @@ static double inc_freq(double freq, int type, double step_size); static int error; int sens_sens(CKTcircuit *ckt, int restart) { + +#ifdef KLU + if (ckt->CKTkluMODE) + { + fprintf (stderr, "\n\n\tThe Sensitivity Analysis is not supported in KLU environment\n\tPlease add '.options sparse' in you netlist\n\n\n") ; + return OK ; + } else { +#endif + SENS_AN *job = (SENS_AN *) ckt->CKTcurJob; static int size; @@ -626,6 +635,11 @@ int sens_sens(CKTcircuit *ckt, int restart) #endif return OK; + +#ifdef KLU + } +#endif + } double