From 14beb61dadf02ee5544a17cfbf57fd66373058f9 Mon Sep 17 00:00:00 2001 From: Matthias Richerzhagen Date: Wed, 9 Jul 2014 13:08:03 +0200 Subject: [PATCH 1/5] Remove license info because the files have been merged into svm.cpp again --- README.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.txt b/README.txt index 5168366..758e58d 100644 --- a/README.txt +++ b/README.txt @@ -25,10 +25,6 @@ apply to the parts of the LibSVM code, that is svm.h, svm.cpp, pisvm-train.c pisvm-predict.c and pisvm-scale.c. All of the pisvm-*.c files contain changes made to enable parallel training. -All of the svm_* files contain code extracted from the svm.cpp -file to increase readability and therefor the conditions in -COPYRIGHT-LibSVM also apply to these files. - All other source code, including the parallel LOQO solver in subdirectory loqo and the parallel SMO solver in subdirectory psmo is licensed under the terms of the GPL as given in LICENSE.txt From 72ebe08baaa18060f2c7f3d678db961e554bfdfb Mon Sep 17 00:00:00 2001 From: Matthias Richerzhagen Date: Thu, 10 Jul 2014 09:26:52 +0200 Subject: [PATCH 2/5] Improve command line argument parsing. Disallow trailing parameters that would not be parsed --- pisvm-train.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pisvm-train.cpp b/pisvm-train.cpp index 054b78d..7ba5d96 100644 --- a/pisvm-train.cpp +++ b/pisvm-train.cpp @@ -242,9 +242,9 @@ void parse_command_line(int argc, char **argv, char *input_file_name, strcpy(input_file_name, argv[i]); - if(i Date: Fri, 18 Jul 2014 11:30:30 +0200 Subject: [PATCH 3/5] Notice about what 'is_cached' mean: It does NOT mean we can access for free cause only a subset might be cached! --- psmo/psmo_solver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/psmo/psmo_solver.cpp b/psmo/psmo_solver.cpp index f874952..ed8e9e1 100644 --- a/psmo/psmo_solver.cpp +++ b/psmo/psmo_solver.cpp @@ -866,6 +866,8 @@ void Solver_Parallel_SMO::Solve(int l, const QMatrix& Q, const double *b_, // const Qfloat *Q_i = Q.get_Q_subset(work_set[i],work_set,n); if(Q.is_cached(work_set[i])) { + //Q is_cached does not mean we can access the whole subset for free: it might happen, that only + // the not_work_subset is cached and all values have to be calculated! const Qfloat *Q_i = Q.get_Q_subset(work_set[i],work_set,n); for(int j=0; j<=i; ++j) { @@ -978,6 +980,7 @@ void Solver_Parallel_SMO::Solve(int l, const QMatrix& Q, const double *b_, // First update the cached part... for(int i=0; i Date: Tue, 29 Jul 2014 11:15:27 +0200 Subject: [PATCH 4/5] fix cross validation by initializing max_idx in subproblem --- svm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svm.cpp b/svm.cpp index 9af2a66..ab68d1e 100644 --- a/svm.cpp +++ b/svm.cpp @@ -2889,7 +2889,7 @@ void svm_cross_validation(const svm_problem *prob, const svm_parameter *param, subprob.nz_idx = Malloc(int *, subprob.l); subprob.x_len = Malloc(int, subprob.l); subprob.y = Malloc(double,subprob.l); - + subprob.max_idx = prob->max_idx; k=0; for(j=0; j Date: Tue, 29 Jul 2014 11:26:59 +0200 Subject: [PATCH 5/5] Add MPI_Finalize to pisvm-predict so it does not fail --- pisvm-predict.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pisvm-predict.cpp b/pisvm-predict.cpp index 34e153c..c4a4cad 100644 --- a/pisvm-predict.cpp +++ b/pisvm-predict.cpp @@ -330,5 +330,6 @@ int main(int argc, char **argv) free(nz_x); fclose(input); fclose(output); + MPI_Finalize(); return 0; }