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

Ifpack2 test linking issue #1706

Closed
jwillenbring opened this issue Sep 7, 2017 · 9 comments
Closed

Ifpack2 test linking issue #1706

jwillenbring opened this issue Sep 7, 2017 · 9 comments
Assignees

Comments

@jwillenbring
Copy link
Member

jwillenbring commented Sep 7, 2017

@trilinos/ifpack2

I am trying to build with the following SEMS modules:

Currently Loaded Modulefiles:

  1) sems-env                     7) sems-superlu/4.3/base
  2) sems-gcc/4.9.3               8) sems-python/2.7.9
  3) sems-openmpi/1.8.7           9) sems-boost/1.55.0/base
  4) sems-git/2.10.1             10) sems-zlib/1.2.8/base
  5) sems-hdf5/1.8.12/parallel   11) sems-cmake/3.5.2
  6) sems-netcdf/4.3.2/parallel

and the following configure arguments:

cmake -DTPL_ENABLE_MPI:BOOL=ON -DMPI_BASE_DIR=$ENV{SEMS_OPENMPI_ROOT} \
-DBoost_INCLUDE_DIRS:FILEPATH=$SEMS_BOOST_ROOT/include -DBoost_LIBRARY_DIRS:FILEPATH=$SEMS_BOOST_ROOT/lib \
-DBoostLib_INCLUDE_DIRS:FILEPATH=$SEMS_BOOST_ROOT/include -DBoostLib_LIBRARY_DIRS:FILEPATH=$SEMS_BOOST_ROOT/lib \
-DNetcdf_INCLUDE_DIRS:FILEPATH=$ENV{SEMS_NETCDF_ROOT}/include -DNetcdf_LIBRARY_DIRS:FILEPATH=$ENV{SEMS_NETCDF_ROOT}/lib \
-DHDF5_INCLUDE_DIRS:FILEPATH=$ENV{SEMS_HDF5_ROOT}/include -DHDF5_LIBRARY_DIRS:FILEPATH=$ENV{SEMS_HDF5_ROOT}/lib \
-DTPL_ENABLE_SuperLU=OFF -DTPL_ENABLE_SuperLU=OFF -DZlib_INCLUDE_DIRS:FILEPATH=$ENV{SEMS_ZLIB_ROOT}/include \
-DZlib_LIBRARY_DIRS:FILEPATH=$ENV{SEMS_ZLIB_ROOT}/lib -DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON \
-DTrilinos_ALLOW_NO_PACKAGES:BOOL=ON -DTrilinos_ENABLE_ALL_FORWARD_DEP_PACKAGES=ON \
-DTrilinos_ENABLE_SECONDARY_TESTED_CODE:BOOL=OFF -DTrilinos_IGNORE_MISSING_EXTRA_REPOSITORIES:BOOL=ON \
-DTrilinos_ENABLE_TESTS:BOOL=ON -DTrilinos_TEST_CATEGORIES=BASIC \
-DTrilinos_ENABLE_ALL_PACKAGES=ON ../Trilinos

I get the following error:

[ 79%] Linking CXX executable Ifpack2_ContainerFactory.exe
CMakeFiles/Ifpack2_ContainerFactory.dir/Ifpack2_UnitTestContainerFactory.cpp.o: In function `Ifpack2::ILUT<Tpetra::RowMatrix<double, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::allocateSolvers()':
Ifpack2_UnitTestContainerFactory.cpp:(.text._ZN7Ifpack24ILUTIN6Tpetra9RowMatrixIdixN6Kokkos6Compat23KokkosDeviceWrapperNodeINS3_6SerialENS3_9HostSpaceEEEEEE15allocateSolversEv[_ZN7Ifpack24ILUTIN6Tpetra9RowMatrixIdixN6Kokkos6Compat23KokkosDeviceWrapperNodeINS3_6SerialENS3_9HostSpaceEEEEEE15allocateSolversEv]+0x1c): undefined reference to `Ifpack2::LocalSparseTriangularSolver<Tpetra::RowMatrix<double, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::LocalSparseTriangularSolver()'
Ifpack2_UnitTestContainerFactory.cpp:(.text._ZN7Ifpack24ILUTIN6Tpetra9RowMatrixIdixN6Kokkos6Compat23KokkosDeviceWrapperNodeINS3_6SerialENS3_9HostSpaceEEEEEE15allocateSolversEv[_ZN7Ifpack24ILUTIN6Tpetra9RowMatrixIdixN6Kokkos6Compat23KokkosDeviceWrapperNodeINS3_6SerialENS3_9HostSpaceEEEEEE15allocateSolversEv]+0xe8): undefined reference to `Ifpack2::LocalSparseTriangularSolver<Tpetra::RowMatrix<double, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::LocalSparseTriangularSolver()'
CMakeFiles/Ifpack2_ContainerFactory.dir/Ifpack2_UnitTestContainerFactory.cpp.o: In function `Ifpack2::ILUT<Tpetra::RowMatrix<double, int, int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::allocateSolvers()':
Ifpack2_UnitTestContainerFactory.cpp:(.text._ZN7Ifpack24ILUTIN6Tpetra9RowMatrixIdiiN6Kokkos6Compat23KokkosDeviceWrapperNodeINS3_6SerialENS3_9HostSpaceEEEEEE15allocateSolversEv[_ZN7Ifpack24ILUTIN6Tpetra9RowMatrixIdiiN6Kokkos6Compat23KokkosDeviceWrapperNodeINS3_6SerialENS3_9HostSpaceEEEEEE15allocateSolversEv]+0x1c): undefined reference to `Ifpack2::LocalSparseTriangularSolver<Tpetra::RowMatrix<double, int, int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::LocalSparseTriangularSolver()'
Ifpack2_UnitTestContainerFactory.cpp:(.text._ZN7Ifpack24ILUTIN6Tpetra9RowMatrixIdiiN6Kokkos6Compat23KokkosDeviceWrapperNodeINS3_6SerialENS3_9HostSpaceEEEEEE15allocateSolversEv[_ZN7Ifpack24ILUTIN6Tpetra9RowMatrixIdiiN6Kokkos6Compat23KokkosDeviceWrapperNodeINS3_6SerialENS3_9HostSpaceEEEEEE15allocateSolversEv]+0xe8): undefined reference to `Ifpack2::LocalSparseTriangularSolver<Tpetra::RowMatrix<double, int, int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::LocalSparseTriangularSolver()'
collect2: error: ld returned 1 exit status
make[2]: *** [packages/ifpack2/test/unit_tests/Ifpack2_ContainerFactory.exe] Error 1
make[1]: *** [packages/ifpack2/test/unit_tests/CMakeFiles/Ifpack2_ContainerFactory.dir/all] Error 2
make: *** [all] Error 2
Make failed. The error code was: 2

