コード例 #1
0
ファイル: gltron.c プロジェクト: BackupTheBerlios/gltron-svn
int main(int argc, char *argv[] ) {
	nebu_debug_memory_CheckLeaksOnExit();
	// nebu_assert_config(NEBU_ASSERT_PRINT_STDERR);
	initSubsystems(argc, (const char**) argv);
	runScript(PATH_SCRIPTS, "main.lua");
	exitSubsystems();
	return 0;
}
コード例 #2
0
ファイル: ortc_ORTC.cpp プロジェクト: openpeer/ortc-lib
    //-------------------------------------------------------------------------
    ORTC::ORTC(const make_private &) :
      SharedRecursiveLock(SharedRecursiveLock::create())
    {
      ZS_EVENTING_EXCLUSIVE(OrtcLib);
      ZS_EVENTING_REGISTER(OrtcLib);
      ZS_EVENTING_EXCLUSIVE(x);

      ZS_EVENTING_EXCLUSIVE(OrtcLibStatsReport);
      ZS_EVENTING_REGISTER(OrtcLibStatsReport);
      ZS_EVENTING_EXCLUSIVE(x);

      ZS_EVENTING_EXCLUSIVE(OrtcLib);
      ZS_EVENTING_0(x, i, Detail, OrtcCreate, ol, Ortc, Start);
      ZS_EVENTING_EXCLUSIVE(x);

      initSubsystems();
      ZS_LOG_DETAIL(log("created"));
    }
コード例 #3
0
ファイル: CoMD.c プロジェクト: shamouda/ocr-apps
int main(int argc, char** argv)
{
   // Prolog
   initParallel(&argc, &argv);
   profileStart(totalTimer);
   initSubsystems();
   timestampBarrier("Starting Initialization\n");

   yamlAppInfo(yamlFile);
   yamlAppInfo(screenOut);

   Command cmd = parseCommandLine(argc, argv);
   printCmdYaml(yamlFile, &cmd);
   printCmdYaml(screenOut, &cmd);

   SimFlat* sim = initSimulation(cmd);
   printSimulationDataYaml(yamlFile, sim);
   printSimulationDataYaml(screenOut, sim);

   Validate* validate = initValidate(sim); // atom counts, energy
   timestampBarrier("Initialization Finished\n");

   timestampBarrier("Starting simulation\n");

   // This is the CoMD main loop
   const int nSteps = sim->nSteps;
   const int printRate = sim->printRate;
   int iStep = 0;
   profileStart(loopTimer);
   for (; iStep<nSteps;)
   {
      startTimer(commReduceTimer);
      sumAtoms(sim);
      stopTimer(commReduceTimer);

      printThings(sim, iStep, getElapsedTime(timestepTimer));

      startTimer(timestepTimer);
      timestep(sim, printRate, sim->dt);
      stopTimer(timestepTimer);

      iStep += printRate;
   }
   profileStop(loopTimer);

   sumAtoms(sim);
   printThings(sim, iStep, getElapsedTime(timestepTimer));
   timestampBarrier("Ending simulation\n");

   // Epilog
   validateResult(validate, sim);
   profileStop(totalTimer);

   printPerformanceResults(sim->atoms->nGlobal);
   printPerformanceResultsYaml(yamlFile);

   destroySimulation(&sim);
   comdFree(validate);
   finalizeSubsystems();

   timestampBarrier("CoMD Ending\n");
   destroyParallel();

   return 0;
}