Ejemplo n.º 1
0
void TMastersDone(sp_int32 _status) {
  if (_status == ZNODEEXISTS || _status == ZOK) {
    zkclient->CreateNode(zkroot + "/executionstate", "Heron Cluster " + clustername, false,
                         [](sp_int32 status) { AllDone(status); });
  } else {
    LOG(ERROR) << "Error creating node in zk " << _status << std::endl;
    ::exit(1);
  }
}
Ejemplo n.º 2
0
double GSLOptimizer::evaluate(const gsl_vector *v) {
  /* set model state */
  write_state(v);
  /* get score */
  double score= get_scoring_function()->evaluate(false);
  best_score_=std::min(score, best_score_);
  if (score < stop_score_) {
    throw AllDone();
  }
  return score;
}
Ejemplo n.º 3
0
void QInstallPage::initializeConnections()
{
    /* MTest processes: Tests to find system specific functions */

    connect( this, SIGNAL( egsCUtilsCreated() ),
             this, SLOT( test_c_utils() ) ); n_config_steps += 25;
    connect( this, SIGNAL( egsCUtilsTested() ),
             this, SLOT( test_load_beamlib() ) );
    connect( this, SIGNAL( egsCUtilsEnded() ),
             this, SLOT( createSystemFiles() ) );
    connect( this, SIGNAL( egsCUtilsFailed() ),
             this, SLOT( createSystemFiles() ) );
    connect( this, SIGNAL( LoadBeamLibTested() ),
             this, SLOT( createSystemFiles() ) );

    /* Make processes: Only need to go to folder and execute 'make' */

    connect( this, SIGNAL( systemCreated( ushort ) ),
             this, SLOT( buildEGSnrc( ushort ) ) );
    connect( this, SIGNAL( nextBuildStep( ushort )),
             this, SLOT( buildEGSnrc( ushort )) );
    connect( this, SIGNAL( cppSystemCreated( ushort ) ),
             this, SLOT( buildEGSnrc( ushort ) ) );

  /* Environment Configuration */
    connect( this, SIGNAL( cppBuildFinalized() ),
             this, SLOT( copy_user_codes() ) );
    connect( this, SIGNAL( userCodesCopied() ),
             this, SLOT( beamInstall() ) );
    connect( this, SIGNAL( beamDone() ),
             this, SLOT( environmentSetUp() ) );
    connect( this, SIGNAL( skipBeam() ),
             this, SLOT( environmentSetUp() ) );

    connect( this, SIGNAL( environmentSet() ),
             this, SIGNAL( AllDone() ) );

    connect( this, SIGNAL( AllDone() ),
             this, SLOT( resetPage() ) );

}
Ejemplo n.º 4
0
double GSLOptimizer::evaluate_derivative(const gsl_vector *v,
                                         gsl_vector *df) {
   /* set model state */
  write_state(v);

  /* get score */
  double score= get_scoring_function()->evaluate(true);
  best_score_=std::min(score, best_score_);
  if (score < stop_score_) {
    throw AllDone();
  }
  /* get derivatives */
  {
    for (unsigned int i=0; i< fis_.size(); ++i) {
      double d= get_scaled_derivative(fis_[i]);
      gsl_vector_set(df, i, d);
    }
  }
  return score;
}
Ejemplo n.º 5
0
unsigned __stdcall UpdateLocalDBThread( void* Param )
{
#ifdef _SCROUT_
    cout << "Update Local DB Thread" << endl;
#endif
    OpData* pThreads = (OpData*) Param;
    while( true )
    {
        WaitForSingleObject( hLocalCon, INFINITE );
        for( int i = 0; i < 5; i++ )
        {
            if( ( pThreads + i )->pBuffer && ( pThreads + i )->bDone )
            {
                EnterCriticalSection( &csLocGlob );
                CCameraObj.UpdateLocal( ( pThreads + i )->pBuffer );
                LeaveCriticalSection( &csLocGlob );
                delete ( pThreads + i )->pBuffer;
                ( pThreads + i )->pBuffer = NULL;
            }
        }
#ifdef _VIDOUT_
        cout << ">>>>>>>>> Size: " << CCameraObj.lLocal.size() << endl;
#endif
        //UpdateLocal( pThreads );
        if( AllDone( pThreads ) )
        {
            for( int i = 0; i < 5; i++ )
            {
                ( pThreads + i )->bDone = FALSE;
            }
            cout << "I'm here!" << endl;
        }
    }
    /*
    PLACEHOLDER
    */
    return 0;
}
Ejemplo n.º 6
0
void FileParser::Complete()
{
    emit AllDone();
}