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

Trilinos Header files are not found #13695

Closed
cloud9legendre opened this issue Dec 26, 2024 · 2 comments
Closed

Trilinos Header files are not found #13695

cloud9legendre opened this issue Dec 26, 2024 · 2 comments
Labels
type: bug The primary issue is a bug in Trilinos code or tests

Comments

@cloud9legendre
Copy link

When I try to configure using following cmake file and then build the project using make -j 4 i get some of the header files are not there. But when i manually check the files are in /usr/local/bin/trilinos/include/. I dont know whether i forgot or something but i added the paths to the system varibles and tried to specifiy them in cmake config. But doesnt work. Do i have to reinstall trilinos with a modified configureation or am i looking at the wrong place.

/usr/local/bin/trilinos/include/Sacado_ConfigDefs.h:58:10: fatal error: Kokkos_Macros.hpp: No such file or directory
   58 | #include "Kokkos_Macros.hpp"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

Full log is here -> build.log

cmake cofig file for my project

rm -f CMakeCache.txt
rm -rf CMakeFiles/

cmake \
-D CMAKE_BUILD_TYPE:STRING=Release \
-D Trilinos_DIR:PATH=/usr/local/bin/trilinos/lib/cmake/Trilinos \
-D CMAKE_C_COMPILER:STRING=/usr/bin/mpicc \
-D CMAKE_CXX_COMPILER:STRING=/usr/bin/mpicxx \
-D BOOST_ROOT=/usr/local/boost \
-D CMAKE_CXX_FLAGS:STRING="-O2 -Wall -std=c++11 -pedantic -Wno-long-long -ftrapv -Wno-deprecated" \
/home/ashen/Documents/peridigm
@cloud9legendre cloud9legendre added the type: bug The primary issue is a bug in Trilinos code or tests label Dec 26, 2024
@cloud9legendre cloud9legendre changed the title PackageName: General Summary of the Bug Trilinos Header files are not found Dec 26, 2024
@cgcgcg
Copy link
Contributor

cgcgcg commented Dec 26, 2024

It is possible that peridigm is not correctly setting up the Trilinos dependency. We saw a similar issue in #13639. What you could try is to add

Trilinos::all_libs

to this list
https://github.com/peridigm/peridigm/blob/82c6ad8f8152aaa3c8a2b4e7b31f82b8e1c6f28c/CMakeLists.txt#L284-L287
and see if that has any effect.

@cloud9legendre
Copy link
Author

Issue Seemed to be resolved when i copied the contents of path/to/trilinos/inlcude/kokkos folder to thepath/to/trilinos/inlcude folder. I also added Trilinos::all_libs and added

include_directories(
    ${NETCDF_INCLUDE_DIRS}
    /usr/include
    /usr/local/include
    /usr/local/netcdf-c-4.9.2/include
)

to the CMakeLists.txt and the Project compiled successfully. Thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

2 participants