Coupure prévue mardi 3 Août au matin pour maintenance du serveur. Nous faisons au mieux pour que celle-ci soit la plus brève possible.

Commit 25e1dc7c authored by maitre's avatar maitre
Browse files

Bugged cuda mo version

parent 4b16bc6c
...@@ -27,7 +27,7 @@ Centre de Math ...@@ -27,7 +27,7 @@ Centre de Math
#define STD_FLAVOR_SO 0 #define STD_FLAVOR_SO 0
#define STD_FLAVOR_MO 1 #define STD_FLAVOR_MO 1
#define CUDA_FLAVOR_SO 0 #define CUDA_FLAVOR_SO 0
#define CUDA_FLAVOR_MO 0 #define CUDA_FLAVOR_MO 1
#define UNIX 1 #define UNIX 1
#define WINDOWS 2 #define WINDOWS 2
......
...@@ -867,6 +867,11 @@ exponent ([Ee][+-]?[0-9]+) ...@@ -867,6 +867,11 @@ exponent ([Ee][+-]?[0-9]+)
// create a symbolic link from Makefile to EASEA.mak // create a symbolic link from Makefile to EASEA.mak
symlink(sFullFileName,sPathName); symlink(sFullFileName,sPathName);
} }
else{
DEBUG_PRT("file name : %s",sFileName);
if( symlink(sFileName,"Makefile") ) perror("Symlink creation error ");
}
if (bVERBOSE){ if (bVERBOSE){
printf("Creating %s...\n",sFileName); printf("Creating %s...\n",sFileName);
...@@ -1554,6 +1559,24 @@ exponent ([Ee][+-]?[0-9]+) ...@@ -1554,6 +1559,24 @@ exponent ([Ee][+-]?[0-9]+)
<COPY_USER_FUNCTION>"GenomeClass" {if (TARGET==EO) fprintf(fpOutputFile, "GenotypeT"); <COPY_USER_FUNCTION>"GenomeClass" {if (TARGET==EO) fprintf(fpOutputFile, "GenotypeT");
else fprintf(fpOutputFile,"Genome."); else fprintf(fpOutputFile,"Genome.");
} }
<COPY_USER_FUNCTION>"f1" {
if( bWithinCUDA_Evaluator && TARGET==CUDA && TARGET_FLAVOR==CUDA_FLAVOR_MO ){
fprintf(fpOutputFile,"(f[0])");
}
else
fprintf(fpOutputFile,"%s",yytext);
}
<COPY_USER_FUNCTION>"f2" {
if( bWithinCUDA_Evaluator && TARGET==CUDA && TARGET_FLAVOR==CUDA_FLAVOR_MO ){
fprintf(fpOutputFile,"(f[1])");
}
else
fprintf(fpOutputFile,"%s",yytext);
}
<COPY_USER_FUNCTION>"Genome" { <COPY_USER_FUNCTION>"Genome" {
if (bWithinDisplayFunction) fprintf(fpOutputFile,"(*this)"); if (bWithinDisplayFunction) fprintf(fpOutputFile,"(*this)");
else if ((TARGET==EO)&&(bWithinInitialiser)) fprintf(fpOutputFile, "(*genome)"); else if ((TARGET==EO)&&(bWithinInitialiser)) fprintf(fpOutputFile, "(*genome)");
...@@ -1661,7 +1684,7 @@ exponent ([Ee][+-]?[0-9]+) ...@@ -1661,7 +1684,7 @@ exponent ([Ee][+-]?[0-9]+)
<COPY_USER_FUNCTION>"\\end" {rewind(fpGenomeFile); <COPY_USER_FUNCTION>"\\end" {rewind(fpGenomeFile);
yyin = fpTemplateFile; yyin = fpTemplateFile;
BEGIN TEMPLATE_ANALYSIS; BEGIN TEMPLATE_ANALYSIS;
bWithinInitialiser=bWithinXover=bWithinMutator=bWithinEvaluator=0; bWithinInitialiser=bWithinXover=bWithinMutator=bWithinEvaluator=bWithinCUDA_Evaluator=0;
if (bWithinDisplayFunction){ if (bWithinDisplayFunction){
bWithinDisplayFunction=0; // display function bWithinDisplayFunction=0; // display function
} }
...@@ -1850,7 +1873,11 @@ int CEASEALexer::create(CEASEAParser* pParser, CSymbolTable* pSymTable) ...@@ -1850,7 +1873,11 @@ int CEASEALexer::create(CEASEAParser* pParser, CSymbolTable* pSymTable)
} } } }
if (TARGET==CUDA){ if (TARGET==CUDA){
if(TARGET_FLAVOR == CUDA_FLAVOR_SO )
strcat(sTemp,"CUDA.tpl"); strcat(sTemp,"CUDA.tpl");
else
strcat(sTemp,"CUDA_MO.tpl");
if (!(yyin = fpTemplateFile = fopen(sTemp, "r"))){ if (!(yyin = fpTemplateFile = fopen(sTemp, "r"))){
fprintf(stderr,"\n*** Could not open %s.\n",sTemp); fprintf(stderr,"\n*** Could not open %s.\n",sTemp);
fprintf(stderr,"*** Please modify the EZ_PATH environment variable.\n"); fprintf(stderr,"*** Please modify the EZ_PATH environment variable.\n");
......
...@@ -1326,7 +1326,15 @@ int main(int argc, char *argv[]){ ...@@ -1326,7 +1326,15 @@ int main(int argc, char *argv[]){
if (!mystricmp(sTemp,"eo")) TARGET=EO; if (!mystricmp(sTemp,"eo")) TARGET=EO;
else if (!mystricmp(sTemp,"galib")) TARGET=GALIB; else if (!mystricmp(sTemp,"galib")) TARGET=GALIB;
else if (!mystricmp(sTemp,"dream")) TARGET=DREAM; else if (!mystricmp(sTemp,"dream")) TARGET=DREAM;
else if (!mystricmp(sTemp,"cuda")) TARGET=CUDA; else if (!mystricmp(sTemp,"cuda")){
TARGET=CUDA;
TARGET_FLAVOR = CUDA_FLAVOR_SO;
}
else if( !mystricmp(sTemp,"cuda_mo") ){
TARGET=CUDA;
TARGET_FLAVOR = CUDA_FLAVOR_MO;
}
else if (!mystricmp(sTemp,"std")) { else if (!mystricmp(sTemp,"std")) {
TARGET=STD; TARGET=STD;
TARGET_FLAVOR = STD_FLAVOR_SO; TARGET_FLAVOR = STD_FLAVOR_SO;
...@@ -1335,6 +1343,7 @@ int main(int argc, char *argv[]){ ...@@ -1335,6 +1343,7 @@ int main(int argc, char *argv[]){
TARGET=STD; TARGET=STD;
TARGET_FLAVOR = STD_FLAVOR_MO; TARGET_FLAVOR = STD_FLAVOR_MO;
} }
else if (!mystricmp(sTemp,"v")) bVERBOSE=true; else if (!mystricmp(sTemp,"v")) bVERBOSE=true;
else if (!mystricmp(sTemp,"path")) { else if (!mystricmp(sTemp,"path")) {
if (argv[++nParamNb][0]=='"') { if (argv[++nParamNb][0]=='"') {
......
...@@ -60,6 +60,9 @@ clean: ...@@ -60,6 +60,9 @@ clean:
rm -f *.o $(EXEC) $(EXEC)_bin rm -f *.o $(EXEC) $(EXEC)_bin
cd alexyacc && make clean cd alexyacc && make clean
install:$(EXEC)
sudo cp $< /usr/bin/easea
# realclean: clean # realclean: clean
# rm -f EaseaParse.cpp EaseaParse.h EaseaLex.cpp EaseaLex.h # rm -f EaseaParse.cpp EaseaParse.h EaseaLex.cpp EaseaLex.h
......
...@@ -82,7 +82,7 @@ struct gpuOptions initOpts; ...@@ -82,7 +82,7 @@ struct gpuOptions initOpts;
\INSERT_INITIALISATION_FUNCTION \INSERT_INITIALISATION_FUNCTION
\INSERT_FINALIZATION_FUNCTION \INSERT_FINALIZATION_FUNCTION
\INSERT_GENERATION_FUNCTION \INSERT_GENERATION_FUNCTION
\INSERT_BOUND_CHECKING
...@@ -538,6 +538,7 @@ void EvolutionaryAlgorithm::runEvolutionaryLoop(){ ...@@ -538,6 +538,7 @@ void EvolutionaryAlgorithm::runEvolutionaryLoop(){
population->produceOffspringPopulation(); population->produceOffspringPopulation();
\INSERT_BOUND_CHECKING_FCT_CALL
TIME_ST(eval); TIME_ST(eval);
for( size_t i=0 ; i<this->population->actualOffspringPopulationSize ; i++ ) for( size_t i=0 ; i<this->population->actualOffspringPopulationSize ; i++ )
......
This diff is collapsed.
...@@ -318,7 +318,7 @@ void EvolutionaryAlgorithm::showPopulationStats(struct timeval beginTime){ ...@@ -318,7 +318,7 @@ void EvolutionaryAlgorithm::showPopulationStats(struct timeval beginTime){
if(currentGeneration==0) if(currentGeneration==0)
printf("GEN\tTIME\t\tEVAL\tBEST\t\tAVG\t\tSTDEV\n\n"); printf("GEN\tTIME\t\tEVAL\tBEST\t\tAVG\t\tSTDEV\n\n");
assert( currentSTDEV == currentSTDEV ); // assert( currentSTDEV == currentSTDEV );
struct timeval end, res; struct timeval end, res;
gettimeofday(&end,0); gettimeofday(&end,0);
......
...@@ -283,6 +283,8 @@ void EvolutionaryAlgorithm::runEvolutionaryLoop(){ ...@@ -283,6 +283,8 @@ void EvolutionaryAlgorithm::runEvolutionaryLoop(){
currentGeneration += 1; currentGeneration += 1;
} }
population->sortParentPopulation(); population->sortParentPopulation();
std::cout << *population->parents[0] << std::endl;
std::cout << *population << std::endl;
std::cout << "Generation : " << currentGeneration << std::endl; std::cout << "Generation : " << currentGeneration << std::endl;
...@@ -1690,7 +1692,7 @@ $(BIN):$(OBJ) ...@@ -1690,7 +1692,7 @@ $(BIN):$(OBJ)
$(CXX) $^ -o $@ $(LDFLAGS) $(CXX) $^ -o $@ $(LDFLAGS)
easeaclean: clean easeaclean: clean
rm -f Makefile $(SRC) $(HDR) EASEA.mak rm -f Makefile $(SRC) $(HDR) EASEA.mak EASEA.prm
clean: clean:
rm -f $(OBJ) $(BIN) rm -f $(OBJ) $(BIN)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment