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

Compiling tutorial gives missing Kokkos header #14750

Closed
simonsticko opened this issue Feb 1, 2023 · 7 comments · Fixed by #14752
Closed

Compiling tutorial gives missing Kokkos header #14750

simonsticko opened this issue Feb 1, 2023 · 7 comments · Fixed by #14752

Comments

@simonsticko
Copy link
Contributor

If I copy step-1 and try to use an installed version of the current master (b206511), I get a missing kokkos header:

[ 50%] Building CXX object CMakeFiles/step-1.dir/step-1.cc.o
In file included from /home/simon/bin/dealii/include/deal.II/base/numbers.h:28,
                 from /home/simon/bin/dealii/include/deal.II/base/config.h:579,
                 from /home/simon/bin/dealii/include/deal.II/grid/tria.h:20,
                 from /home/simon/workspace/step-1/step-1.cc:22:
/home/simon/bin/dealii/include/deal.II/bundled/Kokkos_Macros.hpp:65:10: fatal error: KokkosCore_config.h: No such file or directory
   65 | #include <KokkosCore_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/step-1.dir/build.make:76: CMakeFiles/step-1.dir/step-1.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/step-1.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Looks like something is wrong with the cmake config related to kokkos? Ping @tamiko

@masterleinad
Copy link
Member

Can you print the failing compiler invocation (make VERBOSE=1) and try finding the missing header in the deal.II installation (find ${DEAL_II_DIR} -name "KokkosCore_config.h")?

@simonsticko
Copy link
Contributor Author

find ${DEAL_II_DIR} -name "KokkosCore_config.h"

Gives me nothing, so the header is indeed not in the install directory.

make VERBOSE=1 verbose gives me this:

/usr/bin/c++ -DDEBUG -isystem /home/simon/bin/dealii/include -isystem /home/simon/bin/dealii/include/deal.II/bundled -isystem /usr/include/suitesparse -pedantic -fPIC -Wall -Wextra -Wmissing-braces -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wswitch -Wsynth -Wwrite-strings -Wno-placement-new -Wno-literal-suffix -Wno-psabi -Wno-class-memaccess -fopenmp-simd -pthread -Wno-parentheses -Wno-unused-local-typedefs -O0 -ggdb -Wa,--compress-debug-sections -MD -MT CMakeFiles/step-1.dir/step-1.cc.o -MF CMakeFiles/step-1.dir/step-1.cc.o.d -o CMakeFiles/step-1.dir/step-1.cc.o -c /home/simon/workspace/step-1/step-1.cc

@simonsticko
Copy link
Contributor Author

simonsticko commented Feb 1, 2023

Kokkos_Macros.hpp has this:

#ifndef KOKKOS_DONT_INCLUDE_CORE_CONFIG_H
#include <KokkosCore_config.h>
#endif

should KOKKOS_DONT_INCLUDE_CORE_CONFIG_H be defined on obj_kokkos?

@masterleinad
Copy link
Member

should KOKKOS_DONT_INCLUDE_CORE_CONFIG_H be defined on obj_kokkos?

IIRC it's something Trilinos was using at some point. It's not used in Kokkos directly (and in particular not in a standalone installation).

@simonsticko
Copy link
Contributor Author

So apparently we copy all files matching *.hpp to the install directory, but there is this single header
"KokkosCore_config.h" which has the .h extension. I guess we should copy over this file too?

  install(DIRECTORY
    ${KOKKOS_FOLDER}/algorithms/src/
    ${KOKKOS_FOLDER}/containers/src/
    ${KOKKOS_FOLDER}/core/src/
    ${KOKKOS_FOLDER}/simd/src/
    ${KOKKOS_FOLDER}/tpls/desul/include/
    DESTINATION ${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled
    COMPONENT library
    FILES_MATCHING PATTERN "*.hpp"
    )

@masterleinad
Copy link
Member

Yes, would you do the pull request?

@simonsticko
Copy link
Contributor Author

Sure.

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 a pull request may close this issue.

2 participants