You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Serial builds with g++ and TPL_ENABLE_Pthread=OFF used to work. Now, with gnu compilers and TPL_ENABLE_Pthread=OFF, I can build in serial but Teuchos' initializeKokkos throws an error.
It appears that g++ requires Pthread to correctly execute std::call_once, which is used in initializeKokkos. Thus, TPL_ENABLE_Pthread=OFF leads to an error.
The attached program demonstrates the std::call_once behavior. Here are the compilations and test results. I've seen the same behavior with gcc 4.9.3, 6.3.1 and 7.2.1.
g++ -std=c++11 callOnce.cpp
a.out
In initialize 0
terminate called after throwing an instance of 'std::system_error'
what(): Unknown error 18446744073709551615
Abort (core dumped)
g++ -std=c++11 -pthread callOnce.cpp
a.out
In initialize 0
In initializeOnce 0
In initialize 1
In initialize 2
In initialize 3
In initialize 4
In initialize 5
In initialize 6
In initialize 7
In initialize 8
In initialize 9
Done: callCnt = 10; initCnt = 1
Motivation and Context
Serial builds of Zoltan2 tests with TPL_ENABLE_Pthread=OFF build but do not execute.
Discovered trying to diagnose #3033
Definition of Done
Possible Solution
Can the use of call_once be safely removed, with initializeKokkos just testing Kokkos' initialization status? Or is call_once really needed for threading?
Steps to Reproduce
Build serial Zoltan2 with gnu compilers and -DTPL_ENABLE_Pthread=OFF; make test.
FYI, #3058 purges use of std::call_once from Tpetra::Map's initialization of Kokkos. If it later becomes necessary to reintroduce std::call_once, we should protect it with the macro corresponding to TPL_ENABLE_Pthread.
@trilinos/teuchos @trilinos/tpetra
Expectations and Current behavior
Serial builds with g++ and TPL_ENABLE_Pthread=OFF used to work. Now, with gnu compilers and TPL_ENABLE_Pthread=OFF, I can build in serial but Teuchos' initializeKokkos throws an error.
It appears that g++ requires Pthread to correctly execute std::call_once, which is used in initializeKokkos. Thus, TPL_ENABLE_Pthread=OFF leads to an error.
The attached program demonstrates the std::call_once behavior. Here are the compilations and test results. I've seen the same behavior with gcc 4.9.3, 6.3.1 and 7.2.1.
callOnce.cpp.txt
Motivation and Context
Serial builds of Zoltan2 tests with TPL_ENABLE_Pthread=OFF build but do not execute.
Discovered trying to diagnose #3033
Definition of Done
Possible Solution
Can the use of call_once be safely removed, with initializeKokkos just testing Kokkos' initialization status? Or is call_once really needed for threading?
Steps to Reproduce
Build serial Zoltan2 with gnu compilers and -DTPL_ENABLE_Pthread=OFF; make test.
Your Environment
module purge
module load sems-env
module load sems-gcc/4.9.3
cmake
-DTPL_ENABLE_Pthread:BOOL=OFF
-DTrilinos_ENABLE_SECONDARY_TESTED_CODE:BOOL=ON
-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF
-DTrilinos_ENABLE_TESTS:BOOL=OFF
-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON
-DTrilinos_ENABLE_Zoltan2:BOOL=ON
-DZoltan2_ENABLE_TESTS:BOOL=ON
..
Related Issues
#3033
Additional Information
The text was updated successfully, but these errors were encountered: