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
Tpetra's current Node implementation initializes Kokkos automatically for users, if it has not yet been initialized. It uses a per-Node-class reference count to decide when to finalize Kokkos. However, Kokkos forbids multiple initialization / finalization cycles in the same run.
This works fine when applications or tests only have one Node instance. Tpetra has Node creation functions (defaultArgNode and getNode) that keep a Node instance around to avoid this problem. The issue comes up with Tpetra unit tests that, multiple times per run, create Node instances directly (without using the aforementioned creation functions), then destroy them. The reference count then goes to zero at the end of each test, so each test calls Kokkos::finalize.
To start fixing this, the best thing to do is not to create Nodes directly in tests. Instead, let Tpetra create the Node. Ideally, don't create or handle Node instances at all. This will make it easier for us to fix this issue inside Tpetra.
The text was updated successfully, but these errors were encountered:
@trilinos/tpetra Fix#484 in Tpetra's unit tests, by deferring to
Tpetra functions to create a Node instance, rather than calling Node's
constructor directly.
Build/Test Cases Summary
Enabled Packages: TpetraCore
Disabled Packages: FEI,PyTrilinos,Moertel,STK,SEACAS,ThreadPool,OptiPack,Rythmos
0) MPI_DEBUG => Test case MPI_DEBUG was not run! => Does not affect push readiness! (-1.00 min)
1) SERIAL_RELEASE => Test case SERIAL_RELEASE was not run! => Does not affect push readiness! (-1.00 min)
2) MPI_DEBUG => passed: passed=97,notpassed=0 (0.77 min)
3) SERIAL_RELEASE => passed: passed=73,notpassed=0 (4.43 min)
mhoemmen
changed the title
Tpetra: Consolidate Node creation code to avoid multiple initialization & finalization of Kokkos
Tpetra: Consolidate Node creation code in unit tests to avoid multiple Kokkos initialization & finalization cycles
Jul 5, 2016
@trilinos/tpetra
Tpetra's current Node implementation initializes Kokkos automatically for users, if it has not yet been initialized. It uses a per-Node-class reference count to decide when to finalize Kokkos. However, Kokkos forbids multiple initialization / finalization cycles in the same run.
This works fine when applications or tests only have one Node instance. Tpetra has Node creation functions (defaultArgNode and getNode) that keep a Node instance around to avoid this problem. The issue comes up with Tpetra unit tests that, multiple times per run, create Node instances directly (without using the aforementioned creation functions), then destroy them. The reference count then goes to zero at the end of each test, so each test calls Kokkos::finalize.
To start fixing this, the best thing to do is not to create Nodes directly in tests. Instead, let Tpetra create the Node. Ideally, don't create or handle Node instances at all. This will make it easier for us to fix this issue inside Tpetra.
The text was updated successfully, but these errors were encountered: