Skip to content

Conversation

@joehellmersNOAA
Copy link
Collaborator

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Example
  • Documentation

Description

Update Armadillo and SuperLU dependencies to newer versions. This allows building with gcc 14.x and 15.x.

Related Issues & Documents

QA Instructions, Screenshots, Recordings

Current unit tests and examples should ensure basic functionality.

Added/updated tests?

_We encourage you to test all code included with MOLE, including examples.

  • Yes
  • No, and this is why: Build process and current tests should verify
  • I need help with writing tests

Read Contributing Guide and Code of Conduct

[optional] Are there any post deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@jbrzensk
Copy link
Collaborator

@joehellmersNOAA These need to be manually tested for Linux, Windows, and osX. While code can compile fine, because of the interplay between Armadillo and SuperLU, linking or header errors do not show up until someone tries a "spsolve".

I tested for Linux gcc 14, but I need others to test for Windows and Mac.
@cpaolini has the ability to test for new Macs. @joehellmersNOAA, you can do the GCC-15 Linux, I assume?

Again, test here means you run some of the examples requiring a SuperLU solve:

  • elliptic1DLeftNeumannRightNeumann.cpp
  • elliptic1DLeftNeumannRightDirichlet.cpp
  • sturmLiouvilleHermite.cpp
  • elliptic3D.cpp
  • elliptic1D.cpp
  • sturmLiouvilleBessel.cpp
  • sturmLiouvilleHelmholtzDirichletRobin.cpp
  • lock_exchange.cpp
  • elliptic2D.cpp
  • Poisson2D.cpp
  • elliptic1DNonHomogeneousDirichlet.cpp
  • sturmLiouvilleChebyshev.cpp
  • elliptic1DHomogeneousDirichlet.cpp
  • sturmLiouvilleLaguerre.cpp
  • sturmLiouvilleLegendre.cpp
  • sturmLiouvilleHelmholtzDirichletDirichlet.cpp

Usually when the linking fails, it fails for all of them.

@joehellmersNOAA
Copy link
Collaborator Author

I successfully ran all the examples for C++ except convection_diffusion3D, which hung, on Ubuntu 24.04.3 LTS, with Spack provided gcc 15.1.0.

When I revert to the current versions of Armadillo and SuperLU and gcc 13.3.0 I get the same problem with convection_diffusion3D.

BTW, I tried to create a script to run these but I was stymied by the presentation of GUI plots. It might be nice to make a requirement for C++ examples (Fortran too perhaps) to allow for a non-GUI option when running. Maybe setting an environment variable, or pass in an argument.

@jbrzensk
Copy link
Collaborator

Thats a good find. It is the creation of the Dadv on line 139 is super slow. IDK why.They are kinda big, it's a million non-zero elements, but it should go kinda fast? If you break up the command, it goes faster. Maybe an issue for another time.

@cpaolini you test the Mac Silicon runs?

@joehellmersNOAA
Copy link
Collaborator Author

joehellmersNOAA commented Dec 19, 2025

@jbrzensk I was able to build and test the examples on Mac ARM (i.e. Mac Silicon).

In order to do this I had to

  1. Install dependencies per the instructions (except Eigen)
  2. Install Eigen 3.3.7 using Spack (spack install [email protected])
  3. Load Eigen (spack load [email protected])
  4. Setup some environment variables for OMP
    export LDFLAGS="-L/opt/homebrew/opt/libomp/lib"
    export CPPFLAGS="-I/opt/homebrew/opt/libomp/include"
  5. Follow the normal instructions

I have gcc 15.2.0 installed on this system.

@jbrzensk jbrzensk merged commit 8fe887f into main Dec 22, 2025
18 of 19 checks passed
@jbrzensk jbrzensk deleted the dev/upd-cpp-dependencies branch December 22, 2025 20:43
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.

3 participants