Tpetra: std::call_once does not work well with gcc serial builds
Created by: kddevin
Recall from #3057 (closed): Use of std::call_once with gcc in serial builds requires TPL_ENABLE_PThread=ON.
This requirement is not obvious to the user; indeed, only because I had been bitten by it once before (#3033 (closed)) did I know that info was available in a github issue. Most users will not guess that Pthreads is required for a serial build (nor should they).
Use of std::call_once has been reintroduced in Tpetra_Details_Behavior.cpp. Is it necessary? Can it be removed?
Serial configurations should not need to specify TPL Pthreads to work correctly with Tpetra.
std::call_once crashes in serial Trilinos builds without TPL_ENABLE_Pthread=ON.
Motivation and Context
@egboman is trying to run serial coloring algorithms in Zoltan2 on his Linux workstation. Tpetra CrsMatrix construction fails because std::call_once fails in fetching debug environment variables in CrsGraph constructor.
Definition of Done
I hope: std::call_once removed from Tpetra; I hate being bitten twice by the same bug.
Steps to Reproduce
build serial Trilinos with Zoltan2 and TPL_ENABLE_Pthread=OFF make test
On @egboman's workstation
module purge module load sems-env module load sems-cmake module load sems-gcc/4.9.3