[Genabel-commits] r1866 - pkg/OmicABELnoMM/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Oct 28 15:23:14 CET 2014


Author: lckarssen
Date: 2014-10-28 15:23:14 +0100 (Tue, 28 Oct 2014)
New Revision: 1866

Modified:
   pkg/OmicABELnoMM/tests/test.cpp
Log:
Added USE_MPI #ifdefs to OmicABELnoMM's tests/test.cpp to enable/disable MPI support.
Note that Makefile.am needs to be adjusted as well. Will be done in a separate commit.


Modified: pkg/OmicABELnoMM/tests/test.cpp
===================================================================
--- pkg/OmicABELnoMM/tests/test.cpp	2014-10-28 13:41:30 UTC (rev 1865)
+++ pkg/OmicABELnoMM/tests/test.cpp	2014-10-28 14:23:14 UTC (rev 1866)
@@ -107,13 +107,14 @@
     struct Settings params;
 
     //!MPI
+    #ifdef USE_MPI
     int size, rank;
     MPI_Init(&argc, &argv);
     MPI_Comm_size(MPI_COMM_WORLD, &size);
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
     //printf("SIZE = %d RANK = %d\n",size,rank);
+    #endif
 
-
     omp_set_nested(false);
     omp_set_dynamic(false);
 
@@ -160,10 +161,11 @@
     params.minR2disp = 0.000001;
     params.disp_cov = true;
 
+    #ifdef USE_MPI
     params.mpi_id = rank;
     params.mpi_num_threads = size;
+    #endif
 
-
     params.r = 2;
     params.fnameOutFiles = "examples/results/normal";
     params.fnameAL = "examples/XL";
@@ -177,7 +179,9 @@
     print_output(out, gemm_gflopsPsec);
 
     //!MPI
+    #ifdef USE_MPI
     MPI_Finalize();
+    #endif
 
     // exit(0);
 



More information about the Genabel-commits mailing list