Please let me know if this is unclear. Thanks in advance.

Edited by @ibaned to format terminal output.

@mhoemmen
Copy link
Contributor

mhoemmen commented Sep 8, 2017

@jwillenbring It looks like ETI is OFF; is that right?

@jwillenbring
Copy link
Member Author

It looks like ETI is OFF; is that right?

@mhoemmen Yes, that is right.

@mhoemmen
Copy link
Contributor

mhoemmen commented Sep 8, 2017

@jwillenbring I'm doing an ETI OFF build right now, but with my usual options, just to see if I can replicate. Nothing mentioned in the error depends on TPLs; GO = int, long long get enabled by default; and the link error is in a library, not a test; thus, turning off ETI should manifest the link error.

@mhoemmen
Copy link
Contributor

mhoemmen commented Sep 8, 2017

@jwillenbring Hm, my ETI OFF build (--enable-packages=Ifpack2 --default-builds="" --extra-builds=MPI_DEBUG_NO_ETI) made it through to MueLu. I will retry using exactly the modules and build options you show above.

@jhux2
Copy link
Member

jhux2 commented Sep 8, 2017

@mhoemmen Thanks for looking into this.

@jwillenbring There is no nightly coverage for ETI off for Ifpack2. There needs to be coverage, if this is how PRs are to be tested. Alternatively, would it make sense to use ETI in the process?

@mhoemmen mhoemmen self-assigned this Sep 8, 2017
@jwillenbring
Copy link
Member Author

@jhux2 I am leaning strongly in the direction of turning ETI on, yes. I was going to test that later today.

@mhoemmen
Copy link
Contributor

mhoemmen commented Sep 8, 2017

I was able to replicate the link error. I'll work on this.

@mhoemmen
Copy link
Contributor

mhoemmen commented Sep 8, 2017

Line 53 of Ifpack2_ILUT_def.hpp only included Ifpack2_LocalSparseTriangularSolver_decl.hpp, but the file calls LocalSparseTriangularSolver methods. Thus, it should have included Ifpack2_LocalSparseTriangularSolver.hpp. I'll fix this.

@mhoemmen mhoemmen added the stage: in progress Work on the issue has started label Sep 8, 2017
mhoemmen pushed a commit that referenced this issue Sep 8, 2017
@trilinos/ifpack2 Ifpack2 had link errors in an ETI (explicit template
instantiation) OFF build.  Line 53 of Ifpack2_ILUT_def.hpp only
included Ifpack2_LocalSparseTriangularSolver_decl.hpp, but the file
calls LocalSparseTriangularSolver methods.  Thus, it should have
included Ifpack2_LocalSparseTriangularSolver.hpp.  (In an ETI OFF
build, the latter is a generated header file that includes both
Ifpack2_LocalSparseTriangularSolver_decl.hpp and
Ifpack2_LocalSparseTriangularSolver_def.hpp.)  This commit fixes that.
@mhoemmen
Copy link
Contributor

mhoemmen commented Sep 8, 2017

I just pushed a fix to develop. Sorry for not using the remote check-in test script; it's a one-line change and the script wouldn't have exercised this case anyway. The fix builds with no link errors, given the above configuration. Thanks @jwillenbring for reporting!

@mhoemmen mhoemmen closed this as completed Sep 8, 2017
@mhoemmen mhoemmen removed the stage: in progress Work on the issue has started label Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants