Tpetra::defaultArgNode fails in serial build
Created by: kddevin
@trilinos/tpetra @trilinos/teuchos @trilinos/kokkos
Expectations
Calls to defaultArgNode should run whether Teuchos::Comm is serial or MPI.
Current Behavior
A simple test program (attached) calling defaultArgNode works when built with MPI, but not when built without MPI.
Without MPI, I get terminate called after throwing an instance of 'std::system_error' what(): Unknown error 18446744073709551615
Here are the relevant bits of the stack trace: 0x0000000001862a1c in KokkosCompat::Details::initializeKokkos() () at /home/.../packages/teuchos/kokkoscompat/src/KokkosCompat_Details_KokkosInit.cpp:95 0x000000000185fbdb in Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace>::KokkosDeviceWrapperNode(Teuchos::ParameterList&) () at /home/.../packages/teuchos/kokkoscompat/src/KokkosCompat_ClassicNodeAPI_Wrapper.cpp:171 0x00000000016aaaf9 in Teuchos::RCP<Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > KokkosClassic::Details::getNode<Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >(Teuchos::RCPTeuchos::ParameterList const&) () at /home/.../packages/tpetra/classic/NodeAPI/Kokkos_DefaultNode.cpp:56 0x00000000010cd808 in Teuchos::RCP<Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > Tpetra::defaultArgNode<Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >() () at /home/.../packages/tpetra/core/src/Tpetra_Map_decl.hpp:91
Motivation and Context
Tpetra::MatrixMarket::Reader::readSparseFile calls this function when it attempts to create maps (e.g., makeRangeMap()). Thus, the reader does not work for my serial build.
Definition of Done
Maybe my serial environment is wrong -- please advise. My script used to work, so if the environment is wrong, backward compatibility was lost somewhere along the line. Otherwise, the test program should run with TPL_ENABLE_MPI=ON or OFF.
Possible Solution
Steps to Reproduce
See attached test program, which demonstrates the fault.
It reads a matrix-market file simple.mtx; you can use any matrix-market file with this name.
The test calls defaultArgNode directly, which a user wouldn't usually do. readSparseFile calls it internally when it creates Maps.
mmReader.cpp.txt
Your Environment
module purge
module load sems-env
module load sems-gcc/4.9.3
cmake
-D TPL_ENABLE_Pthread:BOOL=OFF
-D CMAKE_BUILD_TYPE:STRING="DEBUG"
-D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF
-D TPL_ENABLE_MPI:BOOL=OFF
-D Trilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON
-D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF
-D Trilinos_ENABLE_TESTS:BOOL=OFF
-D Trilinos_ENABLE_EXAMPLES:BOOL=OFF
-D Trilinos_VERBOSE_CONFIGURE:BOOL=OFF
-D Trilinos_ENABLE_Zoltan2:BOOL=ON
-D Zoltan2_ENABLE_TESTS:BOOL=ON
..
Related Issues
- Blocks
- Is blocked by
- Follows
- Precedes
- Related to
- Part of
- Composed of