Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Nov 4, 2023
1 parent cb7ecea commit bb2b7b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions ParU/Source/paru_factorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
ParU_Ret paru_exec_tasks_seq(int64_t t, int64_t *task_num_child, paru_work *Work,
ParU_Numeric *Num)
{
DEBUGLEVEL(1);
DEBUGLEVEL(0);
ParU_Symbolic *Sym = Work->Sym;
int64_t *task_parent = Sym->task_parent;
int64_t daddy = task_parent[t];
Expand Down Expand Up @@ -92,7 +92,7 @@ ParU_Ret paru_exec_tasks_seq(int64_t t, int64_t *task_num_child, paru_work *Work
ParU_Ret paru_exec_tasks(int64_t t, int64_t *task_num_child, int64_t &chain_task,
paru_work *Work, ParU_Numeric *Num)
{
DEBUGLEVEL(1); // FIXME
DEBUGLEVEL(0); // FIXME
ParU_Symbolic *Sym = Work->Sym;
int64_t *task_parent = Sym->task_parent;
int64_t daddy = task_parent[t];
Expand Down Expand Up @@ -191,7 +191,7 @@ ParU_Ret paru_exec_tasks(int64_t t, int64_t *task_num_child, int64_t &chain_task
ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym,
ParU_Numeric **Num_handle, ParU_Control *user_Control)
{
DEBUGLEVEL(1); // FIXME
DEBUGLEVEL(0); // FIXME
PARU_DEFINE_PRLEVEL;
#ifndef NTIME
double my_start_time = PARU_OPENMP_GET_WTIME;
Expand Down Expand Up @@ -280,7 +280,7 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym,
int64_t ntasks = Sym->ntasks;
int64_t *task_depth = Sym->task_depth;
std::vector<int64_t> task_Q;

int64_t *task_num_child ;
#pragma omp atomic write
task_num_child = Work->task_num_child;
Expand Down Expand Up @@ -343,6 +343,7 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym,

if ((int64_t)task_Q.size() * 2 > Control->paru_max_threads)
{
printf ("Parallel:\n") ;
PRLEVEL(1, ("Parallel\n"));
// chekcing user input
PRLEVEL(1, ("Control: max_th=" LD " scale=" LD " piv_toler=%lf "
Expand All @@ -367,11 +368,13 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym,
int64_t start = 0;
PRLEVEL(
1, ("%% size=" LD ", steps =" LD ", stages =" LD "\n", size, steps, stages));
printf ("stages " LD "\n", stages) ;

for (int64_t ii = 0; ii < stages; ii++)
{
if (start >= size) break;
int64_t end = start + steps > size ? size : start + steps;
printf ("stage " LD "\n", ii) ;
PRLEVEL(1, ("%% doing Queue tasks <" LD "," LD ">\n", start, end));
#pragma omp parallel proc_bind(spread) \
num_threads(Control->paru_max_threads)
Expand Down Expand Up @@ -409,6 +412,7 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym,
{
#pragma omp atomic write
Work->naft = 1;
printf ("remaining " LD "\n", chain_task) ;
PRLEVEL(1, ("Chain_taskd " LD " has remained\n", chain_task));
info = paru_exec_tasks_seq(chain_task, task_num_child, Work, Num);
}
Expand Down Expand Up @@ -451,6 +455,7 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym,
// finalize the permutation
//--------------------------------------------------------------------------

printf ("finalize permutation\n") ;
PRLEVEL(1, ("finalize permutation\n"));
info = paru_finalize_perm(Sym, Num); // to form the final permutation
paru_free_work(Sym, Work); // free the work DS
Expand Down
2 changes: 1 addition & 1 deletion ParU/Source/paru_internal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extern "C"
// FIXME NPR and NDEBUG enabled
#undef NPR
// uncomment the following line to turn on debugging mode
#undef NDEBUG
// #undef NDEBUG
// uncomment the following line to turn on OpenMP timing
//#undef NTIME

Expand Down

0 comments on commit bb2b7b5

Please sign in to comment.