# CalculiX with AOCL solver

**URL:** <https://calculix.discourse.group/t/calculix-with-aocl-solver/2411>\
**Category:** Uncategorized\
**Created:** [September 20, 2024, 11:33am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411 "2024-09-20T11:33:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [September 20, 2024, 11:33am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/1 "2024-09-20T11:33:42Z")

</div>

hi, recently i’m looking of matrix library solver for AMD cpu since experiences MKL seems not optimized. Several tests from external references (i.e Mathworks) have shown faster using AMD Optimizing CPU Libraries ([AOCL](https://www.amd.com/en/developer/aocl.html)) than Intel MKL (Pardiso) about 20% speed up. Hopefully, this solver will be available in the future version of CalculiX, best.

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [September 22, 2024, 4:52pm UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/2 "2024-09-22T16:52:53Z")

</div>

@xyont, are these just optimized blas, lapack, libm, etc, for AMD? Do they have an actual sparse solver like pardiso? Remember that the pardiso solver that ships with MKL is an older version of the solver. The newer version is faster compared to the MKL versions - [Panua Technologies](https://panua.ch/pardiso/)

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [September 22, 2024, 5:35pm UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/3 "2024-09-22T17:35:30Z")

</div>

seems it has own sparse solver when looking from documentation and project. The link of Pardiso from Panua is an improvement of original versions, the library is proprietary commercial for both end user and developer, but Intel MKL available free for user. Maybe this is the reason to not become popular as Intel does, even shown and reported faster than MKL. In contrast, AOCL is opensource project by AMD, it has been used by many also, e.g Matlab, Ansys, LS Dyna, MSC Nastran and Comsol,

---

<div class="post-metadata">

**Author:** ![c3d10](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@c3d10](https://calculix.discourse.group/u/c3d10)\
**Post date:** [December 3, 2024, 12:01am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/4 "2024-12-03T00:01:32Z")

</div>

Did you ever find any info on using AOCL with calculix? I was wondering the same thing.

---

<div class="post-metadata">

**Author:** ![feacluster](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/feacluster/32/394_2.png) [@feacluster](https://calculix.discourse.group/u/feacluster)\
**Post date:** [December 4, 2024, 6:36pm UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/5 "2024-12-04T18:36:10Z")

</div>

I could look into it, but not sure what kind of speedup to expect. If just 10% or less then not sure it is worth the effort. And not sure how many people use AMD cpus?

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [December 5, 2024, 2:05am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/6 "2024-12-05T02:05:34Z")

</div>

> [@feacluster](#):
>
> And not sure how many people use AMD cpus?

Yeah… I think we have to find a better mechanism to include new solvers so that we could test different options for appropriate models. I would love to test petsc, trilinos, mumps, superlu, suitesparse/umfpack, but I haven’t had the chance to work on this.

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [December 5, 2024, 6:02am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/7 "2024-12-05T06:02:14Z")

</div>

> [@feacluster](#):
>
> If just 10% or less then not sure it is worth the effort

as comparison, some reported it has performed better in Ansys ([link](https://www.engineering.com/resources/performance-of-ansys-mechanical-optimized-with-aocl-on-amd-epyc-7003-series-processors/))

> Ansys Mechanical with AMD optimized AOCL BLIS deliver a geomean speedup of 1.26x with gains as much as 2.12x

---

<div class="post-metadata">

**Author:** ![rsmith](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/rsmith/32/1684_2.png) [@rsmith](https://calculix.discourse.group/u/rsmith)\
**Post date:** [December 5, 2024, 6:26am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/8 "2024-12-05T06:26:01Z")

</div>

> [@jbr](#):
>
> I think we have to find a better mechanism to include new solvers

If you do find time to work on that, please choose solvers that “match” CalculiX itself;

- free software,
- runs on all platforms that CalculiX runs on,
- [added 20241206] written in C or Fortran for easy integration.

If the source code for the solver is not available, finding bugs becomes a lot harder. And I suspect very few people will choose to spend thousands of euros on a solver.

Furthermore, linking CalculiX with a proprietary library violates the license that CalculiX is distributed under.

Added 20241206:

- Solvers written in Fortran or C are probably easiest to integrate.
- Ideally, one should _profile_ the existing and new solvers before investing much time in integration!

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [December 5, 2024, 4:22pm UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/9 "2024-12-05T16:22:28Z")

</div>

> [@rsmith](#):
>
> If you do find time to work on that, please choose solvers that “match” CalculiX itself;
> 
> - free software,
> - runs on all platforms that CalculiX runs on.

That’s exactly what I had in mind and those are fair points for advancing the use of ccx.

> [@rsmith](#):
>
> If the source code for the solver is not available, finding bugs becomes a lot harder. And I suspect very few people will choose to spend thousands of euros on a solver.

100% agree with you there.

> [@rsmith](#):
>
> Furthermore, linking CalculiX with a proprietary library violates the license that CalculiX is distributed under.

I’ll need to do a deep dive into the different licenses since each of these solvers operates under a unique license. I’m leaving the links here for future reference to review them thoroughly. These might also be useful for anyone else exploring the same topic:

- [Trilinos License](https://github.com/trilinos/Trilinos?tab=License-1-ov-file#readme)
- [SuiteSparse License](https://github.com/DrTimothyAldenDavis/SuiteSparse?tab=License-1-ov-file)
- [PETSc License](https://petsc.org/release/install/license/#license)
- [MUMPS License](https://mumps-solver.org/index.php?page=dwnld#license)
- [SuperLU License](https://portal.nersc.gov/project/sparse/superlu/License.txt)

---

<div class="post-metadata">

**Author:** ![NorbertH](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@NorbertH](https://calculix.discourse.group/u/NorbertH)\
**Post date:** [December 5, 2024, 9:27pm UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/10 "2024-12-05T21:27:31Z")

</div>

Don’t forget MFEM. That’s a great library and already got the solvers implemented.

[https://mfem.org/features/#built-in-solvers](https://mfem.org/features/#built-in-solvers)

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [December 6, 2024, 12:48am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/11 "2024-12-06T00:48:08Z")

</div>

> [@NorbertH](#):
>
> Don’t forget MFEM.

They use some of the ones I already mentioned, but I forgot about hypre, certainly worth exploring:

- [hypre License](https://github.com/hypre-space/hypre/blob/master/LICENSE-MIT)

---

<div class="post-metadata">

**Author:** ![c3d10](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@c3d10](https://calculix.discourse.group/u/c3d10)\
**Post date:** [December 10, 2024, 1:45am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/12 "2024-12-10T01:45:19Z")

</div>

I use AMD CPU’s (looking to upgrade to Ryzen 9 soon) but I’m sure they’re not all that common for HPC-type applications 😉

---

<div class="post-metadata">

**Author:** ![c3d10](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@c3d10](https://calculix.discourse.group/u/c3d10)\
**Post date:** [December 10, 2024, 1:46am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/13 "2024-12-10T01:46:22Z")

</div>

Agreed 110% on the profiling of solvers. I feel this is a common thing though (how many people need sparse equation solvers and how many sparse solvers are out there - quite a few), are there standard benchmarks that you’ve seen available for these options?

---

<div class="post-metadata">

**Author:** ![feacluster](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/feacluster/32/394_2.png) [@feacluster](https://calculix.discourse.group/u/feacluster)\
**Post date:** [December 11, 2024, 7:30pm UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/14 "2024-12-11T19:30:13Z")

</div>

I did some reading on AOCC sparse solver. Seems it is just an interative solver, not direct? I don’t believe many users are using iterative solvers with Calculix. That is common in CFD where all element are the same solid type. See:

[AOCL-Sparse](https://www.amd.com/en/developer/aocl/sparse.html)

If people are using iterative solvers then there are probably better ones to explore first before AOCC. Something with MPI capability specifically.

---

<div class="post-metadata">

**Author:** ![c3d10](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@c3d10](https://calculix.discourse.group/u/c3d10)\
**Post date:** [December 11, 2024, 8:19pm UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/15 "2024-12-11T20:19:08Z")

</div>

Interesting, why not use iterative solvers?

In my experience (commercial mechanical FEA tools for linear/nonlinear statics and modal dynamics), direct solvers are better for smaller problems and iterative solvers are more important for larger ones.

---

<div class="post-metadata">

**Author:** ![feacluster](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/feacluster/32/394_2.png) [@feacluster](https://calculix.discourse.group/u/feacluster)\
**Post date:** [December 11, 2024, 8:22pm UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/16 "2024-12-11T20:22:17Z")

</div>

Iterative solvers only work if your entire mesh is all solids. If there are any beams, rigids, shells etc. then they don’t converge.

---

<div class="post-metadata">

**Author:** ![c3d10](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@c3d10](https://calculix.discourse.group/u/c3d10)\
**Post date:** [December 11, 2024, 9:41pm UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/17 "2024-12-11T21:41:24Z")

</div>

Ah, interesting! I did some reading and this page helped clear up my confusion:  
[https://classes.engineering.wustl.edu/2009/spring/mase5513/abaqus/docs/v6.6/books/usb/default.htm?startat=pt03ch06s01aus39.html](https://classes.engineering.wustl.edu/2009/spring/mase5513/abaqus/docs/v6.6/books/usb/default.htm?startat=pt03ch06s01aus39.html)

Thanks!

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [December 22, 2024, 5:06am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/18 "2024-12-22T05:06:43Z")

</div>

AOCL is already implemented by many, maybe Ansys (Mechanical) user can confirm this limitation if true.

---

<div class="post-metadata">

**Author:** ![rsmith](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/rsmith/32/1684_2.png) [@rsmith](https://calculix.discourse.group/u/rsmith)\
**Post date:** [December 22, 2024, 12:21pm UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/19 "2024-12-22T12:21:10Z")

</div>

> [@c3d10](#):
>
> are there standard benchmarks that you’ve seen available for these options?

My feeling is that “standard benchmark” is somewhat of an oxymoron. 🙂

For benchmarking I tend to use whichever problems are taxing my current hardware.

Up until recently the iterative solver and SPOOLES were the only ones available on FreeBSD. Since the problems that I tend to work on are often beam-like, the iterative solver is a poor fit. SPOOLES works well enough even though I sometimes have to make the mesh coarse enough to fit into RAM. Not that big of an issue when using regular meshes of C3D20 or C3D10. Now I’ve built CalculiX with PaStiX, I have found it to be often but not always faster than SPOOLES. I haven’t done a proper comparison of memory use betewwn PaStiX and SPOOLES.

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [December 23, 2024, 12:37am UTC](https://calculix.discourse.group/t/calculix-with-aocl-solver/2411/20 "2024-12-23T00:37:08Z")

</div>

mostly FE code benchmarked for element formulation and type of analysis, only few doing for the solver performance. Previously i read some report from TNO Diana about MKL Pardiso, CalculiX about Spooles or iterative and later is PaStiX, also from [Ansys](https://www.ansys.com/it-solutions/benchmarks-overview) (Mechanical) about AOCL.
