void LocalBlockReader::configure(base::ConfigurationMap &conf)
{
    GET_PARAMETER(blockSize_, uint64_t, "blocksize");
    GET_PARAMETER(filename_, std::string, "filename");
    f_ = base::ScopedFilePtr(new base::ScopedFile(filename_));
    fileSize_ = f_->stat().length;
    configured_ = true;
}
void FakeAssembler::configure(base::ConfigurationMap &conf)
{
    GET_PARAMETER(recordParser_, recordparser::IRecordParserPtr, "recordParser");
    GET_PARAMETER(format_, std::string, "format");
    if(format_ != "row" && format_ != "column") {
        throw std::runtime_error("format needs to be row or column");
    }
    configured_ = true;

}
void HdfsInputStream::configure(base::ConfigurationMap &conf) {
    base::ConfigurationMap hdfsconf;
    GET_PARAMETER(hdfsConfigurationFile_, std::string, "hdfsConfigurationFile");
    GET_PARAMETER(fileStatCache_, boost::shared_ptr<base::Cache>, "fileStatCache");

    hdfsconf["hdfsConfigurationFile"] = hdfsConfigurationFile_;
    hdfsconf["fileStatCache"] = fileStatCache_;
    hdfsFile_->configure(hdfsconf);
    stat_ = hdfsFile_->stat();
    configured_ = true;
}
Esempio n. 4
0
void SquishToElipse()
{
	REAL ElipseFactorX = 1.0;
	REAL ElipseFactorY = 1.0;
	REAL ElipseFactorZ = 1.0;
	GET_PARAMETER(1, "ElipseFactorX", "%f", &ElipseFactorX);
	GET_PARAMETER(1, "ElipseFactorY", "%f", &ElipseFactorY);
	GET_PARAMETER(1, "ElipseFactorZ", "%f", &ElipseFactorZ);
	MSG("Ellipse factors: x, y, z = %.3f, %.3f, %.3f\n", ElipseFactorX, ElipseFactorY, ElipseFactorZ);
	DOF_REAL_D_VEC * x_surf_pos = get_lagrange_coords(state.surface_mesh);
	DOF_REAL_D_VEC * x_vol_pos = get_lagrange_coords(state.volume_mesh);
	FOR_ALL_DOFS(x_surf_pos->fe_space->admin,
	             x_surf_pos->vec[dof][0] = x_surf_pos->vec[dof][0]*ElipseFactorX;
	             x_surf_pos->vec[dof][1] = x_surf_pos->vec[dof][1]*ElipseFactorY;
	             x_surf_pos->vec[dof][2] = x_surf_pos->vec[dof][2]*ElipseFactorZ;
	            );
Esempio n. 5
0
Status Im2SequenceHelper<Ttype, Dtype, Ptype>::InitParam() {
    LOG(WARNING) << "Parsing Im2Sequence op parameter.";
    auto paddings = GET_PARAMETER(PTuple<int>, paddings);
    auto strides = GET_PARAMETER(PTuple<int>, strides);
    auto window_size = GET_PARAMETER(PTuple<int>, window_size);
    auto dilations = GET_PARAMETER(PTuple<int>, dilations);

    Im2SequenceParam<Tensor4d<Ttype, Dtype>> im2sequence_param(window_size[0], window_size[1],
                                                               paddings[0], paddings[1],
                                                               paddings[2], paddings[3],
                                                               strides[0], strides[1],
                                                               dilations[0], dilations[1]);

    _param_im2sequence = im2sequence_param;

    return Status::OK();
}
Esempio n. 6
0
void HdfsFile::configure(base::ConfigurationMap &conf) {
    GET_PARAMETER(hdfsConfigurationFile_, std::string, "hdfsConfigurationFile");

    try {
        overwrite_ = boost::any_cast<bool>(conf["overwrite"]);
    }
    catch(...) {
        // PASS
        //LOG(INFO) << "overwrite not specified. Defaulting to false";
    }

    /* Setup webhdfs config */
    DLOG(INFO) << "Reading HDFS config: " << hdfsConfigurationFile_;

    char *error = NULL;
    conf_ = webhdfs_conf_load(hdfsConfigurationFile_.c_str(), &error);
    if(!conf_) {
        std::ostringstream os;
        os << "Error reading hdfs config: " << hdfsConfigurationFile_ << " : ";
        std::string errorStr(os.str());
        if (error) {
            errorStr += std::string(error);
            free(error);
        }
        throw std::runtime_error(errorStr);
    }

    /* Connect to WebHDFS */
    fs_ = webhdfs_connect(conf_);
    if(!fs_) {
        throw std::runtime_error("error in webhdfs_connect");
    }

    f_ = webhdfs_file_open(fs_, filename_.c_str());

    if(!f_) {
        throw std::runtime_error("error in webhdfs_file_open");
    }

    GET_PARAMETER(fileStatCache_, boost::shared_ptr<base::Cache>, "fileStatCache");

    configured_ = true;
}
Esempio n. 7
0
ADAPT_STAT *get_adapt_stat(const int dim, const char *name,
                           const char *prefix, int info,
                           ADAPT_STAT *adapt_stat)
{
    FUNCNAME("get_adapt_stat");
    ADAPT_STAT  adapt_stand = {nil, 1.0, 2, 30, 2, nil, nil, nil, nil,
                               nil, 0.0, 0.0, nil, nil, nil, nil,
                               dim, 0, dim, 1, 0.5, 0.1, 0.9, 0.2,
                               0.6, 0.1, 0.1
                              };
    char  key[1024];
    ADAPT_STAT *adapt;

    if (dim == 0) {
        WARNING("Adaption does not make sense for dim == 0!\n");
        return nil;
    }

    if (adapt_stat)
        adapt = adapt_stat;
    else {
        adapt = MEM_ALLOC(1, ADAPT_STAT);
        *adapt = adapt_stand;
        if (name)
            adapt->name = strdup(name);
        if (!adapt->name  && prefix)
            adapt->name = strdup(prefix);
    }

    if (!prefix)
        return(adapt);

    sprintf(key, "%s->tolerance", prefix);
    GET_PARAMETER(info-1, key, "%f", &adapt->tolerance);
    sprintf(key, "%s->p", prefix);
    GET_PARAMETER(info-2, key, "%f", &adapt->p);
    sprintf(key, "%s->max_iteration", prefix);
    GET_PARAMETER(info-1, key, "%d", &adapt->max_iteration);
    sprintf(key, "%s->info", prefix);
    GET_PARAMETER(info-1, key, "%d", &adapt->info);

    sprintf(key, "%s->refine_bisections", prefix);
    GET_PARAMETER(info-2, key, "%d", &adapt->refine_bisections);
    sprintf(key, "%s->coarsen_allowed", prefix);
    GET_PARAMETER(info-2, key, "%d", &adapt->coarsen_allowed);
    if (adapt->coarsen_allowed)
    {
        sprintf(key, "%s->coarse_bisections", prefix);
        GET_PARAMETER(info-2, key, "%d", &adapt->coarse_bisections);
    }

    init_strategy(funcName, prefix, info-1, adapt);

    return(adapt);
}
Esempio n. 8
0
static void init_strategy(const char *funcName, const char *prefix, int info,
                          ADAPT_STAT *adapt)
{
    char  key[1024];

    sprintf(key, "%s->strategy", prefix);
    GET_PARAMETER(info, key, "%d", &adapt->strategy);

    switch (adapt->strategy)
    {
    case 2:
        sprintf(key, "%s->MS_gamma", prefix);
        GET_PARAMETER(info, key, "%f", &adapt->MS_gamma);
        if (adapt->coarsen_allowed)
        {
            sprintf(key, "%s->MS_gamma_c", prefix);
            GET_PARAMETER(info, key, "%f", &adapt->MS_gamma_c);
        }
        return;
    case 3:
        sprintf(key, "%s->ES_theta", prefix);
        GET_PARAMETER(info, key, "%f", &adapt->ES_theta);
        if (adapt->coarsen_allowed)
        {
            sprintf(key, "%s->ES_theta_c", prefix);
            GET_PARAMETER(info-1, key, "%f", &adapt->ES_theta_c);
        }
        return;
    case 4:
        sprintf(key, "%s->GERS_theta_star", prefix);
        GET_PARAMETER(info, key, "%f", &adapt->GERS_theta_star);
        sprintf(key, "%s->GERS_nu", prefix);
        GET_PARAMETER(info, key, "%f", &adapt->GERS_nu);
        if (adapt->coarsen_allowed)
        {
            sprintf(key, "%s->GERS_theta_c", prefix);
            GET_PARAMETER(info, key, "%f", &adapt->GERS_theta_c);
        }
        return;
    }
    return;
}
Esempio n. 9
0
ADAPT_INSTAT *get_adapt_instat(const int dim, const char *name,
                               const char *prefix, int info,
                               ADAPT_INSTAT *adapt_instat)
{
    FUNCNAME("get_adapt_instat");
    ADAPT_INSTAT adapt_stand = {nil,
        {{nil,
                1.0, 2.0, 1, -1, nil, nil, nil, nil,
                nil, 0.0, 0.0, nil, nil, nil, nil,
                dim, 0, dim, 2, 0.5, 0.1, 0.9, 0.2,
                0.6, 0.1, 0.1}},
        {{nil,
                1.0, 2.0, 1, -1, nil, nil, nil, nil,
                nil, 0.0, 0.0, nil, nil, nil, nil,
                dim, 1, dim, 2, 0.5, 0.1, 0.9, 0.2,
                0.6, 0.1, 0.1}},
        0.0, 0.0, 1.0, 0.01, nil, nil, nil, nil, nil,
        0, 0, 1.0, 0.1, 0.4, 0.4, 1.0, 0.3,
        0.7071, 1.4142, 8
    };
    char  key[1024];
    ADAPT_INSTAT *adapt;

    if (dim == 0) {
        WARNING("Adaption does not make sense for dim == 0!\n");
        return nil;
    }

    if (adapt_instat)
        adapt = adapt_instat;
    else
    {
        adapt = MEM_ALLOC(1, ADAPT_INSTAT);
        *adapt = adapt_stand;
        if (name)
            adapt->name = strdup(name);
        if (!adapt->name  && prefix)
            adapt->name = strdup(prefix);
    }

    if (!prefix)
        return(adapt);

    sprintf(key, "%s initial", adapt->name);
    adapt->adapt_initial->name = strdup(key);
    sprintf(key, "%s space", adapt->name);
    adapt->adapt_space->name = strdup(key);

    /*---8<---------------------------------------------------------------------*/
    /*---   and now, all other entries                                       ---*/
    /*--------------------------------------------------------------------->8---*/

    sprintf(key, "%s->start_time", prefix);
    GET_PARAMETER(info-1, key, "%f", &adapt->start_time);
    adapt->time = adapt->start_time;
    sprintf(key, "%s->end_time", prefix);
    GET_PARAMETER(info-1, key, "%f", &adapt->end_time);
    sprintf(key, "%s->timestep", prefix);
    GET_PARAMETER(info-1, key, "%f", &adapt->timestep);
    sprintf(key, "%s->strategy", prefix);
    GET_PARAMETER(info-1, key, "%d", &adapt->strategy);
    sprintf(key, "%s->max_iteration", prefix);
    GET_PARAMETER(info-1, key, "%d", &adapt->max_iteration);
    sprintf(key, "%s->tolerance", prefix);
    GET_PARAMETER(info-1, key, "%f", &adapt->tolerance);
    sprintf(key, "%s->rel_initial_error", prefix);
    GET_PARAMETER(info-1, key, "%f", &adapt->rel_initial_error);
    sprintf(key, "%s->rel_space_error", prefix);
    GET_PARAMETER(info-1, key, "%f", &adapt->rel_space_error);
    sprintf(key, "%s->rel_time_error", prefix);
    GET_PARAMETER(info-1, key, "%f", &adapt->rel_time_error);
    sprintf(key, "%s->time_theta_1", prefix);
    GET_PARAMETER(info-2, key, "%f", &adapt->time_theta_1);
    sprintf(key, "%s->time_theta_2", prefix);
    GET_PARAMETER(info-2, key, "%f", &adapt->time_theta_2);
    sprintf(key, "%s->time_delta_1", prefix);
    GET_PARAMETER(info-2, key, "%f", &adapt->time_delta_1);
    sprintf(key, "%s->time_delta_2", prefix);
    GET_PARAMETER(info-2, key, "%f", &adapt->time_delta_2);
    sprintf(key, "%s->info", prefix);
    GET_PARAMETER(info-1, key, "%d", &adapt->info);

    /*---8<---------------------------------------------------------------------*/
    /*---  initialization of the adapt_stat for the initial grid             ---*/
    /*--------------------------------------------------------------------->8---*/

    /*---  tolerance does not have to be initialized, is set!                ---*/
    adapt->adapt_initial->tolerance = adapt->tolerance*adapt->rel_initial_error;
    sprintf(key, "%s->initial->p", prefix);
    GET_PARAMETER(info-2, key, "%f", &adapt->adapt_initial->p);
    sprintf(key, "%s->initial->max_iteration", prefix);
    GET_PARAMETER(info-1, key, "%d", &adapt->adapt_initial->max_iteration);
    sprintf(key, "%s->initial->info", prefix);
    GET_PARAMETER(info-2, key, "%d", &adapt->adapt_initial->info);
    if (adapt->adapt_initial->info < 0)
        adapt->adapt_initial->info = adapt->info-2;

    sprintf(key, "%s->initial->refine_bisections", prefix);
    GET_PARAMETER(info-2, key, "%d", &adapt->adapt_initial->refine_bisections);
    sprintf(key, "%s->initial->coarsen_allowed", prefix);
    GET_PARAMETER(info-2, key, "%d", &adapt->adapt_initial->coarsen_allowed);
    if (adapt->adapt_initial->coarsen_allowed)
    {
        sprintf(key, "%s->initial->coarse_bisections", prefix);
        GET_PARAMETER(info-2, key, "%d", &adapt->adapt_initial->coarse_bisections);
    }
    sprintf(key, "%s->initial", prefix);
    init_strategy(funcName, key, info-1, adapt->adapt_initial);


    /*---8<---------------------------------------------------------------------*/
    /*---  initialization of the adapt_stat for the time-step iteration      ---*/
    /*--------------------------------------------------------------------->8---*/

    /*---  tolerance does not have to be initialized, is set!                ---*/
    adapt->adapt_space->tolerance   = adapt->tolerance*adapt->rel_space_error;
    sprintf(key, "%s->space->p", prefix);
    GET_PARAMETER(info-2, key, "%f", &adapt->adapt_space->p);
    sprintf(key, "%s->space->max_iteration", prefix);
    GET_PARAMETER(info-1, key, "%d", &adapt->adapt_space->max_iteration);
    sprintf(key, "%s->space->info", prefix);
    GET_PARAMETER(info-2, key, "%d", &adapt->adapt_space->info);
    if (adapt->adapt_space->info < 0)
        adapt->adapt_space->info = adapt->info-2;

    sprintf(key, "%s->space->refine_bisections", prefix);
    GET_PARAMETER(info-2, key, "%d", &adapt->adapt_space->refine_bisections);
    sprintf(key, "%s->space->coarsen_allowed", prefix);
    GET_PARAMETER(info-2, key, "%d", &adapt->adapt_space->coarsen_allowed);
    if (adapt->adapt_space->coarsen_allowed)
    {
        sprintf(key, "%s->space->coarse_bisections", prefix);
        GET_PARAMETER(info-2, key, "%d", &adapt->adapt_space->coarse_bisections);
    }
    sprintf(key, "%s->space", prefix);
    init_strategy(funcName, key, info-1, adapt->adapt_space);

    return(adapt);
}
Esempio n. 10
0
void PrintParaview_force(struct StateData * state)//TODO: DEBUG, DELETE ME?
{
    FUNCNAME("PrintParaview");


    char fname4[1000];


    int OutputXParaview;
    GET_PARAMETER(1, "OutputXParaview", "%d", &OutputXParaview);
    if(OutputXParaview == 1)
    {
    	sprintf(fname4, "./sol/solSurf%d.vtk", printCount);
	if(state->surface_mesh->dim == 1)
	{
    		MSG("Writing paraview file %s\n", fname4);
	    	write_paraview_file_lines(state->u_h_surface, fname4);
	}
	else
		MSG("Not sure how to write paraview for 2d surface mesh");
    }

    int OutputPParaview;
    GET_PARAMETER(1, "OutputPParaview", "%d", &OutputPParaview);
    if(OutputPParaview == 1)
    {
    	sprintf(fname4, "./sol/solPh%d.vtk", printCount);
    	MSG("Writing paraview file %s\n", fname4);
	if(state->volume_mesh->dim == 3)
	{
    		write_paraview_file_3d(state->p_h_volume, fname4);
	}
	else
	{
		write_paraview_file_surfaces_2d(state->p_h_volume, fname4);
	}

/*
    	sprintf(fname4, "./sol/3dpara_solPh%d.vtk", printCount);
    	MSG("Writing paraview file %s\n", fname4);
	write_paraview_file_3d_parametric(state->p_h_volume, state->p_volume, state->p_h_error_volume, fname4);
*/
    }

/*
    int ReferenceManiMeshCorrect;
    GET_PARAMETER(1, "ReferenceManiMeshCorrect", "%d", &ReferenceManiMeshCorrect);
    if(ReferenceManiMeshCorrect == 1)
    {
    	DOF_REAL_D_VEC *x_dh;
    	x_dh = get_lagrange_coords(state->ref_manifold_mesh);
    	sprintf(fname4, "./sol/solRefMani%d.vtk", printCount);
    	MSG("Writing paraview file %s\n", fname4);
	write_paraview_file_surfaces_uh_d(x_dh, fname4);
    }
*/

/*
    int DoPError;
    GET_PARAMETER(1, "DoPError", "%d", &DoPError);
    if(DoPError == 1)
    {
    TEST_EXIT(DIM_OF_WORLD == 2, "In print paraview, need to do dim = 3\n");
	sprintf(fname4, "./sol/solP%d.vtk", printCount);
	MSG("Writing paraview file %s\n", fname4);
	write_paraview_file_surfaces_2d(state->p_volume, fname4);
	
    	sprintf(fname4, "./sol/solPerror%d.vtk", printCount);
    	MSG("Writing paraview file %s\n", fname4);
    	write_paraview_file_surfaces_2d(state->p_h_error_volume, fname4);
    }

    int LaplacianMeshCorrect;
    GET_PARAMETER(1, "LaplacianMeshCorrect", "%d", &LaplacianMeshCorrect);
    if(LaplacianMeshCorrect == 1)
    {
    TEST_EXIT(DIM_OF_WORLD == 2, "In print paraview, need to do dim = 3\n");
    	sprintf(fname4, "./sol/solG_x_scalar%d.vtk", printCount);
    	MSG("Writing paraview file %s\n", fname4);
    	write_paraview_file_surfaces_2d(state->g_x_scalar_h_volume, fname4);
	
	sprintf(fname4, "./sol/solG_y_scalar%d.vtk", printCount);
	MSG("Writing paraview file %s\n", fname4);
	write_paraview_file_surfaces_2d(state->g_y_scalar_h_volume, fname4);
    }
*/

	JLogParaview("printed paraview", printCount, state->t);
    printCount++;

    MSG("paraviews written!\n");
}
void CsvRecordParser::dumpDebugInfo() {
    std::string errorLog;
    base::ConfigurationMap conf = splitProducer_->getDebugInfo();

    /**
     * Csv row
     */
    std::ostringstream os;
    for (uint64_t i = 0; i < row_.size(); ++i) {
        os << row_[i] << ", ";
    }
    os << std::endl;
    LOG(ERROR) << "Csv row: " << os.str();
    errorLog += ("Csv row: " + os.str());

    /**
     * Block
     */
    blockreader::BlockPtr block;
    GET_PARAMETER(block, blockreader::BlockPtr, "block");

    std::string filename = std::string("/tmp/") + std::string(basename((char *)url_.c_str())) + "_" +
                           base::utils::to_string(chunkStart_) + "_" +
                           base::utils::to_string(chunkEnd_) + "_" +
                           "_block.txt";
    std::ostringstream os3;
    os3 << "Dumping block to file " << filename;
    LOG(ERROR) << os3.str();
    errorLog += (os3.str() + "\n");
    base::utils::buffer2file(block->buffer, block->used, filename);

    /**
     * split
     */
    std::string split;
    GET_PARAMETER(split, std::string, "split");
    LOG(ERROR) << "Split: " << split;
    errorLog += ("Split: " + split + "\n");

    /**
     * requested blocks
     */
    std::vector<std::pair<uint64_t,uint64_t> > requestedBlocks;
#define DDC_COMMA ,
    GET_PARAMETER(requestedBlocks, std::vector<std::pair<uint64_t DDC_COMMA uint64_t> >, "requestedBlocks");
#undef DDC_COMMA
    std::ostringstream os2;
    os2 << "Requested blocks: " << std::endl;
    for (uint64_t i = 0; i < requestedBlocks.size(); ++i) {
        os2 << "\t" << requestedBlocks[i].first << ", " << requestedBlocks[i].second;
    }
    os2 << std::endl;
    LOG(ERROR) << os2.str();
    errorLog += os2.str();
    std::string filename2 = std::string("/tmp/") + std::string(basename((char *)url_.c_str())) + "_" +
                            base::utils::to_string(chunkStart_) + "_" +
                            base::utils::to_string(chunkEnd_) + "_" +
                            "_errorlog.txt";
    base::utils::buffer2file((uint8_t *)errorLog.data(), errorLog.size(), filename2);

}
  void ExperimentRun::start()
  {
    cout << "Experiment started\n";
		

#ifndef DEBUG_EXPRUN
    try
      {
#endif
        int maxGenerations = int(NEAT::Globals::getSingleton()->getParameterValue("MaxGenerations"));
			
        started=running=true;
			
        for (int generations=(population->getGenerationCount()-1);generations<GET_PARAMETER("MaxGenerations");generations++)
          {
            cout << "CURRENT SUBEXPERIMENT: " << currentSubExperiment << " Generation:" << generations << endl;

            if (generations>0) 
              {
                // TODO: replace OR with experiments[currentSubExperiment].getExperimentName() == "HYBRID"
                if(experiments[currentSubExperiment]->getExperimentName() == "HYBRID" && switchSubExperiment(generations))
                  //					if((experimentType == EXPERIMENT_LEGSWING_HYBRID || experimentType == EXPERIMENT_BITMIRRORING_HYBRID || experimentType == EXPERIMENT_TARGETWEIGHTS_HYBRID) && switchSubExperiment(generations))
                  {
                    cout << "\n\n"
                         << "************************\n"
                         << "Switching SubExperiment:  Hyper -> FT\n"
                         << "************************\n\n";
                    // copy population from (currentSubExperiment-1)%totalSubExperiments to currentSubExperiment using HyperNEAT to P-NEAT converter
                    population = shared_ptr<NEAT::GeneticPopulation>(experiments[currentSubExperiment]->createInitialPopulation(population, experiments[(currentSubExperiment + 1) % totalSubExperiments]));
                    //TODO: check that this copying works
						
                    //THESE CAN COME OUT when Hyper -> NEAT works
                    cout << "changing the following three parameter settings from the HyperNEAT settings of:" << endl;
                    cout << "MutateAddNodeProbability: " << NEAT::Globals::getSingleton()->getParameterValue("MutateAddNodeProbability") << endl;
                    cout << "MutateAddLinkProbability: " << NEAT::Globals::getSingleton()->getParameterValue("MutateAddLinkProbability") << endl;
                    cout << "MutateDemolishLinkProbability: " << NEAT::Globals::getSingleton()->getParameterValue("MutateDemolishLinkProbability") << endl;
                    NEAT::Globals::getSingleton()->setParameterValue("MutateAddNodeProbability",0.0);
                    NEAT::Globals::getSingleton()->setParameterValue("MutateAddLinkProbability",0.0);
                    NEAT::Globals::getSingleton()->setParameterValue("MutateDemolishLinkProbability",0.0);
                    cout << endl << "to the FT-NEAT values of: " << endl;
                    cout << "MutateAddNodeProbability: " << NEAT::Globals::getSingleton()->getParameterValue("MutateAddNodeProbability") << endl;
                    cout << "MutateAddLinkProbability: " << NEAT::Globals::getSingleton()->getParameterValue("MutateAddLinkProbability") << endl;
                    cout << "MutateDemolishLinkProbability: " << NEAT::Globals::getSingleton()->getParameterValue("MutateDemolishLinkProbability") << endl << endl;
						
                    if(experiments[currentSubExperiment]->getHybrid_FTMutateOnlyProbability() != -1.0)
                      NEAT::Globals::getSingleton()->setParameterValue("MutateOnlyProbability", experiments[currentSubExperiment]->getHybrid_FTMutateOnlyProbability());
						
                    if(experiments[currentSubExperiment]->getHybrid_FTMutateLinkProbability() != -1.0)
                      NEAT::Globals::getSingleton()->setParameterValue("MutateLinkProbability", experiments[currentSubExperiment]->getHybrid_FTMutateLinkProbability());
						
                    //THESE CAN COME OUT ONCE THIS WORKS
                    cout << "MutateOnlyProbability" << NEAT::Globals::getSingleton()->getParameterValue("MutateOnlyProbability") << endl;
                    cout << "MutateLinkProbability" << NEAT::Globals::getSingleton()->getParameterValue("MutateLinkProbability") << endl;
                  } else {
                  mutex::scoped_lock scoped_lock(*populationMutex);
                  cout << "\nPRODUCING NEXT GENERATION\n";
                  produceNextGeneration(); 
                }
              }
				
            if (experiments[currentSubExperiment]->performUserEvaluations())
              {
                throw CREATE_LOCATEDEXCEPTION_INFO("ERROR: TRIED TO USE INTERACTIVE EVOLUTION WITH NO GUI!");
              }
            else
              {
                while (!running)
                  {
                    boost::xtime xt;

                    boost::xtime_get(&xt, boost::TIME_UTC_);

                    xt.sec += 1;
                    // boost::thread::sleep(xt); // Sleep for 1/2 second
                    usleep(500000);
                  }
#ifdef INTERACTIVELYEVOLVINGSHAPES
                stringstream genNum; 
                genNum << setw(5) << std::setfill('0') << generations;
                population->dumpLast(outputFileName +"_"+ genNum.str()+".xml",true,false); //print out xml file each generation
#endif
					
										
                cout << "about to evaluatePopulation\n";					
                evaluatePopulation();
              }
				
#ifdef DEBUG_EXPRUN
            cout << "Finishing evaluations\n";
#endif
            finishEvaluations();
            experimentRunPrintToGenChampFile();
				
#ifdef DEBUG_EXPRUN
            cout << "Evaluations Finished\n";
#endif
          }
        cout << "Experiment finished\n";
			
        
			
        cout << "Saving Dump...";
        population->dump(outputFileName+string("_pop.xml"),true,false);
        cout << "Done!\n";

			
        cout << "Saving best individuals...";
        string bestFileName = outputFileName.substr(0,outputFileName.length()-4)+string("_best.xml");
        population->dumpBest(bestFileName,true,true);
        cout << "Done!\n";
			
        cout << "Skippped deleting backup files because of problem with boost!";
        //cout << "Deleting backup file...";
        //boost::filesystem::remove(outputFileName+string(".backup.xml.gz"));
        //cout << "Done!\n";
			
#ifndef DEBUG_EXPRUN
      }
    catch (const std::exception &ex)
      {
        cout << "CAUGHT ERROR AT " << __FILE__ << " : " << __LINE__ << endl;
        CREATE_PAUSE(ex.what());
      }
    catch (...)
      {
        cout << "CAUGHT ERROR AT " << __FILE__ << " : " << __LINE__ << endl;
        CREATE_PAUSE("AN UNKNOWN EXCEPTION HAS BEEN THROWN!");
      }
#endif
  }