Skip to content
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

fails to build with sundials 7 #188

Open
drew-parsons opened this issue Sep 22, 2024 · 0 comments
Open

fails to build with sundials 7 #188

drew-parsons opened this issue Sep 22, 2024 · 0 comments

Comments

@drew-parsons
Copy link

sundials 7 has been recently released, and requires some code updates in dyssol.

One thing to note is that MPI support (when enabled) is now in sundials core, not only in the sundials parallel components, because of SUNComm. When building dyssol against MPI-enabled sundials 7, there will be a compilation error via sundials_matrix.h included in DAESolver.h, sundials_types.h:57:10: fatal error: mpi.h: No such file or directory. This can be easily worked around by using mpi compilers, CXX=mpicxx

Then, ida_impl.h is no longer provided in /usr/include/ida, so

[ 12%] Building CXX object CMakeFiles/libdyssol_shared.dir/EquationSolvers/NLSolver.cpp.o
/usr/bin/mpicxx -DGRAPHVIZ -DINSTALL_DOCS_PATH=\"/usr/share/Dyssol/docs\" -Dlibdyssol_shared_EXPORTS -I/projects/misc/build/dyssol-1.1.1+ds1/BaseSolvers -I/projects/misc/build/dyssol-1.1.1+ds1/CacheHandler -I/projects/misc/build/dyssol-1.1.1+ds1/EquationSolvers -I/projects/misc/build/dyssol-1.1.1+ds1/HDF5Handler -I/projects/misc/build/dyssol-1.1.1+ds1/MaterialsDatabase -I/projects/misc/build/dyssol-1.1.1+ds1/ModelsAPI -I/projects/misc/build/dyssol-1.1.1+ds1/Modules -I/projects/misc/build/dyssol-1.1.1+ds1/ScriptInterface -I/projects/misc/build/dyssol-1.1.1+ds1/SimulatorCore -I/projects/misc/build/dyssol-1.1.1+ds1/Utilities -I/projects/misc/build/dyssol-1.1.1+ds1/Modules/DustFormationTester -I/usr/include/hdf5/serial -I/usr/include/sundials -I/usr/include/graphviz -g -O2 -ffile-prefix-map=/projects/misc/build/dyssol-1.1.1+ds1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++17 -fPIC -MD -MT CMakeFiles/libdyssol_shared.dir/EquationSolvers/NLSolver.cpp.o -MF CMakeFiles/libdyssol_shared.dir/EquationSolvers/NLSolver.cpp.o.d -o CMakeFiles/libdyssol_shared.dir/EquationSolvers/NLSolver.cpp.o -c /projects/misc/build/dyssol-1.1.1+ds1/EquationSolvers/NLSolver.cpp
/projects/misc/build/dyssol-1.1.1+ds1/EquationSolvers/DAESolver.cpp:9:10: fatal error: ida/ida_impl.h: No such file or directory
    9 | #include <ida/ida_impl.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [CMakeFiles/libdyssol_shared.dir/build.make:163: CMakeFiles/libdyssol_shared.dir/EquationSolvers/DAESolver.cpp.o] Error 1

Thirdly, realtype does not get defined

[  6%] Building CXX object CMakeFiles/libdyssol_static.dir/BaseSolvers/BaseSolver.cpp.o
/usr/bin/mpicxx -DGRAPHVIZ -DINSTALL_DOCS_PATH=\"/usr/share/Dyssol/docs\" -I/projects/misc/build/dyssol-1.1.1+ds1/BaseSolvers -I/projects/misc/build/dyssol-1.1.1+ds1/CacheHandler -I/projects/misc/build/dyssol-1.1.1+ds1/EquationSolvers -I/projects/misc/build/dyssol-1.1.1+ds1/HDF5Handler -I/projects/misc/build/dyssol-1.1.1+ds1/MaterialsDatabase -I/projects/misc/build/dyssol-1.1.1+ds1/ModelsAPI -I/projects/misc/build/dyssol-1.1.1+ds1/Modules -I/projects/misc/build/dyssol-1.1.1+ds1/ScriptInterface -I/projects/misc/build/dyssol-1.1.1+ds1/SimulatorCore -I/projects/misc/build/dyssol-1.1.1+ds1/Utilities -I/projects/misc/build/dyssol-1.1.1+ds1/Modules/DustFormationTester -I/usr/include/hdf5/serial -I/usr/include/sundials -I/usr/include/graphviz -g -O2 -ffile-prefix-map=/projects/misc/build/dyssol-1.1.1+ds1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++17 -MD -MT CMakeFiles/libdyssol_static.dir/BaseSolvers/BaseSolver.cpp.o -MF CMakeFiles/libdyssol_static.dir/BaseSolvers/BaseSolver.cpp.o.d -o CMakeFiles/libdyssol_static.dir/BaseSolvers/BaseSolver.cpp.o -c /projects/misc/build/dyssol-1.1.1+ds1/BaseSolvers/BaseSolver.cpp
In file included from /projects/misc/build/dyssol-1.1.1+ds1/ModelsAPI/UnitDevelopmentDefines.h:6,
                 from /projects/misc/build/dyssol-1.1.1+ds1/Units/Bunker/Bunker.h:5,
                 from /projects/misc/build/dyssol-1.1.1+ds1/Units/Bunker/Bunker.cpp:4:
/projects/misc/build/dyssol-1.1.1+ds1/EquationSolvers/DAESolver.h:32:29: error: ‘realtype’ was not declared in this scope; did you mean ‘decltype’?
   32 |                 std::vector<realtype> vars;
      |                             ^~~~~~~~
      |                             decltype
/projects/misc/build/dyssol-1.1.1+ds1/EquationSolvers/DAESolver.h:32:37: error: template argument 1 is invalid
   32 |                 std::vector<realtype> vars;
      |                                     ^
/projects/misc/build/dyssol-1.1.1+ds1/EquationSolvers/DAESolver.h:32:37: error: template argument 2 is invalid
In file included from /projects/misc/build/dyssol-1.1.1+ds1/ModelsAPI/UnitDevelopmentDefines.h:6,
                 from /projects/misc/build/dyssol-1.1.1+ds1/Units/Crusher/Crusher.h:5,
                 from /projects/misc/build/dyssol-1.1.1+ds1/Units/Crusher/Crusher.cpp:4:

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

No branches or pull requests

1 participant