Skip to content

Commit

Permalink
FIX: in sp_ienv.c, enforce RELAX to be bounded by MAXSUP.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyeli committed May 22, 2022
1 parent 72d7011 commit 4459a89
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions SRC/sp_ienv.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,22 @@ sp_ienv_dist(int ispec, superlu_dist_options_t *options)
char* ttemp;

switch (ispec) {
case 2:
case 2:
ttemp = getenv("SUPERLU_RELAX");
int k;
if(ttemp)
{
return(atoi(ttemp));
}else if(getenv("NREL"))
k = atoi(ttemp);
}else if( (ttemp = getenv("NREL")) )
{
return(atoi(getenv("NREL")));
k = atoi(ttemp);
}
else
return (options->superlu_relax);

else {
k = options->superlu_relax;
}
k = SUPERLU_MIN( k, sp_ienv_dist(3,options) ); // not to exceed MAXSUP
return (k);

case 3:
ttemp = getenv("SUPERLU_MAXSUP"); // take min of MAX_SUPER_SIZE in superlu_defs.h
if(ttemp)
Expand Down

0 comments on commit 4459a89

Please sign in to comment.