Added "klu_memgrow_factor" option to control the KLU memory grow factor

This commit is contained in:
Francesco Lannutti 2020-06-30 23:10:23 +02:00 committed by Holger Vogt
parent 5513f6e5f6
commit 49f6444957
7 changed files with 19 additions and 1 deletions

View File

@ -328,6 +328,7 @@ struct CKTcircuit {
#ifdef KLU
unsigned int CKTkluMODE:1;
unsigned int CKTkluMemGrowFactor : 1 ;
#endif
};

View File

@ -121,6 +121,12 @@ enum {
OPT_INDVERBOSITY,
OPT_EPSMIN,
OPT_CSHUNT,
#ifdef KLU
OPT_SPARSE,
OPT_KLU_MEMGROW_FACTOR,
#endif
};
#ifdef XSPICE

View File

@ -76,6 +76,7 @@ struct TSKtask {
#ifdef KLU
unsigned int TSKkluMODE:1;
unsigned int TSKkluMemGrowFactor : 1 ;
#endif
};

View File

@ -48,6 +48,7 @@ NIinit(CKTcircuit *ckt)
ckt->CKTmatrix->CKTkluMODE = ckt->CKTkluMODE ; /* TO BE SUBSTITUTED WITH THE HEURISTICS */
klu_defaults (ckt->CKTmatrix->CKTkluCommon) ;
ckt->CKTmatrix->CKTkluCommon->memgrow = ckt->CKTkluMemGrowFactor ;
#endif
ckt->CKTniState = NIUNINITIALIZED;

View File

@ -111,6 +111,7 @@ CKTdoJob(CKTcircuit* ckt, int reset, TSKtask* task)
#ifdef KLU
ckt->CKTkluMODE = task->TSKkluMODE;
ckt->CKTkluMemGrowFactor = task->TSKkluMemGrowFactor ;
#endif
#ifdef NEWTRUNC

View File

@ -79,6 +79,7 @@ CKTnewTask(CKTcircuit *ckt, TSKtask **taskPtr, IFuid taskName, TSKtask **defPtr)
#ifdef KLU
tsk->TSKkluMODE = def->TSKkluMODE;
tsk->TSKkluMemGrowFactor = def->TSKkluMemGrowFactor ;
#endif
#ifdef NEWTRUNC
@ -141,6 +142,7 @@ CKTnewTask(CKTcircuit *ckt, TSKtask **taskPtr, IFuid taskName, TSKtask **defPtr)
#ifdef KLU
tsk->TSKkluMODE = CKTkluON;
tsk->TSKkluMemGrowFactor = 1.2 ;
#endif
#if (1) /*CDHW*/

View File

@ -180,6 +180,10 @@ CKTsetOpt(CKTcircuit *ckt, JOB *anal, int opt, IFvalue *val)
case OPT_SPARSE:
task->TSKkluMODE = (val->iValue == 0);
break;
case OPT_KLU_MEMGROW_FACTOR:
task->TSKkluMemGrowFactor = (val->rValue == 1.2);
break;
#endif
/* gtri - begin - wbk - add new options */
@ -343,7 +347,9 @@ static IFparm OPTtbl[] = {
#ifdef KLU
{ "sparse", OPT_SPARSE, IF_SET|IF_FLAG,
"Set SPARSE 1.3 as Direct Linear Solver" }
"Set SPARSE 1.3 as Direct Linear Solver" },
{ "klu_memgrow_factor", OPT_KLU_MEMGROW_FACTOR, IF_SET|IF_FLAG,
"KLU Memory Grow Factor (default is 1.2)" }
#endif
};