-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust phase control test to test singletons
- Loading branch information
Showing
7 changed files
with
70 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
tests/Unit/Parallel/Test_AlgorithmPhaseControlNodegroup.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Distributed under the MIT License. | ||
// See LICENSE.txt for details. | ||
|
||
#include "Parallel/Test_AlgorithmPhaseControl.hpp" | ||
|
||
#include "Parallel/Algorithms/AlgorithmNodegroup.hpp" | ||
|
||
// [charm_init_funcs_example] | ||
extern "C" void CkRegisterMainModule() { | ||
Parallel::charmxx::register_main_module< | ||
TestMetavariables<Parallel::Algorithms::Nodegroup>>(); | ||
Parallel::charmxx::register_init_node_and_proc( | ||
{®ister_factory_classes_with_charm< | ||
TestMetavariables<Parallel::Algorithms::Nodegroup>>}, | ||
{}); | ||
} | ||
// [charm_init_funcs_example] |
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
tests/Unit/Parallel/Test_AlgorithmPhaseControlSingleton.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Distributed under the MIT License. | ||
// See LICENSE.txt for details. | ||
|
||
#include "Parallel/Test_AlgorithmPhaseControl.hpp" | ||
|
||
#include "Parallel/Algorithms/AlgorithmSingleton.hpp" | ||
|
||
extern "C" void CkRegisterMainModule() { | ||
Parallel::charmxx::register_main_module< | ||
TestMetavariables<Parallel::Algorithms::Singleton>>(); | ||
Parallel::charmxx::register_init_node_and_proc( | ||
{®ister_factory_classes_with_charm< | ||
TestMetavariables<Parallel::Algorithms::Singleton>>}, | ||
{}); | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/Unit/Parallel/Test_AlgorithmPhaseControlSingleton.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Distributed under the MIT License. | ||
# See LICENSE.txt for details. | ||
|
||
--- | ||
--- | ||
|
||
# note that this is a vector of pairs, so has the peculiar '- -' for the | ||
# elements | ||
PhaseChangeAndTriggers: | ||
- Trigger: RegisterTrigger | ||
PhaseChanges: | ||
- VisitAndReturn(Register) | ||
- Trigger: SolveTrigger | ||
PhaseChanges: | ||
- VisitAndReturn(Solve) | ||
|
||
ResourceInfo: | ||
AvoidGlobalProc0: false | ||
Singletons: Auto |