Skip to content

456 hpcg 2 amg v cycle#42

Open
djelovina wants to merge 17 commits into
developfrom
456-hpcg-2-amg-v-cycle
Open

456 hpcg 2 amg v cycle#42
djelovina wants to merge 17 commits into
developfrom
456-hpcg-2-amg-v-cycle

Conversation

@djelovina

Copy link
Copy Markdown
Collaborator

No description provided.

@djelovina djelovina requested a review from anyzelman August 9, 2022 13:35

@anyzelman anyzelman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only code style issues in amg.hpp

Hope to review the remainder tomorrow. Likely merge into develop after releasing v0.6.

Comment thread include/graphblas/algorithms/amg/amg.hpp Outdated
Comment thread include/graphblas/algorithms/amg/amg.hpp
Comment thread include/graphblas/algorithms/amg/amg.hpp Outdated
Comment thread include/graphblas/algorithms/amg/amg.hpp Outdated
Comment thread include/graphblas/algorithms/amg/amg.hpp Outdated
Comment thread include/graphblas/algorithms/amg/amg.hpp Outdated
Comment thread include/graphblas/algorithms/amg/amg.hpp
Comment thread include/graphblas/algorithms/amg/amg.hpp Outdated
Comment thread include/graphblas/algorithms/amg/amg.hpp
Comment thread include/graphblas/algorithms/amg/amg.hpp
Denis Jelovina added 17 commits August 10, 2022 17:31
read v-cycle hierarchy  matrices
A_ ,R_ (matrix market format ) and vectors A_diag
and use them instead of them (instead of r-b-Gauss-Siedel) as
smoother (A_diag)  and coarsener (R_ and P_=R_^T).
Continue with CG-solver where v-cycle is the preconditioning step.
hpcg-benchmark leftovers cleanup
residual and error print
restore hpcg from develop
@djelovina djelovina force-pushed the 456-hpcg-2-amg-v-cycle branch from 81e8c03 to d1f2fe3 Compare August 10, 2022 15:37
@djelovina

Copy link
Copy Markdown
Collaborator Author

@anyzelman should I rebase again and finalize this PR?

namespace algorithms {

/**
* Algebraic Multi-grid algorithm relying on level_ matrices from AMGCL.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo? (level_ matrices -> level-matrices?)

*
* Finds the solution x of an \f$ A x = b \f$ algebraic system by running
* the AMG algorithm. AMG implementation (as the standard one) couples a
* standard CG algorithm with a V-cycle multi-grid solver to initially

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo (double space)

* \p data; otherwise, the refinement is not performed and only the CG
* algorithm is run.
*
* This implementation assumes that the vectors and matrices inside \p data

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\p should be \a (\a refers to arguments)

/**
* Algebraic Multi-grid algorithm relying on level_ matrices from AMGCL.
*
* Finds the solution x of an \f$ A x = b \f$ algebraic system by running

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first x should be \f$ x \f$ ?

* - amg_data#b with the right-hand side vector \f$ b \f$
* - amg_data#A_diagonal with the diagonal values of the matrix
* - amg_data#coarser_level with the information for
* the coarser multi-grid run (if any)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use spaces to align the' with with' in the line above it

Comment thread tests/smoke/amg.cpp
return 0;
}

static void parse_arguments( simulation_input &sim_in, size_t &outer_iterations,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enter after (

Comment thread tests/smoke/amg.cpp
}

static void parse_arguments( simulation_input &sim_in, size_t &outer_iterations,
double &max_residual_norm, int argc, char **argv ) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enter before )

Comment thread tests/smoke/amg.cpp
parser.parse( argc, argv );

std::string matAfile = sim_in.matAfile_c_str;
if ( ! matAfile.empty() ) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove space after !

Comment thread tests/smoke/amg.cpp
Comment on lines +694 to +695
}
else {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put on same line

Comment thread tests/smoke/amg.cpp
std::cout << "Setting number of iterations to 1" << std::endl;
sim_in.max_iterations = 1;
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enter after }

@anyzelman

Copy link
Copy Markdown
Member

Hi Denis, thanks a lot, looking great! I have made some additional requests for changes-- all minor / code style related. If some of those requested things are as a surprise, please add it to the issue about coding style so that we may clarify that in a code style guide.

As an additional request following the chat earlier, this MR requires AMGCL as a dependence correct? Can we make its compilation optional through CMake parameters (which may already be the case), and then add switches to bootstrap.sh to control those in a user-friendly way? Then finally, also document the flags somewhere (in ./docs, e.g.).

@anyzelman

Copy link
Copy Markdown
Member

Just to sync the status-- is this one blocking on a refactoring with HPCG and CG?

@djelovina

Copy link
Copy Markdown
Collaborator Author

Just to sync the status-- is this one blocking on a refactoring with HPCG and CG?

Rather the opposite, this one will be added on top of the refactored HPCG (and CG).
If urgent, we can always merge it as it is, and then do the refactoring of this code after HPCG is done.

@anyzelman anyzelman closed this Dec 27, 2022
@anyzelman anyzelman reopened this Dec 27, 2022
@anyzelman

Copy link
Copy Markdown
Member

Just to sync the status-- is this one blocking on a refactoring with HPCG and CG?

Rather the opposite, this one will be added on top of the refactored HPCG (and CG). If urgent, we can always merge it as it is, and then do the refactoring of this code after HPCG is done.

not urgent, waiting for changes then, and happy hols!

@anyzelman

Copy link
Copy Markdown
Member

Waiting for #167 to merge first (right? @alberto-scolari , @djelovina )

If confirmed, this also then will target the v0.8 release.

@anyzelman anyzelman added this to the v0.9 milestone Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants