-
Notifications
You must be signed in to change notification settings - Fork 577
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
Question on how to build Kokkos with Tpetra #1412
Comments
Are you able to build Kokkos examples? Please try that first. |
I loaded gnu/4.9.2, mvapich2/2.2, CUDA/7.5 modules and used the following the script to build Kokkos home=$(pwd) export CUDA_LAUNCH_BLOCKING=1 Then, I compiled some of the tutorials in src/example/tutorial/ directory using make -j KOKKOS_DEVICES=Cuda as well as make -j. And, I successfully ran .host as well as .cuda extension files. Output from .cuda extension file for 02_simple_reduce_lambda case Kokkos::Cuda::initialize WARNING: running kernels compiled for compute capability 3.5 on device with compute capability 3.7 , this will likely reduce potential performance. Output from .host extension file IBRUN: MPI binding policy: scatter/core for 1 threads per rank (12 cores per socket) I used the procedure described above to build and run Kokkos examples. Kindly let me know if it is not correct. |
@trilinos/framework |
CC: @wfspotz module load gcc/4.9.2 _cmake -D CMAKE_INSTALL_PREFIX:PATH=$BUILD_DIR/install ................................................... There were no errors during the installation. So, I tried to compile a code at https://github.com/trilinos/Trilinos/blob/master/packages/tpetra/core/example/Lesson07-Kokkos-Fill/03_fill.cpp via the following the command line and got some errors. I think those errors occur when I compile a code that includes KOKKOS LAMBDAs Errors during the compilation of a code at https://github.com/trilinos/Trilinos/blob/master/packages/tpetra/core/example/Lesson07-Kokkos-Fill/03_fill.cpp 03_fill.cpp(44): warning: variable "T_right" was declared but never referenced /oasis/scratch/comet/vkotteda/temp_project/Software/trilinos_3rd/openmpi/trilinos/install/include/Cuda/Kokkos_CudaExec.hpp(287): error: The closure type for a lambda ("lambda ->void") cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is a 'extended lambda' and the flag --expt-extended-lambda is specified Any suggestions to eliminate/suppress those errors. |
What version of Trilinos is this? Try the master branch. |
It is 12.10 (*** Base Git Repo: Trilinos 545269e [Mon Jun 19 16:49:55 2017 -0600] kyukim@sandia.gov Intrepid2 - check point inclusion ) I also used 12.08 version (*** Base Git Repo: Trilinos d2e490d [Mon Sep 26 18:05:28 2016 -0700] amota@sandia.gov Intrepid2: Fix dimension in return value for equality constraint.) and got the same errors. |
I checkout the master branch and used that to build Trilinos. The error messages are same. /oasis/scratch/comet/vkotteda/temp_project/Software/trilinos_3rd/openmpi/trilinos/install/include/Cuda/Kokkos_CudaExec.hpp(287): error: The closure type for a lambda ("lambda ->void") cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is a 'extended lambda' and the flag --expt-extended-lambda is specified However, I am able to compile a code which does include KOKKOS lambdas. I observed that these errors occur when I compile the codes having KOKKOS LAMBDAS. I appreciate your comments to suppress these errors during the compilations of the codes at |
Use CUDA 8.0 or add the flag to your CUDA 7.5 build that enables lambdas. |
CC : @wfspotz @mhoemmen I installed it without an error and used the same cxx flags to compile the examples. There were no errors. Therefore, I submitted the job on the machine and hope that it will run without an error. |
@kvmkrao Excellent. Thank you for reporting this. |
CC: @wfspotz
I set Trilonos path and compiled a simple Kokkos with Tpetra code (https://github.com/trilinos/Trilinos_tutorial/wiki/KokkosExample01) with CMakeList.txt. The compilation was not successful because of the following errors:
_Scanning dependencies of target example
[ 50%] Building CXX object CMakeFiles/example.dir/kokkosexample01.cpp.o
/oasis/scratch/comet/vkotteda/Software/trilinos/install/include/impl/Kokkos_Error.hpp(76): error: namespace "Kokkos::Impl" has no member "cuda_abort"
/oasis/scratch/comet/vkotteda/Software/trilinos/install/include/impl/Kokkos_Atomic_Increment.hpp(61): error: namespace "Kokkos" has no member "atomic_fetch_add"
/oasis/scratch/comet/vkotteda/Software/trilinos/install/include/impl/Kokkos_Atomic_Increment.hpp(76): error: namespace "Kokkos" has no member "atomic_fetch_add"
/oasis/scratch/comet/vkotteda/Software/trilinos/install/include/impl/Kokkos_Atomic_Increment.hpp(91): error: namespace "Kokkos" has no member "atomic_fetch_add"
/oasis/scratch/comet/vkotteda/Software/trilinos/install/include/impl/Kokkos_Atomic_Increment.hpp(106): error: namespace "Kokkos" has no member "atomic_fetch_add"
/oasis/scratch/comet/vkotteda/Software/trilinos/install/include/impl/Kokkos_Atomic_Decrement.hpp(63): error: namespace "Kokkos" has no member "atomic_fetch_sub"
/oasis/scratch/comet/vkotteda/Software/trilinos/install/include/impl/Kokkos_Atomic_Decrement.hpp(78): error: namespace "Kokkos" has no member "atomic_fetch_sub"
/oasis/scratch/comet/vkotteda/Software/trilinos/install/include/impl/Kokkos_Atomic_Decrement.hpp(93): error: namespace "Kokkos" has no member "atomic_fetch_sub"
/oasis/scratch/comet/vkotteda/Software/trilinos/install/include/impl/Kokkos_Atomic_Decrement.hpp(108): error: namespace "Kokkos" has no member "atomic_fetch_sub"
9 errors detected in the compilation of "/tmp/tmpxft_00001cb6_00000000-7_kokkosexample01.cpp1.ii".
make[2]: *** [CMakeFiles/example.dir/kokkosexample01.cpp.o] Error 2
make[1]: *** [CMakeFiles/example.dir/all] Error 2
make: *** [all] Error 2
_
I thought that these errors are not related to the installation of Trilinos and created a file using Makefile.export.Trilinos (please see the attachment, #1409 ) to compile the cpp code as there is no documentation to compile Kokkos (CUDA) with Tpetra codes.
I use CMakeList.txt to compile MPI/E(T)petra codes and Makefile to compile the Kokkos codes.
Can I use the attachment to compile those codes ?
compile.txt
The text was updated successfully, but these errors were encountered: