Hi Cody,
That's great. So we should be able to link the brew-installed sundials
to our project unless logging was somehow enabled. I think there might
be a problem with the CMake options in SUNDIALS. The SUNDIALS
installation from Homebrew does not seem to enable logging:
https://urldefense.us/v3/__https://github.com/Homebrew/homebrew-core/blob/master/Formula/sundials.rb__;!!G2kpM7uM-TzIFchu!krUfYoYwDgaUGWWeruTpSInCe3WLKsvmvLKT5SDAjLKiqE-saelNjWxoPyoUNd3gUy1fDw$
It does not set SUNDIALS_BUILD_WITH_PROFILING to true as far as I can
tell. The only MPI-related CMake option being used seems to be
-DMPI_ENABLE=ON. When I try to link the CVODE library from the brew
installation of sundials on my macOS, I see linker errors that mean
SUNDIALS_LOGGING_ENABLE_MPI must have been set to true during the
homebrew compilation. Is it possible that the following line in SUNDIALS
might explain this:
sundials_option(SUNDIALS_LOGGING_ENABLE_MPI BOOL "${DOCSTR}"
"${ENABLE_MPI}" DEPENDS_ON ENABLE_MPI)
(from cmake/SundialsBuildOptionsPre.cmake, lines 88-89)
It seems to me that the deprecated MPI_ENABLE=ON enables ENABLE_MPI=ON,
which then, in turn, enables SUNDIALS_LOGGING_ENABLE_MPI. If this
happens, the default value of SUNDIALS_LOGGING_ENABLE_MPI would not be
correct.
Best regards,
Raymond
On 15.07.22 18:13, Balos, Cody Joe wrote:
> Hi Raymond,
>
> The SUNContext itself should not require MPI when SUNDIALS is built with
> MPI. It is actually the enabling of the profiling that causes MPI to be
> required. It would be best if the package managers did not enable
> profiling (which defaults to off) in the normal build as it can have a
> small impact performance too. Profiling is enabled/disabled with the
> CMake option SUNDIALS_BUILD_WITH_PROFILING.
>
> We will consider making the SUNContext optional, but I don't think it is
> necessary for this particular issue.
>
> Cody
> ------------------------------------------------------------------------
> *From:* sundials-users <
sundial...@llnl.gov> on behalf of Raymond
> Langer <
r.la...@ITV.RWTH-AACHEN.DE>
> *Sent:* Friday, July 15, 2022 8:29 AM
> *To:* sundials-users <
sundial...@llnl.gov>
> *Subject:* [sundials-users] Would it be possible to make the SUNContext
> <mailto:
SUNDIALS-USERS-...@LISTSERV.LLNL.GOV>
>
> ------------------------------------------------------------------------
https://urldefense.us/v3/__http://www.itv.rwth-aachen.de__;!!G2kpM7uM-TzIFchu!krUfYoYwDgaUGWWeruTpSInCe3WLKsvmvLKT5SDAjLKiqE-saelNjWxoPyoUNd1JklKlVg$