improve project structure
authorBenjamin Auder <benjamin.auder@somewhere>
Sun, 16 Oct 2016 22:42:05 +0000 (00:42 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Sun, 16 Oct 2016 22:42:05 +0000 (00:42 +0200)
52 files changed:
.gitignore [deleted file]
code/.gitignore [new file with mode: 0644]
code/README
code/stage1/src/Algorithm/compute_coefficients.c [moved from code/src/stage1/Algorithm/compute_coefficients.c with 100% similarity]
code/stage1/src/Algorithm/compute_coefficients.h [moved from code/src/stage1/Algorithm/compute_coefficients.h with 100% similarity]
code/stage1/src/Algorithm/get_dissimilarities.c [moved from code/src/stage1/Algorithm/get_dissimilarities.c with 100% similarity]
code/stage1/src/Algorithm/get_dissimilarities.h [moved from code/src/stage1/Algorithm/get_dissimilarities.h with 100% similarity]
code/stage1/src/Algorithm/pam.c [moved from code/src/stage1/Algorithm/pam.c with 100% similarity]
code/stage1/src/Algorithm/pam.h [moved from code/src/stage1/Algorithm/pam.h with 100% similarity]
code/stage1/src/CMakeLists.txt [moved from code/src/stage1/CMakeLists.txt with 100% similarity]
code/stage1/src/Classification/_Readme [moved from code/src/stage1/Classification/_Readme with 100% similarity]
code/stage1/src/Classification/getClass.c [moved from code/src/stage1/Classification/getClass.c with 100% similarity]
code/stage1/src/Classification/getClass.h [moved from code/src/stage1/Classification/getClass.h with 100% similarity]
code/stage1/src/MPI_Communication/pack.c [moved from code/src/stage1/MPI_Communication/pack.c with 100% similarity]
code/stage1/src/MPI_Communication/pack.h [moved from code/src/stage1/MPI_Communication/pack.h with 100% similarity]
code/stage1/src/MPI_Communication/unpack.c [moved from code/src/stage1/MPI_Communication/unpack.c with 100% similarity]
code/stage1/src/MPI_Communication/unpack.h [moved from code/src/stage1/MPI_Communication/unpack.h with 100% similarity]
code/stage1/src/MPI_Main/master.c [moved from code/src/stage1/MPI_Main/master.c with 100% similarity]
code/stage1/src/MPI_Main/master.h [moved from code/src/stage1/MPI_Main/master.h with 100% similarity]
code/stage1/src/MPI_Main/slave.c [moved from code/src/stage1/MPI_Main/slave.c with 100% similarity]
code/stage1/src/MPI_Main/slave.h [moved from code/src/stage1/MPI_Main/slave.h with 100% similarity]
code/stage1/src/TimeSeries/deserialize.c [moved from code/src/stage1/TimeSeries/deserialize.c with 100% similarity]
code/stage1/src/TimeSeries/deserialize.h [moved from code/src/stage1/TimeSeries/deserialize.h with 100% similarity]
code/stage1/src/TimeSeries/serialize.c [moved from code/src/stage1/TimeSeries/serialize.c with 100% similarity]
code/stage1/src/TimeSeries/serialize.h [moved from code/src/stage1/TimeSeries/serialize.h with 100% similarity]
code/stage1/src/Util/rng.c [moved from code/src/stage1/Util/rng.c with 100% similarity]
code/stage1/src/Util/rng.h [moved from code/src/stage1/Util/rng.h with 100% similarity]
code/stage1/src/Util/types.h [moved from code/src/stage1/Util/types.h with 100% similarity]
code/stage1/src/Util/utils.c [moved from code/src/stage1/Util/utils.c with 100% similarity]
code/stage1/src/Util/utils.h [moved from code/src/stage1/Util/utils.h with 100% similarity]
code/stage1/src/main.c [moved from code/src/stage1/main.c with 100% similarity]
code/stage1/src/main.sh [moved from code/src/main.sh with 100% similarity]
code/stage1/test/Algorithm/t.compute_coefficients.c [moved from code/test/stage1/Algorithm/t.compute_coefficients.c with 100% similarity]
code/stage1/test/Algorithm/t.pam.c [moved from code/test/stage1/Algorithm/t.pam.c with 100% similarity]
code/stage1/test/CMakeLists.txt [moved from code/test/stage1/CMakeLists.txt with 100% similarity]
code/stage1/test/MPI_Communication/t.pack.c [moved from code/test/stage1/MPI_Communication/t.pack.c with 94% similarity]
code/stage1/test/MPI_Communication/t.unpack.c [moved from code/test/stage1/MPI_Communication/t.unpack.c with 93% similarity]
code/stage1/test/TimeSeries/t.deserialize.c [moved from code/test/stage1/TimeSeries/t.deserialize.c with 96% similarity]
code/stage1/test/TimeSeries/t.serialize.c [moved from code/test/stage1/TimeSeries/t.serialize.c with 71% similarity]
code/stage1/test/Util/t.rng.c [moved from code/test/stage1/Util/t.rng.c with 100% similarity]
code/stage1/test/Util/t.utils.c [moved from code/test/stage1/Util/t.utils.c with 89% similarity]
code/stage1/test/lut.h [moved from code/test/lut.h with 100% similarity]
code/stage1/test/main.c [moved from code/test/stage1/main.c with 100% similarity]
code/stage1/test/tdata/integers.txt [moved from code/data/test/integers.txt with 100% similarity]
code/stage1/test/tdata/reals.txt [moved from code/data/test/reals.txt with 100% similarity]
code/stage1/test/tdata/sample_byCols.bin [moved from code/data/test/sample_byCols.bin with 100% similarity]
code/stage1/test/tdata/sample_byCols.csv [moved from code/data/test/sample_byCols.csv with 100% similarity]
code/stage1/test/tdata/sample_byRows.bin [moved from code/data/test/sample_byRows.bin with 100% similarity]
code/stage1/test/tdata/sample_byRows.csv [moved from code/data/test/sample_byRows.csv with 100% similarity]
code/stage2/src/.gitkeep [moved from code/src/stage2/.gitkeep with 100% similarity]
code/stage2/test/.gitkeep [moved from code/test/stage2/.gitkeep with 100% similarity]
communication/.gitignore [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
deleted file mode 100644 (file)
index 0372ddc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/code/src/build/*
-/code/test/build/*
-/code/data/src/
-
-*.aux
-*.log
-*.nav
-*.snm
-*.toc
-*.out
diff --git a/code/.gitignore b/code/.gitignore
new file mode 100644 (file)
index 0000000..f8a6218
--- /dev/null
@@ -0,0 +1,2 @@
+#ignore "real" data (way too large)
+data/
index 5546cf6..fa76933 100644 (file)
@@ -1,8 +1,7 @@
 To compile source code :
 
-   (mkdir -p (src|test)/build
-   cd (src|test)/build
-   cmake ..
+   cd build/stage1/src #and then stage2
+   cmake ../../../stage1/src
    make
 
 Usage :
similarity index 100%
rename from code/src/main.sh
rename to code/stage1/src/main.sh
similarity index 94%
rename from code/test/stage1/MPI_Communication/t.pack.c
rename to code/stage1/test/MPI_Communication/t.pack.c
index 125fd47..6692af5 100644 (file)
@@ -9,7 +9,7 @@
 void t_pack1()
 {
        Work_t* work = (Work_t*)malloc(sizeof(Work_t));
-       work->inputFileName = "../data/inputTest.bin";
+       work->inputFileName = "../tdata/inputTest.bin";
        work->nbSeries = 5;
        uint32_t ranks[] =
        {
@@ -27,9 +27,9 @@ void t_pack1()
        // Hard-coded expected packed work
        unsigned char expectedPackedWork[] =
        {
-               // --> ../data/inputTest.bin
+               // --> ../tdata/inputTest.bin
                46,46,47,100,97,116,97,47,105,110,112,117,116,84,101,115,116,46,98,105,110,
-               // continue with 256 - strlen("../data/inputTest.bin") zeros...
+               // continue with 256 - strlen("../tdata/inputTest.bin") zeros...
                0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -12,9 +12,9 @@ void t_unpack1()
        // Hard-coded packed work
        unsigned char packedWork[] =
        {
-               // --> ../data/inputTest.bin
+               // --> ../tdata/inputTest.bin
                46,46,47,100,97,116,97,47,105,110,112,117,116,84,101,115,116,46,98,105,110,
-               // continue with 256 - strlen("../data/inputTest.bin") zeros...
+               // continue with 256 - strlen("../tdata/inputTest.bin") zeros...
                0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -35,7 +35,7 @@ void t_unpack1()
        uint32_t nbSeriesInChunk = 7;
        Work_t* work = unpack_work(packedWork, nbSeriesInChunk);
 
-       LUT_ASSERT(strcmp(work->inputFileName, "../data/inputTest.bin") == 0);
+       LUT_ASSERT(strcmp(work->inputFileName, "../tdata/inputTest.bin") == 0);
        LUT_ASSERT(work->nbSeries == 5);
        uint32_t ranks[] =
        {
similarity index 96%
rename from code/test/stage1/TimeSeries/t.deserialize.c
rename to code/stage1/test/TimeSeries/t.deserialize.c
index 22e0956..3a6413d 100644 (file)
@@ -8,7 +8,7 @@
 void t_deserialize1()
 {
        // decode sample_byCols.bin into the toy dataset (4 customers, 3 sample points)
-       const char* ifName = "../data/test/sample_byCols.bin";
+       const char* ifName = "../tdata/test/sample_byCols.bin";
        
        // check 'header'
        uint32_t nbSeries = get_nbSeries(ifName);
@@ -52,7 +52,7 @@ void t_deserialize1()
 void t_deserialize2()
 {
        // decode sample_byRows.bin into the toy dataset (4 customers, 3 sample points)
-       const char* ifName = "../data/test/sample_byRows.bin";
+       const char* ifName = "../tdata/test/sample_byRows.bin";
        
        // check 'header'
        uint32_t nbSeries = get_nbSeries(ifName);
similarity index 71%
rename from code/test/stage1/TimeSeries/t.serialize.c
rename to code/stage1/test/TimeSeries/t.serialize.c
index 1dda321..6003c67 100644 (file)
@@ -16,9 +16,9 @@ static void checkFilesEqual(const char* fileName1, const char* fileName2)
 
 void t_serialize1()
 {
-       const char* csvIfName = "../data/test/sample_byCols.csv";
-       const char* binaryIfName = "../data/test/sample_byCols.bin";
-       const char* tmpBinaryIfName = "../data/test/sample_byCols.tmp.bin";
+       const char* csvIfName = "../tdata/test/sample_byCols.csv";
+       const char* binaryIfName = "../tdata/test/sample_byCols.bin";
+       const char* tmpBinaryIfName = "../tdata/test/sample_byCols.tmp.bin";
        
        // serialize text file into a temporary binary file
        serialize_byCols(csvIfName, tmpBinaryIfName, 0);
@@ -32,9 +32,9 @@ void t_serialize1()
 
 void t_serialize2()
 {
-       const char* csvIfName = "../data/test/sample_byRows.csv";
-       const char* binaryIfName = "../data/test/sample_byRows.bin";
-       const char* tmpBinaryIfName = "../data/test/sample_byRows.tmp.bin";
+       const char* csvIfName = "../tdata/test/sample_byRows.csv";
+       const char* binaryIfName = "../tdata/test/sample_byRows.bin";
+       const char* tmpBinaryIfName = "../tdata/test/sample_byRows.tmp.bin";
        
        // serialize text file into a temporary binary file
        serialize_byRows(csvIfName, tmpBinaryIfName, 0);
similarity index 89%
rename from code/test/stage1/Util/t.utils.c
rename to code/stage1/test/Util/t.utils.c
index 254ef00..1abed91 100644 (file)
@@ -8,7 +8,7 @@
 //integers
 void t_utils1()
 {
-       FILE* file = fopen("../data/test/integers.txt", "rb");
+       FILE* file = fopen("../tdata/test/integers.txt", "rb");
        int64_t x;
        readInt(file, &x);
        LUT_ASSERT(x == 1234);
@@ -28,7 +28,7 @@ void t_utils1()
 //reals
 void t_utils2()
 {
-       FILE* file = fopen("../data/test/reals.txt", "rb");
+       FILE* file = fopen("../tdata/test/reals.txt", "rb");
        Real x, tol = 1e-10;
        readReal(file, &x);
        LUT_ASSERT(fabs(x - 1234.056) < tol);
similarity index 100%
rename from code/test/lut.h
rename to code/stage1/test/lut.h
diff --git a/communication/.gitignore b/communication/.gitignore
new file mode 100644 (file)
index 0000000..bb8be15
--- /dev/null
@@ -0,0 +1,8 @@
+#ignore all files produced by LaTeX compilation
+*.aux
+*.log
+*.nav
+*.snm
+*.toc
+*.out
+*.pdf