firx error in slave.c
authorBenjamin Auder <benjamin.auder@somewhere>
Thu, 19 Jan 2017 00:59:47 +0000 (01:59 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Thu, 19 Jan 2017 00:59:47 +0000 (01:59 +0100)
43 files changed:
TODO
old_C_code/.gitignore
old_C_code/stage1/src/MPI_Main/slave.c
old_C_code/stage2_UNFINISHED/src/.gitkeep [moved from old_C_code/stage2/src/.gitkeep with 100% similarity]
old_C_code/stage2_UNFINISHED/src/00_convertir-donnnes_2009.r [moved from old_C_code/stage2/src/00_convertir-donnnes_2009.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/00_convertir-donnnes_2010.r [moved from old_C_code/stage2/src/00_convertir-donnnes_2010.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/01_extract-features_2009.r [moved from old_C_code/stage2/src/01_extract-features_2009.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/01_extract-features_2010.r [moved from old_C_code/stage2/src/01_extract-features_2010.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/02_cluster_2009.r [moved from old_C_code/stage2/src/02_cluster_2009.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/03_compute-sums-of-classes_2009.r [moved from old_C_code/stage2/src/03_compute-sums-of-classes_2009.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/05_cluster2stepWER.r [moved from old_C_code/stage2/src/05_cluster2stepWER.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/06_predictions.r [moved from old_C_code/stage2/src/06_predictions.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/00_convertir-donnnes_2011.r [moved from old_C_code/stage2/src/unused/00_convertir-donnnes_2011.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/00_createCalendar.r [moved from old_C_code/stage2/src/unused/00_createCalendar.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/00_plots-energycon.r [moved from old_C_code/stage2/src/unused/00_plots-energycon.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/01_StBr.r [moved from old_C_code/stage2/src/unused/01_StBr.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/01_extract-features2_2009.r [moved from old_C_code/stage2/src/unused/01_extract-features2_2009.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/02_cluster-par_2009.r [moved from old_C_code/stage2/src/unused/02_cluster-par_2009.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/03_compute-sums-of-classes-par_2009.r [moved from old_C_code/stage2/src/unused/03_compute-sums-of-classes-par_2009.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/03_compute-sums-of-classesRANDOM-par_2009.r [moved from old_C_code/stage2/src/unused/03_compute-sums-of-classesRANDOM-par_2009.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/03_compute-sums-of-classesRANDOM_2009.r [moved from old_C_code/stage2/src/unused/03_compute-sums-of-classesRANDOM_2009.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/03_compute-sums-of-classesRANDOM_2010.r [moved from old_C_code/stage2/src/unused/03_compute-sums-of-classesRANDOM_2010.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/03_compute-sums-of-classes_2010-par.r [moved from old_C_code/stage2/src/unused/03_compute-sums-of-classes_2010-par.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/03_compute-sums-of-classes_2010.r [moved from old_C_code/stage2/src/unused/03_compute-sums-of-classes_2010.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/04_predictions.r [moved from old_C_code/stage2/src/unused/04_predictions.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/05_cluster2step.r [moved from old_C_code/stage2/src/unused/05_cluster2step.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/05_cluster2stepWER-RANDOM.r [moved from old_C_code/stage2/src/unused/05_cluster2stepWER-RANDOM.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/05_cluster2stepWER-par.r [moved from old_C_code/stage2/src/unused/05_cluster2stepWER-par.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/06_predictions-ICAME.r [moved from old_C_code/stage2/src/unused/06_predictions-ICAME.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/06_predictions-RANDOM.r [moved from old_C_code/stage2/src/unused/06_predictions-RANDOM.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/06_predictions-par.r [moved from old_C_code/stage2/src/unused/06_predictions-par.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/analysis-SME.r [moved from old_C_code/stage2/src/unused/analysis-SME.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/aux.r [moved from old_C_code/stage2/src/unused/aux.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/aux2.r [moved from old_C_code/stage2/src/unused/aux2.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/calendar_ir.txt [moved from old_C_code/stage2/src/unused/calendar_ir.txt with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/calendar_transition_groups-1996-2011.txt [moved from old_C_code/stage2/src/unused/calendar_transition_groups-1996-2011.txt with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/datesall.txt [moved from old_C_code/stage2/src/unused/datesall.txt with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/descriptive-32K.r [moved from old_C_code/stage2/src/unused/descriptive-32K.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/effectives-per-classe.r [moved from old_C_code/stage2/src/unused/effectives-per-classe.r with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/identifs.txt [moved from old_C_code/stage2/src/unused/identifs.txt with 100% similarity]
old_C_code/stage2_UNFINISHED/src/unused/sowas-superseded.r [moved from old_C_code/stage2/src/unused/sowas-superseded.r with 100% similarity]
old_C_code/stage2_UNFINISHED/test/.gitkeep [moved from old_C_code/stage2/test/.gitkeep with 100% similarity]
old_C_code/wrapper.R [moved from old_C_code/stage1/wrapper.R with 89% similarity]

diff --git a/TODO b/TODO
index 6937975..9fd325a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -17,8 +17,21 @@ https://docs.docker.com/engine/getstarted/step_one/
 A faire:
  - finir les experiences (sur nb de classes, nb de curves / chunk, nb de procs)
    et sur d'autres architectures
-        ==> code OK, source("wrapper.R") puis
-        serialize("build", "pathTo2010.csv","pathTo2010.bin")
+
+
+
+
+
+dans old_C_code/build :
+cmake ../stage1/src
+make
+
+dans data/, lancer R puis :
+source("../old_C_code/wrapper.R")
+serialize("../old_C_code/build", "2009.csv","2009.bin")
+
+
+
         ppam_exe("build",np,"pathTo2010.bin","nbSeriesPerChunk nbClusters 1 2")
         C = getMedoids("build", "ppamResult.xml", "ppamFinalSeries.bin")
         quelques_series = deserialize("pathTo2010.bin", rangs...)
index db6ef2b..f9c22cb 100644 (file)
@@ -1,9 +1,6 @@
 #ignore building files and folders
 build/
 
-#ignore "real" data (way too large)
-data/
-
 #ignore object files + library
 *.o
 *.so
index e66f599..d7d0afe 100644 (file)
@@ -20,7 +20,7 @@ static Result_t* do_work(Work_t* work)
        
        uint32_t nbSeries = work->nbSeries;
        uint32_t tsLength = get_tsLength(work->inputFileName);
-       uint32_t nbValues = (tsLength - 4) / 3;
+       uint32_t nbValues = (tsLength - 4) / 4;
        
        // nbReducedCoordinates = smallest power of 2 which is above nbValues
        uint32_t nbReducedCoordinates = (uint32_t)ceil(log2(nbValues));
similarity index 89%
rename from old_C_code/stage1/wrapper.R
rename to old_C_code/wrapper.R
index ec859dc..ee15a79 100644 (file)
@@ -1,6 +1,8 @@
 ppam_exe = function(path=".", np=parallel::detectCores(), data=NULL,
-       args="DontLetMeEmptyPlease!")
+       nbSeriesPerChunk, nbClusters, randomize=1, p_dissims=2)
 {
+       args = paste(nbSeriesPerChunk," ",nbClusters," ",randomize," ",p_dissims,sep="")
+
        command_line = paste("mpirun -np ",np," ",path,"/ppam.exe cluster",sep="")
 
        #if data provided (as data.frame or matrix...): binarize it, and add it as first argument
@@ -46,8 +48,9 @@ serialize = function(path=".", csvSeries, binSeries, byCols=0, nbSeries=0)
                sep=""))
 }
 
-deserialize = function(path=".", binSeries, csvSeries, ranks="-1")
+deserialize = function(path=".", binSeries, csvSeries, ranks="-1", return=TRUE)
 {
        system(paste(path,"/ppam.exe deserialize ",binSeries," ",csvSeries," ",ranks,sep=""))
-       return ( read.table(csvSeries, sep=",") )
+       if (return)
+               return ( read.table(csvSeries, sep=",") )
 }