(C)Make fails at Scotch on various systems
Created by: LennartSchu
@trilinos/shylu
Hello, I'm currently trying to build the ShyLU-package with the Basker solver on my systems. I've tried that on a Ubuntu 16.04.5 LTS xenial Server and a Fedora Workstation. Building the packages works on neither one of them with different errors. However, both errors seem to be caused by the Scotch-package.
In order to make sure that this error is not due to my system, I'm asking you to provide information about the system (OS, version, version of gcc, cmake, etc.) with which you build the Basker-Library in ShyLU. The README.txt in Trilinos/packages/shylu/shylu_node/Basker includes the info "Currently, it is unknown how Basker will behave on a random system and with HWLOC.", which is why I ask about your set up.
Current Behavior
On Ubuntu, you have to build scotch version 6.0.3 by yourself since the most recent one provided by the official Ubuntu-repositories is version 5.1. Doing so, the CMake command (you find the exact commands below) runs fine and Scotch is included. However, running "make" gives numerous errors caused by scotch, first one of which is:
/home/om/Trilinos/packages/shylu/shylu_node/basker/src/shylubasker_order_scotch.hpp:186:5: error: ‘SCOTCH_Strat’ was not declared in this scope SCOTCH_Strat strdat;
which indicates that Scotch is not actually linked in the process. My effort of debugging the error came to the conclusion that it might be due to the inclusion of the C-code into a C++-library. Scotch is written in C, but not included into the C++ code of Basker using an 'extern "C"'-statement. It might be that the version of g++ on the server (which is 5.5.0) does not support this.
Running the same CMake-command on the Fedora Workstation (which provides Scotch 6.0.7 in the repositories) fails at checking the scotch version:
HAVE_SCOTCH_VERSION_6_0_3 - Failure
even though Version 6.0.3 (or newer) is installed and cmake finds the libraries.
Motivation and Context
I'm currently working on including Basker into the ida/sundials library. I've already included the NicsLU-solver into that library after observing that it is quicker in a testing environment I've set up for linear solvers. In my next step, I want to implement Basker into that testing enviroment to determine whether it would be useful for large-scale power system simulations. Finding quicker solvers is useful for both research and companies (e.g. transmission system operators) that use simulation software to provide stability and safety of the power supply of their customers.
Steps to Reproduce
On Ubuntu 16.10 LTS:
- Install Scotch 6.0.3 (or higher) manually and install it (here in /usr/local)
- run cmake -DTrilinos_ENABLE_ShyLU=ON -DTrilinos_ENABLE_ShyLUBasker=ON -DTrilinos_ENABLE_ShyLU_NodeBasker=ON -DTPL_ENABLE_OpenMP=ON -DTrilinos_ENABLE_Kokkos=ON -DTrilinos_ENABLE_ShyLU_DD=ON -DTrilinos_ENABLE_ShyLU_DDBDDC=ON -DTPL_ENABLE_MPI=ON -DTrilinos_ENABLE_OpenMP=ON ..
- run make
On Fedora Workstation:
- Install Scotch (either using the official repositories or manually, the error will be the same)
- run cmake -DTrilinos_ENABLE_ShyLU=ON -DTrilinos_ENABLE_ShyLUBasker=ON -DTrilinos_ENABLE_ShyLU_NodeBasker=ON -DTPL_ENABLE_OpenMP=ON -DTrilinos_ENABLE_Kokkos=ON -DTrilinos_ENABLE_ShyLU_DD=ON -DTrilinos_ENABLE_ShyLU_DDBDDC=ON -DTPL_ENABLE_MPI=ON -DTrilinos_ENABLE_OpenMP=ON ..
Your Environment
- Relevant configure flags or configure script: the cmake-flags given above
- Operating system and version: Ubuntu 16.10 LTS and Fedora Workstation
- Compiler and TPL versions: gcc version 5 on Ubuntu, version 8 on Fedora