Skip to content

Commit

Permalink
Amesos2:SuperLU_MT : use current number of threads as the default "np…
Browse files Browse the repository at this point in the history
…rocs" parameter value
  • Loading branch information
iyamazaki committed Dec 16, 2021
1 parent 9732a48 commit 3e0964b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/amesos2/src/Amesos2_Superlumt_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ namespace Amesos2 {

RCP<const Teuchos::ParameterList> valid_params = getValidParameters_impl();


data_.options.nprocs = parameterList->get<int>("nprocs", 1);
int default_nprocs = Kokkos::DefaultHostExecutionSpace::concurrency();
data_.options.nprocs = parameterList->get<int>("nprocs", default_nprocs);

data_.options.trans = this->control_.useTranspose_ ? SLUMT::TRANS : SLUMT::NOTRANS;
// SuperLU_MT "trans" option can override the Amesos2 option
Expand Down Expand Up @@ -521,10 +521,11 @@ namespace Amesos2 {
if( is_null(valid_params) ){
Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();

int default_nprocs = Kokkos::DefaultHostExecutionSpace::concurrency();
Teuchos::RCP<EnhancedNumberValidator<int> > nprocs_validator
= Teuchos::rcp( new EnhancedNumberValidator<int>() );
nprocs_validator->setMin(1);
pl->set("nprocs", 1, "The number of processors to factorize with", nprocs_validator);
nprocs_validator->setMin(default_nprocs);
pl->set("nprocs", default_nprocs, "The number of processors to factorize with", nprocs_validator);

setStringToIntegralParameter<SLUMT::trans_t>("trans", "NOTRANS",
"Solve for the transpose system or not",
Expand Down

0 comments on commit 3e0964b

Please sign in to comment.