Error in building Trilinos with CUDA
Created by: kvmkrao
I am trying to install Trilinos with MPI and CUDA on stampede. First, I loaded gcc and cuda modules on stampede and installed openmpi.2.0.1 and used those wrappers to build Trilinos
ml load gcc/4.9.3 ml load cuda/7.5
export OMPI_CXX=/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/kokkos/config/nvcc_wrapper export NVCC_WRAPPER_DEFAULT_COMPILER=/opt/apps/gcc/4.9.3/bin/g++ export CUDA_LAUNCH_BLOCKING=1
The configuration file is as follows:
cmake
-D Tpetra_INST_CUDA:BOOL=ON
-D Trilinos_ENABLE_Tpetra:BOOL=ON
-D Trilinos_ENABLE_Kokkos:BOOL=ON
-D Trilinos_ENABLE_Ifpack2:BOOL=ON
-D Trilinos_ENABLE_Zoltan2:BOOL=ON
-D Trilinos_ENABLE_MueLu:BOOL=ON
-D Trilinos_ENABLE_Belos:BOOL=ON
-D Trilinos_ENABLE_Teuchos:BOOL=ON
-D Trilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON
-D Trilinos_ENABLE_Kokkos:BOOL=ON
-D Trilinos_ENABLE_KokkosCore:BOOL=ON
-D Tpetra_INST_CUDA:BOOL=ON
-D Trilinos_ENABLE_CUDA=ON
-D Trilinos_ENABLE_Xpetra:BOOL=OFF
-D Trilinos_ENABLE_Epetra:BOOL=OFF
-D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON
-D BUILD_SHARED_LIBS:BOOL=OFF
-D CMAKE_CXX_FLAGS="-Wall -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits -Wuninitialized -g -lineinfo "
-D TPL_ENABLE_CUDA=ON
-D Kokkos_ENABLE_Cuda=ON
-D Kokkos_ENABLE_Cuda_UVM=ON
/04051/vkotteda/stampede/Software/Trilinos/clone/src
I got the following errors when I build Trilinos:
_/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/belos/src/BelosSolverFactory.hpp(438): warning: statement is unreachable
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/teuchos/numerics/src/Teuchos_SerialDenseMatrix.hpp: In instantiation of ‘Teuchos::SerialDenseMatrix<OrdinalType, ScalarType>::SerialDenseMatrix(const Teuchos::SerialDenseMatrix<OrdinalType, ScalarType>&, Teuchos::ETransp) [with OrdinalType = int; ScalarType = double]’:
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/belos/src/BelosPCPGSolMgr.hpp:1067:72: required from ‘Belos::ReturnType Belos::PCPGSolMgr<ScalarType, MV, OP, true>::solve() [with ScalarType = double; MV = Tpetra::MultiVector<double, int, long long int, Kokkos::Compat::KokkosDeviceWrapperNodeKokkos::Cuda >; OP = Tpetra::Operator<double, int, long long int, Kokkos::Compat::KokkosDeviceWrapperNodeKokkos::Cuda >]’
/tmp/tmpxft_000050d7_00000000-4_Belos_Details_Tpetra_registerLinearSolverFactory.cudafe1.stub.c:12:27: required from here
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/teuchos/numerics/src/Teuchos_SerialDenseMatrix.hpp:455:11: error: non-constant array new length must be specified without parentheses around the type-id [-Werror=vla]
values_ = new ScalarType[newsize];
^
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/teuchos/numerics/src/Teuchos_SerialDenseMatrix.hpp: In instantiation of ‘Teuchos::SerialDenseMatrix<OrdinalType, ScalarType>& Teuchos::SerialDenseMatrix<OrdinalType, ScalarType>::operator=(const Teuchos::SerialDenseMatrix<OrdinalType, ScalarType>&) [with OrdinalType = int; ScalarType = double]’:
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/belos/src/BelosICGSOrthoManager.hpp:1058:9: required from ‘int Belos::ICGSOrthoManager<ScalarType, MV, OP>::findBasis(MV&, Teuchos::RCP, Teuchos::RCP<Teuchos::SerialDenseMatrix<int, ScalarType> >, bool, int) const [with ScalarType = double; MV = Tpetra::MultiVector<double, int, long long int, Kokkos::Compat::KokkosDeviceWrapperNodeKokkos::Cuda >; OP = Tpetra::Operator<double, int, long long int, Kokkos::Compat::KokkosDeviceWrapperNodeKokkos::Cuda >]’
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/belos/src/BelosICGSOrthoManager.hpp:802:38: required from ‘int Belos::ICGSOrthoManager<ScalarType, MV, OP>::normalize(MV&, Teuchos::RCP, Teuchos::RCP<Teuchos::SerialDenseMatrix<int, ScalarType> >) const [with ScalarType = double; MV = Tpetra::MultiVector<double, int, long long int, Kokkos::Compat::KokkosDeviceWrapperNodeKokkos::Cuda >; OP = Tpetra::Operator<double, int, long long int, Kokkos::Compat::KokkosDeviceWrapperNodeKokkos::Cuda >]’
/tmp/tmpxft_000050d7_00000000-4_Belos_Details_Tpetra_registerLinearSolverFactory.cudafe1.stub.c:12:27: required from here
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/teuchos/numerics/src/Teuchos_SerialDenseMatrix.hpp:659:11: error: non-constant array new length must be specified without parentheses around the type-id [-Werror=vla]
values_ = new ScalarType[newsize];
^
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/teuchos/numerics/src/Teuchos_SerialDenseMatrix.hpp:679:11: error: non-constant array new length must be specified without parentheses around the type-id [-Werror=vla]
values_ = new ScalarType[newsize];
^
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/teuchos/numerics/src/Teuchos_SerialSymDenseMatrix.hpp: In instantiation of ‘Teuchos::SerialSymDenseMatrix<OrdinalType, ScalarType>::SerialSymDenseMatrix(const Teuchos::SerialSymDenseMatrix<OrdinalType, ScalarType>&) [with OrdinalType = int; ScalarType = double]’:
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/teuchos/numerics/src/Teuchos_SerialSpdDenseSolver.hpp:547:80: required from ‘int Teuchos::SerialSpdDenseSolver<OrdinalType, ScalarType>::factor() [with OrdinalType = int; ScalarType = double]’
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/belos/src/BelosBlockCGIter.hpp:549:6: required from ‘void Belos::BlockCGIter<ScalarType, MV, OP, true>::iterate() [with ScalarType = double; MV = Tpetra::MultiVector<double, int, int, Kokkos::Compat::KokkosDeviceWrapperNodeKokkos::Cuda >; OP = Tpetra::Operator<double, int, int, Kokkos::Compat::KokkosDeviceWrapperNodeKokkos::Cuda >]’
/tmp/tmpxft_000050d7_00000000-4_Belos_Details_Tpetra_registerLinearSolverFactory.cudafe1.stub.c:12:27: required from here
/04051/vkotteda/stampede/Software/Trilinos/clone/src/packages/teuchos/numerics/src/Teuchos_SerialSymDenseMatrix.hpp:488:11: error: non-constant array new length must be specified without parentheses around the type-id [-Werror=vla]
values_ = new ScalarType[newsize];
^
cc1plus: all warnings being treated as errors
make[2]: *** [packages/belos/tpetra/src/CMakeFiles/belostpetra.dir/Belos_Details_Tpetra_registerLinearSolverFactory.cpp.o] Error 1
make[2]: Leaving directory /04051/vkotteda/stampede/Software/Trilinos/cuda/build' make[1]: *** [packages/belos/tpetra/src/CMakeFiles/belostpetra.dir/all] Error 2 make[1]: Leaving directory
/04051/vkotteda/stampede/Software/Trilinos/cuda/build'
make: *** [all] Error 2_
I request your comments/suggestions to fix these errors during the build.
Thank you.