compdyn / partmc

Particle-resolved stochastic atmospheric aerosol model
http://lagrange.mechse.illinois.edu/partmc/
GNU General Public License v2.0
28 stars 16 forks source link

Update SUNDIALS API in condense solver. Closes #33 #167

Closed slayoo closed 2 years ago

slayoo commented 2 years ago

Just a first try at solving the SUNDIALS API problem.

Seems to work locally with SUNDIALS 5.8.0 (i.e. the test_condense passes and it does so much quicker that without supplying the preconditioner).

We can try to retain compatibility with the old version with some #ifdefs, if needed.

Getting SUNDIALS installed in the docker images and pointing CMake to it is essential, let me ask for your input here.

HTH, Sylwester

slayoo commented 2 years ago

@mwest1066 success - compilation with condensation support and condense test run on CI OK:

image
jcurtis2 commented 2 years ago

I've manually compiled and tested this running Sundials 5.8.0 with all tests passing.

However it looks like with the CAMP merge (#162), we introduced some unnecessary things to the build process in CMakeList.txt like SuiteSparse (and metis to the dockerfile) that went unnoticed as we weren't testing the condensation code at the time. These aren't necessary when turning on SUNDIALS for the condensation code.

I figure it makes as much sense to remove it here (in CMakeList.txt and the Dockerfile) rather than a separate pull request, thoughts?

slayoo commented 2 years ago

for the record, yet another change will be needed to make it work with Sundials >= 6.0.0 https://github.com/LLNL/sundials/releases/tag/v6.0.0

slayoo commented 2 years ago

Thank you, @jcurtis2!