Action_Thermostats
        Add_AtomRandomPerturbation
        Add_SelectAtomByNameAction
        Adding_Graph_to_ChangeBondActions
        Adding_MD_integration_tests
        Adding_StructOpt_integration_tests
        AutomationFragmentation_failures
        Candidate_v1.6.1
        Candidate_v1.7.0
        ChangeBugEmailaddress
        ChemicalSpaceEvaluator
        Docu_Python_wait
        EmpiricalPotential_contain_HomologyGraph_documentation
        Enhance_userguide
        Enhanced_StructuralOptimization
        Enhanced_StructuralOptimization_continued
        Example_ManyWaysToTranslateAtom
        Exclude_Hydrogens_annealWithBondGraph
        Fix_StepWorldTime_single_argument
        Fix_Verbose_Codepatterns
        ForceAnnealing_oldresults
        ForceAnnealing_with_BondGraph
        ForceAnnealing_with_BondGraph_continued
        ForceAnnealing_with_BondGraph_continued_betteresults
        ForceAnnealing_with_BondGraph_contraction-expansion
        Gui_displays_atomic_force_velocity
        IndependentFragmentGrids_IntegrationTest
        JobMarket_RobustOnKillsSegFaults
        JobMarket_StableWorkerPool
        PythonUI_with_named_parameters
        QtGui_reactivate_TimeChanged_changes
        Recreated_GuiChecks
        StoppableMakroAction
        TremoloParser_IncreasedPrecision
        TremoloParser_MultipleTimesteps
        stable
      
      
      
| Line |  | 
|---|
| 1 |  | 
|---|
| 2 | #include <scconfig.h> | 
|---|
| 3 | #include <util/group/pregtime.h> | 
|---|
| 4 | #include <util/misc/exenv.h> | 
|---|
| 5 | #if defined(HAVE_MPI) | 
|---|
| 6 | #  include <util/group/messmpi.h> | 
|---|
| 7 | #endif | 
|---|
| 8 |  | 
|---|
| 9 |  | 
|---|
| 10 | void | 
|---|
| 11 | dotest(const sc::Ref<sc::MessageGrp> &grp, | 
|---|
| 12 | bool node_independent) | 
|---|
| 13 | { | 
|---|
| 14 | sc::Ref<sc::RegionTimer> rt | 
|---|
| 15 | = new sc::ParallelRegionTimer(grp->clone(),"prttest",1,1); | 
|---|
| 16 |  | 
|---|
| 17 | sc::Timer t1(rt,"t1_a"); | 
|---|
| 18 |  | 
|---|
| 19 | if (node_independent || grp->me() == 0) { | 
|---|
| 20 | sc::Timer t2(rt,"t2_a"); | 
|---|
| 21 | sc::Timer t3(rt,"t3_a"); | 
|---|
| 22 | t3.reset("t3_b"); | 
|---|
| 23 | t3.reset("t3_c"); | 
|---|
| 24 | t3.reset("t3_d"); | 
|---|
| 25 | t3.reset(); | 
|---|
| 26 | t2.reset("t2_b"); | 
|---|
| 27 | if (node_independent || grp->me() == 0) { | 
|---|
| 28 | sc::Timer t4(rt,"t4_a"); | 
|---|
| 29 | t4.reset("t4_b"); | 
|---|
| 30 | t4.reset(); | 
|---|
| 31 | } | 
|---|
| 32 | t2.reset("t2_c"); | 
|---|
| 33 | t2.reset(); | 
|---|
| 34 | } | 
|---|
| 35 |  | 
|---|
| 36 | t1.reset(); | 
|---|
| 37 |  | 
|---|
| 38 | rt->print(sc::ExEnv::outn()); | 
|---|
| 39 | } | 
|---|
| 40 |  | 
|---|
| 41 | int | 
|---|
| 42 | main(int argc, char**argv) | 
|---|
| 43 | { | 
|---|
| 44 | sc::Ref<sc::MessageGrp> grp; | 
|---|
| 45 | #if defined(HAVE_MPI) && defined(ALWAYS_USE_MPI) | 
|---|
| 46 | grp = new sc::MPIMessageGrp(&argc, &argv); | 
|---|
| 47 | #endif | 
|---|
| 48 | if (grp.null()) grp = sc::MessageGrp::initial_messagegrp(argc, argv); | 
|---|
| 49 | if (grp.nonnull()) | 
|---|
| 50 | sc::MessageGrp::set_default_messagegrp(grp); | 
|---|
| 51 | else | 
|---|
| 52 | grp = sc::MessageGrp::get_default_messagegrp(); | 
|---|
| 53 |  | 
|---|
| 54 | std::cout << grp->me() << ": using " << grp->class_name() << std::endl; | 
|---|
| 55 |  | 
|---|
| 56 | dotest(grp, true); | 
|---|
| 57 | dotest(grp, false); | 
|---|
| 58 |  | 
|---|
| 59 | grp = 0; | 
|---|
| 60 | sc::MessageGrp::set_default_messagegrp(grp); | 
|---|
| 61 |  | 
|---|
| 62 | return 0; | 
|---|
| 63 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.