-/code/build/*
+/code/src/build/*
+/code/test/build/*
 /code/data/src/
 
 *.aux
 
 ---
 
 This program takes n time-series in input and is divided in two stages:
-  1) (Heuristic) k-medoids algorithm in parallel to obtain K centers, K << n
+       1) (Heuristic) k-medoids algorithm in parallel to obtain K centers, K << n
        2) Filtering WER(?) to obtain the final k < K group representations.
 
 ---
 
 To compile source code :
 
-   cd build
-   cmake ../src
+   (mkdir -p (src|test)/build
+   cd (src|test)/build
+   cmake ..
    make
 
 Usage :
 
-   ppam-mpi cluster ifilename nbSeriesInChunk nbClusters randomize p_for_dissims
+   mpirun -np nbProcess ppam.exe cluster ifilename nbSeriesInChunk nbClusters randomize p_for_dissims
 
 Where :
+   nbProcess = number of simultaneous processes
    ifilename = path to serialized dataset (read below)
    nbSeriesInChunk = number of time-series to process sequentially
    nbClusters = number of clusters
 
 #include "Util/types.h"
 #include "Util/rng.h"
-#include <cds/Vector.h>
+#include <cgds/Vector.h>
 #include <stdlib.h>
 #include <math.h>
 
 
 #ppam executable (serialize, cluster, classif)
 
 #cds
-find_path(CDS_INCLUDE_PATH "cds/cds.h")
-find_library(CDS_LIBRARY cds)
-include_directories(${CDS_INCLUDE_PATH})
+set(CGDS_INCLUDE_PATH "/usr/local/include/cgds")
+#set(CGDS_LIBRARY "/usr/local/lib/libcgds.so")
+#find_path(CDS_INCLUDE_PATH "cgds/cgds.h")
+#find_library(CGDS_LIBRARY cgds)
+include_directories(${CGDS_INCLUDE_PATH})
 
 #GSL: standard location
 find_path(GSL_INCLUDE_PATH "gsl/gsl_linalg.h")
 file(GLOB_RECURSE ppam_src "${CMAKE_SOURCE_DIR}/*.c")
 add_executable(ppam.exe ${ppam_src})
 add_library(ppam SHARED ${ppam_src})
-target_link_libraries(ppam.exe m cds ${MPI_LIBRARIES} ${LIBXML2_LIBRARIES} ${GSL_LIBRARIES} ${CDS_LIBRARY})
-target_link_libraries(ppam m cds ${MPI_LIBRARIES} ${LIBXML2_LIBRARIES} ${GSL_LIBRARIES} ${CDS_LIBRARY})
+target_link_libraries(ppam.exe m cgds ${MPI_LIBRARIES} ${LIBXML2_LIBRARIES} ${GSL_LIBRARIES})# ${CGDS_LIBRARY})
+target_link_libraries(ppam m cgds ${MPI_LIBRARIES} ${LIBXML2_LIBRARIES} ${GSL_LIBRARIES})# ${CGDS_LIBRARY})
 
 if (MPI_COMPILE_FLAGS)
        set_target_properties(ppam.exe PROPERTIES
 
 #include <math.h>
 #include "Util/types.h"
 #include "Util/utils.h"
-#include <cds/Vector.h>
+#include <cgds/Vector.h>
 #include <string.h>
 
 // parse a line into two integers (ID, raw power)
                {
                        //just starting a new time-series: must process the last one (if there is a last one !)
                        if (lastID > 0)
-                       {                               
+                       {
                                if (tsLength == refTsLength && !overflow)
                                {
                                        seriesCount++;
 
 #include "Util/utils.h"
 #include <math.h>
-#include <cds/Vector.h>
+#include <cgds/Vector.h>
 
 void free_work(Work_t* work)
 {
 
 #include "TimeSeries/deserialize.h"
 #include "Classification/getClass.h"
 #include <string.h>
-#include <cds/Vector.h>
+#include <cgds/Vector.h>
 #include <libxml/xmlreader.h>
 
 // serialize text file argv[1] into a binary file argv[2]