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

possible syntax mixed up on option(....) in CMakeLists.text? #5

Open
guadabsb15 opened this issue Jul 10, 2024 · 2 comments
Open

possible syntax mixed up on option(....) in CMakeLists.text? #5

guadabsb15 opened this issue Jul 10, 2024 · 2 comments

Comments

@guadabsb15
Copy link

Looking at the lines 19-20 on the CMakeLists.txt

option(NUDUSTC_ENABLE_OPENMP ON "Use OpenMP for cell/particle parallelization")
option(NUDUSTC_ENABLE_MPI ON "Use MPI for cell/particle parallelization")
option(NUDUSTC_USE_SUNDIALS OFF "Use sundials CVODE integrator")

and the cmake documentation https://cmake.org/cmake/help/v3.23/command/option.html , the parameters inside the parenthesis might be in the wrong order. Therefore MPI and OpenMP support are probably not really being set ON by default. These lines should look like option(NUDUSTC_ENABLE_OPENMP "Use OpenMP for cell/particle parallelization" ON) similarly to line 42 in the CMakeLists.txt

With the syntax as it is, after someone does cmake .. in the build directory, those three options are OFF. One can check that in the CMakeCache.txt inside the build directory.

I usually manually change and check the values using the terminal based "GUI" ccmake, so I had not noticed this behavior before.

@guadabsb15
Copy link
Author

This issue is also related to JOSS review openjournals/joss-reviews#6637

@steven-murray
Copy link

This is also happening for me, so I would definitely recommend updating it. I have very little experience with cmake, so I am a good candidate for finding potential errors that only inexperienced users will come across. Interestingly though, even though the MPI is turned OFF by default (though it looks like it should be ON), my compilation still complains about not finding the MPI libraries...

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

2 participants