Skip to content

Commit

Permalink
Merge pull request #10030 from iyamazaki/amesos2-superlumt
Browse files Browse the repository at this point in the history
Amesos2 : SuperLU_MT adjusts 'nprocs' default parameter
  • Loading branch information
iyamazaki authored Dec 27, 2021
2 parents a5e2c40 + 3e0964b commit 285cc38
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 285cc38

Please sign in to comment.