New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matrix-free slower than classsical matrix-assembled method #4212
Comments
Was this on one of MFEM's examples? How big was the problem you tested in terms of DOFs? I assume you are running on CPU? |
I was running |
It looks like you are not using hypre preconditioners. For good performance you definitely want to use HYPRE's BoomerAMG (or AMS for H(curl) or ADS for H(div)) even if you run just on 1 processor. For partial assembly ( For H(div) and H(curl) problems, you can use LOR + ADS and LOR + AMS, respectively (illustrated in |
If you want the best performance with partial assembly on CPU and you are solving H1 diffusion, you can try the template code, illustrated in |
Thank you Dobrev. Eventually I hope to solve problems in H(curl) space with partial assembly methods. I'll look |
I compared the serial LOR preconditioner from
and option2
The later needs 46 iterations, while the former needs 69. What's special about LORSolver that it's more efficient than a GSSmoother with lor bilinearform as operator? |
I haven't looked closely at the code that you posted, but my guess would be that this is because |
Hi guys,
I'm interested in the matrix-free (partial assembly) feature of MFEM. With partial assembly enabled, I tried a Jacobian smoother preconditioner, an LOR preconditioner, as well as precondition by the assembled high-order matrix.
However, each CG iteration step costs more time than the classical method with 2nd order basis. I thought it's normal that matrix-free solver requires more iterations, but it's supposed to be faster in each matrix-vector multiplication.
For example, I test Poisson' equation on a 3d fichera mesh with 4th order basis function. Classical FEM solver with GSSmoother requires 80 iterations and 36 seconds. Matrix-free CG solver requires 80 iterations and 47 seconds preconditioned by assembled matrix, 138 iterations and 45 seconds preconditioned by LOR, and 195 iterations and 59 seconds preconditioned by OperatorJacobiSmoother.
It seems the matrix-vector evaluation of matrix-free methods are not (very) faster than sparse matrix-vector multiplication.
Is the basis order too low to observe the improvement of matrix-free method? Or it is hard to observe without AVX vectorization?
The text was updated successfully, but these errors were encountered: