Browse code

framework with dispatcher compiling and running

Tom Sherman authored on 18/06/2018 13:49:06
Showing41 changed files

... ...
@@ -1,5 +1,5 @@
1 1
 Package: CoGAPS
2
-Version: 3.1.2
2
+Version: 3.1.3
3 3
 Date: 2018-04-24
4 4
 Title: Coordinated Gene Activity in Pattern Sets
5 5
 Author: Thomas Sherman, Wai-shing Lee, Conor Kelton, Ondrej Maxian, Jacob Carey,
... ...
@@ -2,6 +2,7 @@
2 2
 
3 3
 export(CoGAPS)
4 4
 export(CoGAPSFromFile)
5
+export(CoGapsFromCheckpoint)
5 6
 export(GWCoGAPS)
6 7
 export(GWCoGapsFromCheckpoint)
7 8
 export(binaryA)
... ...
@@ -44,7 +44,7 @@
44 44
 #' @export
45 45
 CoGAPS <- function(D, S, nFactor=7, nEquil=250, nSample=250, nOutputs=1000,
46 46
 nSnapshots=0, alphaA=0.01, alphaP=0.01, maxGibbmassA=100, maxGibbmassP=100,
47
-seed=-1, messages=TRUE, singleCellRNASeq=FALSE, whichMatrixFixed='N',
47
+seed=NA, messages=TRUE, singleCellRNASeq=FALSE, whichMatrixFixed='N',
48 48
 fixedPatterns=matrix(0), checkpointInterval=0, 
49 49
 checkpointFile="gaps_checkpoint.out", nCores=1, ...)
50 50
 {
... ...
@@ -91,18 +91,14 @@ checkpointFile="gaps_checkpoint.out", nCores=1, ...)
91 91
     thresholdEnum <- c("unique", "cut")
92 92
     
93 93
     # get seed
94
-    if (seed < 0)
94
+    if (is.na(seed))
95 95
     {
96
-        # TODO get time in milliseconds
97
-        seed <- 0
96
+        seed <- 0 # TODO get time in milliseconds
98 97
     }
99 98
 
100 99
     # run algorithm with call to C++ code
101
-    result <- cogaps_cpp(D, S, nFactor, nEquil, nEquil/10, nSample, nOutputs,
102
-        nSnapshots, alphaA, alphaP, maxGibbmassA, maxGibbmassP, seed, messages,
103
-        singleCellRNASeq, whichMatrixFixed, fixedPatterns, checkpointInterval,
104
-        checkpointFile, which(thresholdEnum==pumpThreshold), nPumpSamples,
105
-        nCores)
100
+    result <- cogaps_cpp(D, nFactor, nEquil, nOutputs, seed, alphaA, alphaP,
101
+        maxGibbmassA, maxGibbmassP, messages, singleCellRNASeq)
106 102
     
107 103
     # label matrices and return list
108 104
     patternNames <- paste('Patt', 1:nFactor, sep='')
... ...
@@ -1,16 +1,12 @@
1 1
 # Generated by using Rcpp::compileAttributes() -> do not edit by hand
2 2
 # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
3 3
 
4
-cogaps_cpp <- function(D, S, nFactor, nEquil, nEquilCool, nSample, nOutputs, nSnapshots, alphaA, alphaP, maxGibbmassA, maxGibbmassP, seed, messages, singleCellRNASeq, whichMatrixFixed, FP, checkpointInterval, cptFile, pumpThreshold, nPumpSamples, nCores) {
5
-    .Call('_CoGAPS_cogaps_cpp', PACKAGE = 'CoGAPS', D, S, nFactor, nEquil, nEquilCool, nSample, nOutputs, nSnapshots, alphaA, alphaP, maxGibbmassA, maxGibbmassP, seed, messages, singleCellRNASeq, whichMatrixFixed, FP, checkpointInterval, cptFile, pumpThreshold, nPumpSamples, nCores)
4
+cogapsFromFile_cpp <- function(D, nPatterns, maxIter, outputFrequency, seed, alphaA, alphaP, maxGibbsMassA, maxGibbsMassP, messages, singleCellRNASeq) {
5
+    .Call('_CoGAPS_cogapsFromFile_cpp', PACKAGE = 'CoGAPS', D, nPatterns, maxIter, outputFrequency, seed, alphaA, alphaP, maxGibbsMassA, maxGibbsMassP, messages, singleCellRNASeq)
6 6
 }
7 7
 
8
-cogapsFromCheckpoint_cpp <- function(D, S, nFactor, nEquil, nSample, fileName, cptFile) {
9
-    .Call('_CoGAPS_cogapsFromCheckpoint_cpp', PACKAGE = 'CoGAPS', D, S, nFactor, nEquil, nSample, fileName, cptFile)
10
-}
11
-
12
-cogapsFromFile_cpp <- function(D) {
13
-    invisible(.Call('_CoGAPS_cogapsFromFile_cpp', PACKAGE = 'CoGAPS', D))
8
+cogaps_cpp <- function(D, nPatterns, maxIter, outputFrequency, seed, alphaA, alphaP, maxGibbsMassA, maxGibbsMassP, messages, singleCellRNASeq) {
9
+    .Call('_CoGAPS_cogaps_cpp', PACKAGE = 'CoGAPS', D, nPatterns, maxIter, outputFrequency, seed, alphaA, alphaP, maxGibbsMassA, maxGibbsMassP, messages, singleCellRNASeq)
14 10
 }
15 11
 
16 12
 getBuildReport_cpp <- function() {
17 13
new file mode 100644
... ...
@@ -0,0 +1,534 @@
1
+This file contains any messages produced by compilers while
2
+running configure, to aid debugging if configure makes a mistake.
3
+
4
+It was created by CoGAPS configure 3.1.2, which was
5
+generated by GNU Autoconf 2.69.  Invocation command line was
6
+
7
+  $ ./configure 
8
+
9
+## --------- ##
10
+## Platform. ##
11
+## --------- ##
12
+
13
+hostname = MBL-D518NN2
14
+uname -m = x86_64
15
+uname -r = 4.4.0-43-Microsoft
16
+uname -s = Linux
17
+uname -v = #1-Microsoft Wed Dec 31 14:42:53 PST 2014
18
+
19
+/usr/bin/uname -p = unknown
20
+/bin/uname -X     = unknown
21
+
22
+/bin/arch              = unknown
23
+/usr/bin/arch -k       = unknown
24
+/usr/convex/getsysinfo = unknown
25
+/usr/bin/hostinfo      = unknown
26
+/bin/machine           = unknown
27
+/usr/bin/oslevel       = unknown
28
+/bin/universe          = unknown
29
+
30
+PATH: /usr/local/sbin
31
+PATH: /usr/local/bin
32
+PATH: /usr/sbin
33
+PATH: /usr/bin
34
+PATH: /sbin
35
+PATH: /bin
36
+PATH: /snap/bin
37
+
38
+
39
+## ----------- ##
40
+## Core tests. ##
41
+## ----------- ##
42
+
43
+configure:2189: checking for C++ compiler version
44
+configure:2198: ccache g++ --version >&5
45
+g++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
46
+Copyright (C) 2015 Free Software Foundation, Inc.
47
+This is free software; see the source for copying conditions.  There is NO
48
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
49
+
50
+configure:2209: $? = 0
51
+configure:2198: ccache g++ -v >&5
52
+Using built-in specs.
53
+COLLECT_GCC=/usr/bin/g++
54
+COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
55
+Target: x86_64-linux-gnu
56
+Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
57
+Thread model: posix
58
+gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 
59
+configure:2209: $? = 0
60
+configure:2198: ccache g++ -V >&5
61
+g++: error: unrecognized command line option '-V'
62
+g++: fatal error: no input files
63
+compilation terminated.
64
+configure:2209: $? = 1
65
+configure:2198: ccache g++ -qversion >&5
66
+g++: error: unrecognized command line option '-qversion'
67
+g++: fatal error: no input files
68
+compilation terminated.
69
+configure:2209: $? = 1
70
+configure:2229: checking whether the C++ compiler works
71
+configure:2251: ccache g++ -UNDEBUG -Wall -pedantic -g -O0   conftest.cpp  >&5
72
+configure:2255: $? = 0
73
+configure:2303: result: yes
74
+configure:2306: checking for C++ compiler default output file name
75
+configure:2308: result: a.out
76
+configure:2314: checking for suffix of executables
77
+configure:2321: ccache g++ -o conftest -UNDEBUG -Wall -pedantic -g -O0   conftest.cpp  >&5
78
+configure:2325: $? = 0
79
+configure:2347: result: 
80
+configure:2369: checking whether we are cross compiling
81
+configure:2377: ccache g++ -o conftest -UNDEBUG -Wall -pedantic -g -O0   conftest.cpp  >&5
82
+configure:2381: $? = 0
83
+configure:2388: ./conftest
84
+configure:2392: $? = 0
85
+configure:2407: result: no
86
+configure:2412: checking for suffix of object files
87
+configure:2434: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
88
+configure:2438: $? = 0
89
+configure:2459: result: o
90
+configure:2463: checking whether we are using the GNU C++ compiler
91
+configure:2482: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
92
+configure:2482: $? = 0
93
+configure:2491: result: yes
94
+configure:2500: checking whether ccache g++ accepts -g
95
+configure:2520: ccache g++ -c -g  conftest.cpp >&5
96
+configure:2520: $? = 0
97
+configure:2561: result: yes
98
+configure:2590: checking how to run the C++ preprocessor
99
+configure:2617: ccache g++ -E  conftest.cpp
100
+configure:2617: $? = 0
101
+configure:2631: ccache g++ -E  conftest.cpp
102
+conftest.cpp:9:28: fatal error: ac_nonexistent.h: No such file or directory
103
+compilation terminated.
104
+configure:2631: $? = 1
105
+configure: failed program was:
106
+| /* confdefs.h */
107
+| #define PACKAGE_NAME "CoGAPS"
108
+| #define PACKAGE_TARNAME "cogaps"
109
+| #define PACKAGE_VERSION "3.1.2"
110
+| #define PACKAGE_STRING "CoGAPS 3.1.2"
111
+| #define PACKAGE_BUGREPORT ""
112
+| #define PACKAGE_URL ""
113
+| /* end confdefs.h.  */
114
+| #include <ac_nonexistent.h>
115
+configure:2656: result: ccache g++ -E
116
+configure:2676: ccache g++ -E  conftest.cpp
117
+configure:2676: $? = 0
118
+configure:2690: ccache g++ -E  conftest.cpp
119
+conftest.cpp:9:28: fatal error: ac_nonexistent.h: No such file or directory
120
+compilation terminated.
121
+configure:2690: $? = 1
122
+configure: failed program was:
123
+| /* confdefs.h */
124
+| #define PACKAGE_NAME "CoGAPS"
125
+| #define PACKAGE_TARNAME "cogaps"
126
+| #define PACKAGE_VERSION "3.1.2"
127
+| #define PACKAGE_STRING "CoGAPS 3.1.2"
128
+| #define PACKAGE_BUGREPORT ""
129
+| #define PACKAGE_URL ""
130
+| /* end confdefs.h.  */
131
+| #include <ac_nonexistent.h>
132
+configure:2832: checking for C++ compiler version
133
+configure:2841: ccache g++ --version >&5
134
+g++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
135
+Copyright (C) 2015 Free Software Foundation, Inc.
136
+This is free software; see the source for copying conditions.  There is NO
137
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
138
+
139
+configure:2852: $? = 0
140
+configure:2841: ccache g++ -v >&5
141
+Using built-in specs.
142
+COLLECT_GCC=/usr/bin/g++
143
+COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
144
+Target: x86_64-linux-gnu
145
+Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
146
+Thread model: posix
147
+gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 
148
+configure:2852: $? = 0
149
+configure:2841: ccache g++ -V >&5
150
+g++: error: unrecognized command line option '-V'
151
+g++: fatal error: no input files
152
+compilation terminated.
153
+configure:2852: $? = 1
154
+configure:2841: ccache g++ -qversion >&5
155
+g++: error: unrecognized command line option '-qversion'
156
+g++: fatal error: no input files
157
+compilation terminated.
158
+configure:2852: $? = 1
159
+configure:2856: checking whether we are using the GNU C++ compiler
160
+configure:2884: result: yes
161
+configure:2893: checking whether ccache g++ accepts -g
162
+configure:2954: result: yes
163
+configure:3011: checking for C++ compiler vendor
164
+configure:3059: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
165
+conftest.cpp: In function 'int main()':
166
+conftest.cpp:15:9: error: 'thisisanerror' was not declared in this scope
167
+         thisisanerror;
168
+         ^
169
+configure:3059: $? = 1
170
+configure: failed program was:
171
+| /* confdefs.h */
172
+| #define PACKAGE_NAME "CoGAPS"
173
+| #define PACKAGE_TARNAME "cogaps"
174
+| #define PACKAGE_VERSION "3.1.2"
175
+| #define PACKAGE_STRING "CoGAPS 3.1.2"
176
+| #define PACKAGE_BUGREPORT ""
177
+| #define PACKAGE_URL ""
178
+| /* end confdefs.h.  */
179
+| 
180
+| int
181
+| main ()
182
+| {
183
+| 
184
+|       #if !(defined(__ICC) || defined(__ECC) || defined(__INTEL_COMPILER))
185
+|         thisisanerror;
186
+|       #endif
187
+| 
188
+|   ;
189
+|   return 0;
190
+| }
191
+configure:3059: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
192
+conftest.cpp: In function 'int main()':
193
+conftest.cpp:15:9: error: 'thisisanerror' was not declared in this scope
194
+         thisisanerror;
195
+         ^
196
+configure:3059: $? = 1
197
+configure: failed program was:
198
+| /* confdefs.h */
199
+| #define PACKAGE_NAME "CoGAPS"
200
+| #define PACKAGE_TARNAME "cogaps"
201
+| #define PACKAGE_VERSION "3.1.2"
202
+| #define PACKAGE_STRING "CoGAPS 3.1.2"
203
+| #define PACKAGE_BUGREPORT ""
204
+| #define PACKAGE_URL ""
205
+| /* end confdefs.h.  */
206
+| 
207
+| int
208
+| main ()
209
+| {
210
+| 
211
+|       #if !(defined(__xlc__) || defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__))
212
+|         thisisanerror;
213
+|       #endif
214
+| 
215
+|   ;
216
+|   return 0;
217
+| }
218
+configure:3059: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
219
+conftest.cpp: In function 'int main()':
220
+conftest.cpp:15:9: error: 'thisisanerror' was not declared in this scope
221
+         thisisanerror;
222
+         ^
223
+configure:3059: $? = 1
224
+configure: failed program was:
225
+| /* confdefs.h */
226
+| #define PACKAGE_NAME "CoGAPS"
227
+| #define PACKAGE_TARNAME "cogaps"
228
+| #define PACKAGE_VERSION "3.1.2"
229
+| #define PACKAGE_STRING "CoGAPS 3.1.2"
230
+| #define PACKAGE_BUGREPORT ""
231
+| #define PACKAGE_URL ""
232
+| /* end confdefs.h.  */
233
+| 
234
+| int
235
+| main ()
236
+| {
237
+| 
238
+|       #if !(defined(__PATHCC__) || defined(__PATHSCALE__))
239
+|         thisisanerror;
240
+|       #endif
241
+| 
242
+|   ;
243
+|   return 0;
244
+| }
245
+configure:3059: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
246
+conftest.cpp: In function 'int main()':
247
+conftest.cpp:15:9: error: 'thisisanerror' was not declared in this scope
248
+         thisisanerror;
249
+         ^
250
+configure:3059: $? = 1
251
+configure: failed program was:
252
+| /* confdefs.h */
253
+| #define PACKAGE_NAME "CoGAPS"
254
+| #define PACKAGE_TARNAME "cogaps"
255
+| #define PACKAGE_VERSION "3.1.2"
256
+| #define PACKAGE_STRING "CoGAPS 3.1.2"
257
+| #define PACKAGE_BUGREPORT ""
258
+| #define PACKAGE_URL ""
259
+| /* end confdefs.h.  */
260
+| 
261
+| int
262
+| main ()
263
+| {
264
+| 
265
+|       #if !(defined(__clang__))
266
+|         thisisanerror;
267
+|       #endif
268
+| 
269
+|   ;
270
+|   return 0;
271
+| }
272
+configure:3059: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
273
+conftest.cpp: In function 'int main()':
274
+conftest.cpp:15:9: error: 'thisisanerror' was not declared in this scope
275
+         thisisanerror;
276
+         ^
277
+configure:3059: $? = 1
278
+configure: failed program was:
279
+| /* confdefs.h */
280
+| #define PACKAGE_NAME "CoGAPS"
281
+| #define PACKAGE_TARNAME "cogaps"
282
+| #define PACKAGE_VERSION "3.1.2"
283
+| #define PACKAGE_STRING "CoGAPS 3.1.2"
284
+| #define PACKAGE_BUGREPORT ""
285
+| #define PACKAGE_URL ""
286
+| /* end confdefs.h.  */
287
+| 
288
+| int
289
+| main ()
290
+| {
291
+| 
292
+|       #if !(defined(_CRAYC))
293
+|         thisisanerror;
294
+|       #endif
295
+| 
296
+|   ;
297
+|   return 0;
298
+| }
299
+configure:3059: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
300
+conftest.cpp: In function 'int main()':
301
+conftest.cpp:15:9: error: 'thisisanerror' was not declared in this scope
302
+         thisisanerror;
303
+         ^
304
+configure:3059: $? = 1
305
+configure: failed program was:
306
+| /* confdefs.h */
307
+| #define PACKAGE_NAME "CoGAPS"
308
+| #define PACKAGE_TARNAME "cogaps"
309
+| #define PACKAGE_VERSION "3.1.2"
310
+| #define PACKAGE_STRING "CoGAPS 3.1.2"
311
+| #define PACKAGE_BUGREPORT ""
312
+| #define PACKAGE_URL ""
313
+| /* end confdefs.h.  */
314
+| 
315
+| int
316
+| main ()
317
+| {
318
+| 
319
+|       #if !(defined(__FUJITSU))
320
+|         thisisanerror;
321
+|       #endif
322
+| 
323
+|   ;
324
+|   return 0;
325
+| }
326
+configure:3059: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
327
+conftest.cpp:14:38: error: operator "defined" requires an identifier
328
+       #if !(defined(SDCC) || defined())
329
+                                      ^
330
+conftest.cpp: In function 'int main()':
331
+conftest.cpp:15:9: error: 'thisisanerror' was not declared in this scope
332
+         thisisanerror;
333
+         ^
334
+configure:3059: $? = 1
335
+configure: failed program was:
336
+| /* confdefs.h */
337
+| #define PACKAGE_NAME "CoGAPS"
338
+| #define PACKAGE_TARNAME "cogaps"
339
+| #define PACKAGE_VERSION "3.1.2"
340
+| #define PACKAGE_STRING "CoGAPS 3.1.2"
341
+| #define PACKAGE_BUGREPORT ""
342
+| #define PACKAGE_URL ""
343
+| /* end confdefs.h.  */
344
+| 
345
+| int
346
+| main ()
347
+| {
348
+| 
349
+|       #if !(defined(SDCC) || defined())
350
+|         thisisanerror;
351
+|       #endif
352
+| 
353
+|   ;
354
+|   return 0;
355
+| }
356
+configure:3059: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
357
+conftest.cpp: In function 'int main()':
358
+conftest.cpp:15:9: error: 'thisisanerror' was not declared in this scope
359
+         thisisanerror;
360
+         ^
361
+configure:3059: $? = 1
362
+configure: failed program was:
363
+| /* confdefs.h */
364
+| #define PACKAGE_NAME "CoGAPS"
365
+| #define PACKAGE_TARNAME "cogaps"
366
+| #define PACKAGE_VERSION "3.1.2"
367
+| #define PACKAGE_STRING "CoGAPS 3.1.2"
368
+| #define PACKAGE_BUGREPORT ""
369
+| #define PACKAGE_URL ""
370
+| /* end confdefs.h.  */
371
+| 
372
+| int
373
+| main ()
374
+| {
375
+| 
376
+|       #if !(defined(__SDCC))
377
+|         thisisanerror;
378
+|       #endif
379
+| 
380
+|   ;
381
+|   return 0;
382
+| }
383
+configure:3059: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  conftest.cpp >&5
384
+configure:3059: $? = 0
385
+configure:3067: result: gnu
386
+configure:3070: checking for a sed that does not truncate output
387
+configure:3134: result: /bin/sed
388
+configure:3141: checking for C++ compiler version
389
+configure:3363: ccache g++ -o conftest -UNDEBUG -Wall -pedantic -g -O0   conftest.cpp  >&5
390
+configure:3363: $? = 0
391
+configure:3363: ./conftest
392
+configure:3363: $? = 0
393
+configure:3372: ccache g++ -o conftest -UNDEBUG -Wall -pedantic -g -O0   conftest.cpp  >&5
394
+configure:3372: $? = 0
395
+configure:3372: ./conftest
396
+configure:3372: $? = 0
397
+configure:3381: ccache g++ -o conftest -UNDEBUG -Wall -pedantic -g -O0   conftest.cpp  >&5
398
+configure:3381: $? = 0
399
+configure:3381: ./conftest
400
+configure:3381: $? = 0
401
+configure:4098: result: 5.4.0
402
+configure:4103: checking for OpenMP flag of C++ compiler
403
+configure:4148: ccache g++ -o conftest -UNDEBUG -Wall -pedantic -g -O0 -fopenmp   conftest.cpp  >&5
404
+configure:4148: $? = 0
405
+configure:4157: result: -fopenmp
406
+configure:4365: checking whether C++ compiler accepts -msse4.2
407
+configure:4384: ccache g++ -c -UNDEBUG -Wall -pedantic -g -O0  -msse4.2  conftest.cpp >&5
408
+configure:4384: $? = 0
409
+configure:4392: result: yes
410
+configure:4639: creating ./config.status
411
+
412
+## ---------------------- ##
413
+## Running config.status. ##
414
+## ---------------------- ##
415
+
416
+This file was extended by CoGAPS config.status 3.1.2, which was
417
+generated by GNU Autoconf 2.69.  Invocation command line was
418
+
419
+  CONFIG_FILES    = 
420
+  CONFIG_HEADERS  = 
421
+  CONFIG_LINKS    = 
422
+  CONFIG_COMMANDS = 
423
+  $ ./config.status 
424
+
425
+on MBL-D518NN2
426
+
427
+config.status:725: creating src/Makevars
428
+
429
+## ---------------- ##
430
+## Cache variables. ##
431
+## ---------------- ##
432
+
433
+ac_cv_cxx_compiler_gnu=yes
434
+ac_cv_env_CCC_set=
435
+ac_cv_env_CCC_value=
436
+ac_cv_env_CPPFLAGS_set=
437
+ac_cv_env_CPPFLAGS_value=
438
+ac_cv_env_CXXCPP_set=
439
+ac_cv_env_CXXCPP_value=
440
+ac_cv_env_CXXFLAGS_set=set
441
+ac_cv_env_CXXFLAGS_value='-UNDEBUG -Wall -pedantic -g -O0'
442
+ac_cv_env_CXX_set=
443
+ac_cv_env_CXX_value=
444
+ac_cv_env_LDFLAGS_set=
445
+ac_cv_env_LDFLAGS_value=
446
+ac_cv_env_LIBS_set=
447
+ac_cv_env_LIBS_value=
448
+ac_cv_env_build_alias_set=
449
+ac_cv_env_build_alias_value=
450
+ac_cv_env_host_alias_set=
451
+ac_cv_env_host_alias_value=
452
+ac_cv_env_target_alias_set=
453
+ac_cv_env_target_alias_value=
454
+ac_cv_objext=o
455
+ac_cv_path_SED=/bin/sed
456
+ac_cv_prog_CXXCPP='ccache g++ -E'
457
+ac_cv_prog_cxx_g=yes
458
+ax_cv_check_cxxflags___msse4_2=yes
459
+ax_cv_cxx_compiler_vendor=gnu
460
+ax_cv_cxx_compiler_version=5.4.0
461
+ax_cv_cxx_openmp=-fopenmp
462
+
463
+## ----------------- ##
464
+## Output variables. ##
465
+## ----------------- ##
466
+
467
+CPPFLAGS=''
468
+CXX='ccache g++'
469
+CXXCPP='ccache g++ -E'
470
+CXXFLAGS='-UNDEBUG -Wall -pedantic -g -O0'
471
+DEFS='-DPACKAGE_NAME=\"CoGAPS\" -DPACKAGE_TARNAME=\"cogaps\" -DPACKAGE_VERSION=\"3.1.2\" -DPACKAGE_STRING=\"CoGAPS\ 3.1.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_OPENMP=1'
472
+ECHO_C=''
473
+ECHO_N='-n'
474
+ECHO_T=''
475
+EXEEXT=''
476
+GAPS_CPP_FLAGS=' -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -D__GAPS_R_BUILD__ '
477
+GAPS_CXX_FLAGS=' -fopenmp  -msse4.2 '
478
+GAPS_LIBS=' -fopenmp '
479
+LDFLAGS=''
480
+LIBOBJS=''
481
+LIBS=''
482
+LTLIBOBJS=''
483
+OBJEXT='o'
484
+PACKAGE_BUGREPORT=''
485
+PACKAGE_NAME='CoGAPS'
486
+PACKAGE_STRING='CoGAPS 3.1.2'
487
+PACKAGE_TARNAME='cogaps'
488
+PACKAGE_URL=''
489
+PACKAGE_VERSION='3.1.2'
490
+PATH_SEPARATOR=':'
491
+SED='/bin/sed'
492
+SHELL='/bin/bash'
493
+ac_ct_CXX=''
494
+bindir='${exec_prefix}/bin'
495
+build_alias=''
496
+datadir='${datarootdir}'
497
+datarootdir='${prefix}/share'
498
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
499
+dvidir='${docdir}'
500
+exec_prefix='${prefix}'
501
+host_alias=''
502
+htmldir='${docdir}'
503
+includedir='${prefix}/include'
504
+infodir='${datarootdir}/info'
505
+libdir='${exec_prefix}/lib'
506
+libexecdir='${exec_prefix}/libexec'
507
+localedir='${datarootdir}/locale'
508
+localstatedir='${prefix}/var'
509
+mandir='${datarootdir}/man'
510
+oldincludedir='/usr/include'
511
+pdfdir='${docdir}'
512
+prefix='/usr/local'
513
+program_transform_name='s,x,x,'
514
+psdir='${docdir}'
515
+runstatedir='${localstatedir}/run'
516
+sbindir='${exec_prefix}/sbin'
517
+sharedstatedir='${prefix}/com'
518
+sysconfdir='${prefix}/etc'
519
+target_alias=''
520
+
521
+## ----------- ##
522
+## confdefs.h. ##
523
+## ----------- ##
524
+
525
+/* confdefs.h */
526
+#define PACKAGE_NAME "CoGAPS"
527
+#define PACKAGE_TARNAME "cogaps"
528
+#define PACKAGE_VERSION "3.1.2"
529
+#define PACKAGE_STRING "CoGAPS 3.1.2"
530
+#define PACKAGE_BUGREPORT ""
531
+#define PACKAGE_URL ""
532
+#define HAVE_OPENMP 1
533
+
534
+configure: exit 0
0 535
new file mode 100644
... ...
@@ -0,0 +1,892 @@
1
+#! /bin/bash
2
+# Generated by configure.
3
+# Run this file to recreate the current configuration.
4
+# Compiler output produced by configure, useful for debugging
5
+# configure, is in config.log if it exists.
6
+
7
+debug=false
8
+ac_cs_recheck=false
9
+ac_cs_silent=false
10
+
11
+SHELL=${CONFIG_SHELL-/bin/bash}
12
+export SHELL
13
+## -------------------- ##
14
+## M4sh Initialization. ##
15
+## -------------------- ##
16
+
17
+# Be more Bourne compatible
18
+DUALCASE=1; export DUALCASE # for MKS sh
19
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20
+  emulate sh
21
+  NULLCMD=:
22
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23
+  # is contrary to our usage.  Disable this feature.
24
+  alias -g '${1+"$@"}'='"$@"'
25
+  setopt NO_GLOB_SUBST
26
+else
27
+  case `(set -o) 2>/dev/null` in #(
28
+  *posix*) :
29
+    set -o posix ;; #(
30
+  *) :
31
+     ;;
32
+esac
33
+fi
34
+
35
+
36
+as_nl='
37
+'
38
+export as_nl
39
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
40
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43
+# Prefer a ksh shell builtin over an external printf program on Solaris,
44
+# but without wasting forks for bash or zsh.
45
+if test -z "$BASH_VERSION$ZSH_VERSION" \
46
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47
+  as_echo='print -r --'
48
+  as_echo_n='print -rn --'
49
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50
+  as_echo='printf %s\n'
51
+  as_echo_n='printf %s'
52
+else
53
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55
+    as_echo_n='/usr/ucb/echo -n'
56
+  else
57
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58
+    as_echo_n_body='eval
59
+      arg=$1;
60
+      case $arg in #(
61
+      *"$as_nl"*)
62
+	expr "X$arg" : "X\\(.*\\)$as_nl";
63
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64
+      esac;
65
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66
+    '
67
+    export as_echo_n_body
68
+    as_echo_n='sh -c $as_echo_n_body as_echo'
69
+  fi
70
+  export as_echo_body
71
+  as_echo='sh -c $as_echo_body as_echo'
72
+fi
73
+
74
+# The user is always right.
75
+if test "${PATH_SEPARATOR+set}" != set; then
76
+  PATH_SEPARATOR=:
77
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79
+      PATH_SEPARATOR=';'
80
+  }
81
+fi
82
+
83
+
84
+# IFS
85
+# We need space, tab and new line, in precisely that order.  Quoting is
86
+# there to prevent editors from complaining about space-tab.
87
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88
+# splitting by setting IFS to empty value.)
89
+IFS=" ""	$as_nl"
90
+
91
+# Find who we are.  Look in the path if we contain no directory separator.
92
+as_myself=
93
+case $0 in #((
94
+  *[\\/]* ) as_myself=$0 ;;
95
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96
+for as_dir in $PATH
97
+do
98
+  IFS=$as_save_IFS
99
+  test -z "$as_dir" && as_dir=.
100
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101
+  done
102
+IFS=$as_save_IFS
103
+
104
+     ;;
105
+esac
106
+# We did not find ourselves, most probably we were run as `sh COMMAND'
107
+# in which case we are not to be found in the path.
108
+if test "x$as_myself" = x; then
109
+  as_myself=$0
110
+fi
111
+if test ! -f "$as_myself"; then
112
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113
+  exit 1
114
+fi
115
+
116
+# Unset variables that we do not need and which cause bugs (e.g. in
117
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118
+# suppresses any "Segmentation fault" message there.  '((' could
119
+# trigger a bug in pdksh 5.2.14.
120
+for as_var in BASH_ENV ENV MAIL MAILPATH
121
+do eval test x\${$as_var+set} = xset \
122
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123
+done
124
+PS1='$ '
125
+PS2='> '
126
+PS4='+ '
127
+
128
+# NLS nuisances.
129
+LC_ALL=C
130
+export LC_ALL
131
+LANGUAGE=C
132
+export LANGUAGE
133
+
134
+# CDPATH.
135
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
+
137
+
138
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
139
+# ----------------------------------------
140
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
141
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
142
+# script with STATUS, using 1 if that was 0.
143
+as_fn_error ()
144
+{
145
+  as_status=$1; test $as_status -eq 0 && as_status=1
146
+  if test "$4"; then
147
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
148
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
149
+  fi
150
+  $as_echo "$as_me: error: $2" >&2
151
+  as_fn_exit $as_status
152
+} # as_fn_error
153
+
154
+
155
+# as_fn_set_status STATUS
156
+# -----------------------
157
+# Set $? to STATUS, without forking.
158
+as_fn_set_status ()
159
+{
160
+  return $1
161
+} # as_fn_set_status
162
+
163
+# as_fn_exit STATUS
164
+# -----------------
165
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
166
+as_fn_exit ()
167
+{
168
+  set +e
169
+  as_fn_set_status $1
170
+  exit $1
171
+} # as_fn_exit
172
+
173
+# as_fn_unset VAR
174
+# ---------------
175
+# Portably unset VAR.
176
+as_fn_unset ()
177
+{
178
+  { eval $1=; unset $1;}
179
+}
180
+as_unset=as_fn_unset
181
+# as_fn_append VAR VALUE
182
+# ----------------------
183
+# Append the text in VALUE to the end of the definition contained in VAR. Take
184
+# advantage of any shell optimizations that allow amortized linear growth over
185
+# repeated appends, instead of the typical quadratic growth present in naive
186
+# implementations.
187
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
188
+  eval 'as_fn_append ()
189
+  {
190
+    eval $1+=\$2
191
+  }'
192
+else
193
+  as_fn_append ()
194
+  {
195
+    eval $1=\$$1\$2
196
+  }
197
+fi # as_fn_append
198
+
199
+# as_fn_arith ARG...
200
+# ------------------
201
+# Perform arithmetic evaluation on the ARGs, and store the result in the
202
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
203
+# must be portable across $(()) and expr.
204
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
205
+  eval 'as_fn_arith ()
206
+  {
207
+    as_val=$(( $* ))
208
+  }'
209
+else
210
+  as_fn_arith ()
211
+  {
212
+    as_val=`expr "$@" || test $? -eq 1`
213
+  }
214
+fi # as_fn_arith
215
+
216
+
217
+if expr a : '\(a\)' >/dev/null 2>&1 &&
218
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
219
+  as_expr=expr
220
+else
221
+  as_expr=false
222
+fi
223
+
224
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
225
+  as_basename=basename
226
+else
227
+  as_basename=false
228
+fi
229
+
230
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
231
+  as_dirname=dirname
232
+else
233
+  as_dirname=false
234
+fi
235
+
236
+as_me=`$as_basename -- "$0" ||
237
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
238
+	 X"$0" : 'X\(//\)$' \| \
239
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
240
+$as_echo X/"$0" |
241
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
242
+	    s//\1/
243
+	    q
244
+	  }
245
+	  /^X\/\(\/\/\)$/{
246
+	    s//\1/
247
+	    q
248
+	  }
249
+	  /^X\/\(\/\).*/{
250
+	    s//\1/
251
+	    q
252
+	  }
253
+	  s/.*/./; q'`
254
+
255
+# Avoid depending upon Character Ranges.
256
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
257
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
258
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
259
+as_cr_digits='0123456789'
260
+as_cr_alnum=$as_cr_Letters$as_cr_digits
261
+
262
+ECHO_C= ECHO_N= ECHO_T=
263
+case `echo -n x` in #(((((
264
+-n*)
265
+  case `echo 'xy\c'` in
266
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
267
+  xy)  ECHO_C='\c';;
268
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
269
+       ECHO_T='	';;
270
+  esac;;
271
+*)
272
+  ECHO_N='-n';;
273
+esac
274
+
275
+rm -f conf$$ conf$$.exe conf$$.file
276
+if test -d conf$$.dir; then
277
+  rm -f conf$$.dir/conf$$.file
278
+else
279
+  rm -f conf$$.dir
280
+  mkdir conf$$.dir 2>/dev/null
281
+fi
282
+if (echo >conf$$.file) 2>/dev/null; then
283
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
284
+    as_ln_s='ln -s'
285
+    # ... but there are two gotchas:
286
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
287
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
288
+    # In both cases, we have to default to `cp -pR'.
289
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
290
+      as_ln_s='cp -pR'
291
+  elif ln conf$$.file conf$$ 2>/dev/null; then
292
+    as_ln_s=ln
293
+  else
294
+    as_ln_s='cp -pR'
295
+  fi
296
+else
297
+  as_ln_s='cp -pR'
298
+fi
299
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
300
+rmdir conf$$.dir 2>/dev/null
301
+
302
+
303
+# as_fn_mkdir_p
304
+# -------------
305
+# Create "$as_dir" as a directory, including parents if necessary.
306
+as_fn_mkdir_p ()
307
+{
308
+
309
+  case $as_dir in #(
310
+  -*) as_dir=./$as_dir;;
311
+  esac
312
+  test -d "$as_dir" || eval $as_mkdir_p || {
313
+    as_dirs=
314
+    while :; do
315
+      case $as_dir in #(
316
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
317
+      *) as_qdir=$as_dir;;
318
+      esac
319
+      as_dirs="'$as_qdir' $as_dirs"
320
+      as_dir=`$as_dirname -- "$as_dir" ||
321
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
322
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
323
+	 X"$as_dir" : 'X\(//\)$' \| \
324
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
325
+$as_echo X"$as_dir" |
326
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
327
+	    s//\1/
328
+	    q
329
+	  }
330
+	  /^X\(\/\/\)[^/].*/{
331
+	    s//\1/
332
+	    q
333
+	  }
334
+	  /^X\(\/\/\)$/{
335
+	    s//\1/
336
+	    q
337
+	  }
338
+	  /^X\(\/\).*/{
339
+	    s//\1/
340
+	    q
341
+	  }
342
+	  s/.*/./; q'`
343
+      test -d "$as_dir" && break
344
+    done
345
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
346
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
347
+
348
+
349
+} # as_fn_mkdir_p
350
+if mkdir -p . 2>/dev/null; then
351
+  as_mkdir_p='mkdir -p "$as_dir"'
352
+else
353
+  test -d ./-p && rmdir ./-p
354
+  as_mkdir_p=false
355
+fi
356
+
357
+
358
+# as_fn_executable_p FILE
359
+# -----------------------
360
+# Test if FILE is an executable regular file.
361
+as_fn_executable_p ()
362
+{
363
+  test -f "$1" && test -x "$1"
364
+} # as_fn_executable_p
365
+as_test_x='test -x'
366
+as_executable_p=as_fn_executable_p
367
+
368
+# Sed expression to map a string onto a valid CPP name.
369
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
370
+
371
+# Sed expression to map a string onto a valid variable name.
372
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
373
+
374
+
375
+exec 6>&1
376
+## ----------------------------------- ##
377
+## Main body of $CONFIG_STATUS script. ##
378
+## ----------------------------------- ##
379
+# Save the log message, to keep $0 and so on meaningful, and to
380
+# report actual input values of CONFIG_FILES etc. instead of their
381
+# values after options handling.
382
+ac_log="
383
+This file was extended by CoGAPS $as_me 3.1.2, which was
384
+generated by GNU Autoconf 2.69.  Invocation command line was
385
+
386
+  CONFIG_FILES    = $CONFIG_FILES
387
+  CONFIG_HEADERS  = $CONFIG_HEADERS
388
+  CONFIG_LINKS    = $CONFIG_LINKS
389
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
390
+  $ $0 $@
391
+
392
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
393
+"
394
+
395
+# Files that config.status was made for.
396
+config_files=" src/Makevars"
397
+
398
+ac_cs_usage="\
399
+\`$as_me' instantiates files and other configuration actions
400
+from templates according to the current configuration.  Unless the files
401
+and actions are specified as TAGs, all are instantiated by default.
402
+
403
+Usage: $0 [OPTION]... [TAG]...
404
+
405
+  -h, --help       print this help, then exit
406
+  -V, --version    print version number and configuration settings, then exit
407
+      --config     print configuration, then exit
408
+  -q, --quiet, --silent
409
+                   do not print progress messages
410
+  -d, --debug      don't remove temporary files
411
+      --recheck    update $as_me by reconfiguring in the same conditions
412
+      --file=FILE[:TEMPLATE]
413
+                   instantiate the configuration file FILE
414
+
415
+Configuration files:
416
+$config_files
417
+
418
+Report bugs to the package provider."
419
+
420
+ac_cs_config="'CXXFLAGS=-UNDEBUG -Wall -pedantic -g -O0'"
421
+ac_cs_version="\
422
+CoGAPS config.status 3.1.2
423
+configured by ./configure, generated by GNU Autoconf 2.69,
424
+  with options \"$ac_cs_config\"
425
+
426
+Copyright (C) 2012 Free Software Foundation, Inc.
427
+This config.status script is free software; the Free Software Foundation
428
+gives unlimited permission to copy, distribute and modify it."
429
+
430
+ac_pwd='/mnt/c/Users/tsherma4/Documents/CoGAPS/Repo'
431
+srcdir='.'
432
+test -n "$AWK" || AWK=awk
433
+# The default lists apply if the user does not specify any file.
434
+ac_need_defaults=:
435
+while test $# != 0
436
+do
437
+  case $1 in
438
+  --*=?*)
439
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
440
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
441
+    ac_shift=:
442
+    ;;
443
+  --*=)
444
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
445
+    ac_optarg=
446
+    ac_shift=:
447
+    ;;
448
+  *)
449
+    ac_option=$1
450
+    ac_optarg=$2
451
+    ac_shift=shift
452
+    ;;
453
+  esac
454
+
455
+  case $ac_option in
456
+  # Handling of the options.
457
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
458
+    ac_cs_recheck=: ;;
459
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
460
+    $as_echo "$ac_cs_version"; exit ;;
461
+  --config | --confi | --conf | --con | --co | --c )
462
+    $as_echo "$ac_cs_config"; exit ;;
463
+  --debug | --debu | --deb | --de | --d | -d )
464
+    debug=: ;;
465
+  --file | --fil | --fi | --f )
466
+    $ac_shift
467
+    case $ac_optarg in
468
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
469
+    '') as_fn_error $? "missing file argument" ;;
470
+    esac
471
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
472
+    ac_need_defaults=false;;
473
+  --he | --h |  --help | --hel | -h )
474
+    $as_echo "$ac_cs_usage"; exit ;;
475
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
476
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
477
+    ac_cs_silent=: ;;
478
+
479
+  # This is an error.
480
+  -*) as_fn_error $? "unrecognized option: \`$1'
481
+Try \`$0 --help' for more information." ;;
482
+
483
+  *) as_fn_append ac_config_targets " $1"
484
+     ac_need_defaults=false ;;
485
+
486
+  esac
487
+  shift
488
+done
489
+
490
+ac_configure_extra_args=
491
+
492
+if $ac_cs_silent; then
493
+  exec 6>/dev/null
494
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
495
+fi
496
+
497
+if $ac_cs_recheck; then
498
+  set X /bin/bash './configure'  'CXXFLAGS=-UNDEBUG -Wall -pedantic -g -O0' $ac_configure_extra_args --no-create --no-recursion
499
+  shift
500
+  $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
501
+  CONFIG_SHELL='/bin/bash'
502
+  export CONFIG_SHELL
503
+  exec "$@"
504
+fi
505
+
506
+exec 5>>config.log
507
+{
508
+  echo
509
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
510
+## Running $as_me. ##
511
+_ASBOX
512
+  $as_echo "$ac_log"
513
+} >&5
514
+
515
+
516
+# Handling of arguments.
517
+for ac_config_target in $ac_config_targets
518
+do
519
+  case $ac_config_target in
520
+    "src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;;
521
+
522
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
523
+  esac
524
+done
525
+
526
+
527
+# If the user did not use the arguments to specify the items to instantiate,
528
+# then the envvar interface is used.  Set only those that are not.
529
+# We use the long form for the default assignment because of an extremely
530
+# bizarre bug on SunOS 4.1.3.
531
+if $ac_need_defaults; then
532
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
533
+fi
534
+
535
+# Have a temporary directory for convenience.  Make it in the build tree
536
+# simply because there is no reason against having it here, and in addition,
537
+# creating and moving files from /tmp can sometimes cause problems.
538
+# Hook for its removal unless debugging.
539
+# Note that there is a small window in which the directory will not be cleaned:
540
+# after its creation but before its name has been assigned to `$tmp'.
541
+$debug ||
542
+{
543
+  tmp= ac_tmp=
544
+  trap 'exit_status=$?
545
+  : "${ac_tmp:=$tmp}"
546
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
547
+' 0
548
+  trap 'as_fn_exit 1' 1 2 13 15
549
+}
550
+# Create a (secure) tmp directory for tmp files.
551
+
552
+{
553
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
554
+  test -d "$tmp"
555
+}  ||
556
+{
557
+  tmp=./conf$$-$RANDOM
558
+  (umask 077 && mkdir "$tmp")
559
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
560
+ac_tmp=$tmp
561
+
562
+# Set up the scripts for CONFIG_FILES section.
563
+# No need to generate them if there are no CONFIG_FILES.
564
+# This happens for instance with `./config.status config.h'.
565
+if test -n "$CONFIG_FILES"; then
566
+
567
+
568
+ac_cr=`echo X | tr X '\015'`
569
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
570
+# But we know of no other shell where ac_cr would be empty at this
571
+# point, so we can use a bashism as a fallback.
572
+if test "x$ac_cr" = x; then
573
+  eval ac_cr=\$\'\\r\'
574
+fi
575
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
576
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
577
+  ac_cs_awk_cr='\\r'
578
+else
579
+  ac_cs_awk_cr=$ac_cr
580
+fi
581
+
582
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
583
+cat >>"$ac_tmp/subs1.awk" <<\_ACAWK &&
584
+S["LTLIBOBJS"]=""
585
+S["LIBOBJS"]=""
586
+S["GAPS_LIBS"]=" -fopenmp "
587
+S["GAPS_CXX_FLAGS"]=" -fopenmp  -msse4.2 "
588
+S["GAPS_CPP_FLAGS"]=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -D__GAPS_R_BUILD__ "
589
+S["SED"]="/bin/sed"
590
+S["CXXCPP"]="ccache g++ -E"
591
+S["OBJEXT"]="o"
592
+S["EXEEXT"]=""
593
+S["ac_ct_CXX"]=""
594
+S["CPPFLAGS"]=""
595
+S["LDFLAGS"]=""
596
+S["CXXFLAGS"]="-UNDEBUG -Wall -pedantic -g -O0"
597
+S["CXX"]="ccache g++"
598
+S["target_alias"]=""
599
+S["host_alias"]=""
600
+S["build_alias"]=""
601
+S["LIBS"]=""
602
+S["ECHO_T"]=""
603
+S["ECHO_N"]="-n"
604
+S["ECHO_C"]=""
605
+S["DEFS"]="-DPACKAGE_NAME=\\\"CoGAPS\\\" -DPACKAGE_TARNAME=\\\"cogaps\\\" -DPACKAGE_VERSION=\\\"3.1.2\\\" -DPACKAGE_STRING=\\\"CoGAPS\\ 3.1.2\\\" -DPACKAGE_BUGREPORT=\\\"\\\" -DPAC"\
606
+"KAGE_URL=\\\"\\\" -DHAVE_OPENMP=1"
607
+S["mandir"]="${datarootdir}/man"
608
+S["localedir"]="${datarootdir}/locale"
609
+S["libdir"]="${exec_prefix}/lib"
610
+S["psdir"]="${docdir}"
611
+S["pdfdir"]="${docdir}"
612
+S["dvidir"]="${docdir}"
613
+S["htmldir"]="${docdir}"
614
+S["infodir"]="${datarootdir}/info"
615
+S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}"
616
+S["oldincludedir"]="/usr/include"
617
+S["includedir"]="${prefix}/include"
618
+S["runstatedir"]="${localstatedir}/run"
619
+S["localstatedir"]="${prefix}/var"
620
+S["sharedstatedir"]="${prefix}/com"
621
+S["sysconfdir"]="${prefix}/etc"
622
+S["datadir"]="${datarootdir}"
623
+S["datarootdir"]="${prefix}/share"
624
+S["libexecdir"]="${exec_prefix}/libexec"
625
+S["sbindir"]="${exec_prefix}/sbin"
626
+S["bindir"]="${exec_prefix}/bin"
627
+S["program_transform_name"]="s,x,x,"
628
+S["prefix"]="/usr/local"
629
+S["exec_prefix"]="${prefix}"
630
+S["PACKAGE_URL"]=""
631
+S["PACKAGE_BUGREPORT"]=""
632
+S["PACKAGE_STRING"]="CoGAPS 3.1.2"
633
+S["PACKAGE_VERSION"]="3.1.2"
634
+S["PACKAGE_TARNAME"]="cogaps"
635
+S["PACKAGE_NAME"]="CoGAPS"
636
+S["PATH_SEPARATOR"]=":"
637
+S["SHELL"]="/bin/bash"
638
+_ACAWK
639
+cat >>"$ac_tmp/subs1.awk" <<_ACAWK &&
640
+  for (key in S) S_is_set[key] = 1
641
+  FS = ""
642
+
643
+}
644
+{
645
+  line = $ 0
646
+  nfields = split(line, field, "@")
647
+  substed = 0
648
+  len = length(field[1])
649
+  for (i = 2; i < nfields; i++) {
650
+    key = field[i]
651
+    keylen = length(key)
652
+    if (S_is_set[key]) {
653
+      value = S[key]
654
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
655
+      len += length(value) + length(field[++i])
656
+      substed = 1
657
+    } else
658
+      len += 1 + keylen
659
+  }
660
+
661
+  print line
662
+}
663
+
664
+_ACAWK
665
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
666
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
667
+else
668
+  cat
669
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
670
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
671
+fi # test -n "$CONFIG_FILES"
672
+
673
+
674
+eval set X "  :F $CONFIG_FILES      "
675
+shift
676
+for ac_tag
677
+do
678
+  case $ac_tag in
679
+  :[FHLC]) ac_mode=$ac_tag; continue;;
680
+  esac
681
+  case $ac_mode$ac_tag in
682
+  :[FHL]*:*);;
683
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
684
+  :[FH]-) ac_tag=-:-;;
685
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
686
+  esac
687
+  ac_save_IFS=$IFS
688
+  IFS=:
689
+  set x $ac_tag
690
+  IFS=$ac_save_IFS
691
+  shift
692
+  ac_file=$1
693
+  shift
694
+
695
+  case $ac_mode in
696
+  :L) ac_source=$1;;
697
+  :[FH])
698
+    ac_file_inputs=
699
+    for ac_f
700
+    do
701
+      case $ac_f in
702
+      -) ac_f="$ac_tmp/stdin";;
703
+      *) # Look for the file first in the build tree, then in the source tree
704
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
705
+	 # because $ac_f cannot contain `:'.
706
+	 test -f "$ac_f" ||
707
+	   case $ac_f in
708
+	   [\\/$]*) false;;
709
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
710
+	   esac ||
711
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
712
+      esac
713
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
714
+      as_fn_append ac_file_inputs " '$ac_f'"
715
+    done
716
+
717
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
718
+    # use $as_me), people would be surprised to read:
719
+    #    /* config.h.  Generated by config.status.  */
720
+    configure_input='Generated from '`
721
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
722
+	`' by configure.'
723
+    if test x"$ac_file" != x-; then
724
+      configure_input="$ac_file.  $configure_input"
725
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
726
+$as_echo "$as_me: creating $ac_file" >&6;}
727
+    fi
728
+    # Neutralize special characters interpreted by sed in replacement strings.
729
+    case $configure_input in #(
730
+    *\&* | *\|* | *\\* )
731
+       ac_sed_conf_input=`$as_echo "$configure_input" |
732
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
733
+    *) ac_sed_conf_input=$configure_input;;
734
+    esac
735
+
736
+    case $ac_tag in
737
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
738
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
739
+    esac
740
+    ;;
741
+  esac
742
+
743
+  ac_dir=`$as_dirname -- "$ac_file" ||
744
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
745
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
746
+	 X"$ac_file" : 'X\(//\)$' \| \
747
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
748
+$as_echo X"$ac_file" |
749
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
750
+	    s//\1/
751
+	    q
752
+	  }
753
+	  /^X\(\/\/\)[^/].*/{
754
+	    s//\1/
755
+	    q
756
+	  }
757
+	  /^X\(\/\/\)$/{
758
+	    s//\1/
759
+	    q
760
+	  }
761
+	  /^X\(\/\).*/{
762
+	    s//\1/
763
+	    q
764
+	  }
765
+	  s/.*/./; q'`
766
+  as_dir="$ac_dir"; as_fn_mkdir_p
767
+  ac_builddir=.
768
+
769
+case "$ac_dir" in
770
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
771
+*)
772
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
773
+  # A ".." for each directory in $ac_dir_suffix.
774
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
775
+  case $ac_top_builddir_sub in
776
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
777
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
778
+  esac ;;
779
+esac
780
+ac_abs_top_builddir=$ac_pwd
781
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
782
+# for backward compatibility:
783
+ac_top_builddir=$ac_top_build_prefix
784
+
785
+case $srcdir in
786
+  .)  # We are building in place.
787
+    ac_srcdir=.
788
+    ac_top_srcdir=$ac_top_builddir_sub
789
+    ac_abs_top_srcdir=$ac_pwd ;;
790
+  [\\/]* | ?:[\\/]* )  # Absolute name.
791
+    ac_srcdir=$srcdir$ac_dir_suffix;
792
+    ac_top_srcdir=$srcdir
793
+    ac_abs_top_srcdir=$srcdir ;;
794
+  *) # Relative name.
795
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
796
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
797
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
798
+esac
799
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
800
+
801
+
802
+  case $ac_mode in
803
+  :F)
804
+  #
805
+  # CONFIG_FILE
806
+  #
807
+
808
+# If the template does not know about datarootdir, expand it.
809
+# FIXME: This hack should be removed a few years after 2.60.
810
+ac_datarootdir_hack=; ac_datarootdir_seen=
811
+ac_sed_dataroot='
812
+/datarootdir/ {
813
+  p
814
+  q
815
+}
816
+/@datadir@/p
817
+/@docdir@/p
818
+/@infodir@/p
819
+/@localedir@/p
820
+/@mandir@/p'
821
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
822
+*datarootdir*) ac_datarootdir_seen=yes;;
823
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
824
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
825
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
826
+  ac_datarootdir_hack='
827
+  s&@datadir@&${datarootdir}&g
828
+  s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g
829
+  s&@infodir@&${datarootdir}/info&g
830
+  s&@localedir@&${datarootdir}/locale&g
831
+  s&@mandir@&${datarootdir}/man&g
832
+  s&\${datarootdir}&${prefix}/share&g' ;;
833
+esac
834
+ac_sed_extra="/^[	 ]*VPATH[	 ]*=[	 ]*/{
835
+h
836
+s///
837
+s/^/:/
838
+s/[	 ]*$/:/
839
+s/:\$(srcdir):/:/g
840
+s/:\${srcdir}:/:/g
841
+s/:@srcdir@:/:/g
842
+s/^:*//
843
+s/:*$//
844
+x
845
+s/\(=[	 ]*\).*/\1/
846
+G
847
+s/\n//
848
+s/^[^=]*=[	 ]*$//
849
+}
850
+
851
+:t
852
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
853
+s|@configure_input@|$ac_sed_conf_input|;t t
854
+s&@top_builddir@&$ac_top_builddir_sub&;t t
855
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
856
+s&@srcdir@&$ac_srcdir&;t t
857
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
858
+s&@top_srcdir@&$ac_top_srcdir&;t t
859
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
860
+s&@builddir@&$ac_builddir&;t t
861
+s&@abs_builddir@&$ac_abs_builddir&;t t
862
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
863
+$ac_datarootdir_hack
864
+"
865
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
866
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
867
+
868
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
869
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
870
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
871
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
872
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
873
+which seems to be undefined.  Please make sure it is defined" >&5
874
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
875
+which seems to be undefined.  Please make sure it is defined" >&2;}
876
+
877
+  rm -f "$ac_tmp/stdin"
878
+  case $ac_file in
879
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
880
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
881
+  esac \
882
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
883
+ ;;
884
+
885
+
886
+
887
+  esac
888
+
889
+done # for ac_tag
890
+
891
+
892
+as_fn_exit 0
... ...
@@ -3003,7 +3003,7 @@ fi
3003 3003
 
3004 3004
 
3005 3005
 # default CoGAPS specific flags
3006
-GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 "
3006
+GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -D__GAPS_R_BUILD__ "
3007 3007
 GAPS_CXX_FLAGS=
3008 3008
 GAPS_LIBS=
3009 3009
 
... ...
@@ -29,7 +29,7 @@ AC_ARG_ENABLE(simd, [AC_HELP_STRING([--enable-simd],
29 29
     [simd_version=$enableval], [simd_version=sse])
30 30
 
31 31
 # default CoGAPS specific flags
32
-GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 "
32
+GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -D__GAPS_R_BUILD__ "
33 33
 GAPS_CXX_FLAGS=
34 34
 GAPS_LIBS=
35 35
 
... ...
@@ -4,9 +4,9 @@
4 4
 \alias{CoGAPS}
5 5
 \title{CoGAPS Matrix Factorization Algorithm}
6 6
 \usage{
7
-CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000,
8
-  nOutputs = 1000, nSnapshots = 0, alphaA = 0.01, alphaP = 0.01,
9
-  maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE,
7
+CoGAPS(D, S, nFactor = 7, nEquil = 250, nSample = 250, nOutputs = 1000,
8
+  nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, maxGibbmassA = 100,
9
+  maxGibbmassP = 100, seed = -1, messages = TRUE,
10 10
   singleCellRNASeq = FALSE, whichMatrixFixed = "N",
11 11
   fixedPatterns = matrix(0), checkpointInterval = 0,
12 12
   checkpointFile = "gaps_checkpoint.out", nCores = 1, ...)
... ...
@@ -25,4 +25,8 @@ Restart CoGAPS from Checkpoint File
25 25
 loads the state of a previous CoGAPS run from a file and
26 26
  continues the run from that point
27 27
 }
28
+\examples{
29
+data(SimpSim)
30
+result <- CoGAPS(SimpSim.D, SimpSim.S, nFactor=3, nOutputs=250)
31
+}
28 32
 
... ...
@@ -1,7 +1,6 @@
1 1
 #ifndef __COGAPS_ARCHIVE_H__
2 2
 #define __COGAPS_ARCHIVE_H__
3 3
 
4
-#include <Rcpp.h>
5 4
 #include <fstream>
6 5
 
7 6
 // flags for opening an archive
... ...
@@ -3,29 +3,60 @@
3 3
 
4 4
 #include <Rcpp.h>
5 5
 
6
+static RowMatrix convertRMatrix(const Rcpp::NumericMatrix &rmat)
7
+{
8
+    RowMatrix mat(rmat.nrow(), rmat.ncol());
9
+    for (unsigned i = 0; i < rmat.nrow(); ++i)
10
+    {
11
+        for (unsigned j = 0; j < rmat.ncol(); ++j)
12
+        {
13
+            mat(i,j) = rmat(i,j);
14
+        }
15
+    }
16
+    return mat;
17
+}
18
+
19
+template <class Matrix>
20
+static Rcpp::NumericMatrix createRMatrix(const Matrix &mat)
21
+{
22
+    Rcpp::NumericMatrix rmat(mat.nRow(), mat.nCol());
23
+    for (unsigned i = 0; i < mat.nRow(); ++i)
24
+    {
25
+        for (unsigned j = 0; j < mat.nCol(); ++j)
26
+        {
27
+            rmat(i,j) = mat(i,j);
28
+        }
29
+    }
30
+    return rmat;
31
+}
32
+
6 33
 template <class T>
7 34
 static Rcpp::List cogapsRun(T data, unsigned nPatterns,
8 35
 unsigned maxIter, unsigned outputFrequency, unsigned seed, float alphaA,
9 36
 float alphaP, float maxGibbsMassA, float maxGibbsMassP, bool messages,
10
-bool singleCellRNASeq)
37
+bool singleCell)
11 38
 {
12
-    GapsDispatcher dispatcher;
39
+    GapsDispatcher dispatcher(seed);
13 40
 
14 41
     dispatcher.setNumPatterns(nPatterns);
15 42
     dispatcher.setMaxIterations(maxIter);
16 43
     dispatcher.setOutputFrequency(outputFrequency);
17
-    dispatcher.setSeed(seed);
18 44
     
19 45
     dispatcher.setAlpha(alphaA, alphaP);
20
-    dispatcher.setMaxGibbsMass(maxGibbsmassA, maxGibbsmassP);
46
+    dispatcher.setMaxGibbsMass(maxGibbsMassA, maxGibbsMassP);
21 47
 
22 48
     dispatcher.printMessages(messages);
23
-    dispatcher.singleCellRNASeq(singleCellRNASeq);
49
+    dispatcher.singleCell(singleCell);
24 50
     
25
-    dispatcher.loadData(D);
26
-    dispatcher.useDefaultUncertainty(); 
51
+    dispatcher.loadData(data);
27 52
 
28
-    return dispatcher.run();
53
+    GapsResult result(dispatcher.run());
54
+    return Rcpp::List::create(
55
+        Rcpp::Named("Amean") = createRMatrix(result.Amean),
56
+        Rcpp::Named("Pmean") = createRMatrix(result.Pmean),
57
+        Rcpp::Named("Asd") = createRMatrix(result.Asd),
58
+        Rcpp::Named("Psd") = createRMatrix(result.Psd)
59
+    );
29 60
 }
30 61
 
31 62
 // [[Rcpp::export]]
... ...
@@ -35,7 +66,7 @@ float alphaP, float maxGibbsMassA, float maxGibbsMassP, bool messages,
35 66
 bool singleCellRNASeq)
36 67
 {
37 68
     return cogapsRun(D, nPatterns, maxIter, outputFrequency, seed,
38
-        alphaA, alphaP, maxGibbsmassA, maxGibbsMassP, messages,
69
+        alphaA, alphaP, maxGibbsMassA, maxGibbsMassP, messages,
39 70
         singleCellRNASeq);
40 71
 }
41 72
 
... ...
@@ -45,8 +76,8 @@ unsigned maxIter, unsigned outputFrequency, unsigned seed, float alphaA,
45 76
 float alphaP, float maxGibbsMassA, float maxGibbsMassP, bool messages,
46 77
 bool singleCellRNASeq)
47 78
 {
48
-    return cogapsRun(RowMatrix(D), nPatterns, maxIter, outputFrequency, seed,
49
-        alphaA, alphaP, maxGibbsmassA, maxGibbsMassP, messages,
79
+    return cogapsRun(convertRMatrix(D), nPatterns, maxIter, outputFrequency, seed,
80
+        alphaA, alphaP, maxGibbsMassA, maxGibbsMassP, messages,
50 81
         singleCellRNASeq);
51 82
 }
52 83
 
... ...
@@ -1,12 +1,17 @@
1 1
 #ifndef __COGAPS_GAPS_ASSERT_H__
2 2
 #define __COGAPS_GAPS_ASSERT_H__
3 3
 
4
+#include "GapsPrint.h"
5
+#ifdef __GAPS_R_BUILD__
6
+#include <Rcpp.h>
7
+#endif
8
+
4 9
 #ifdef GAPS_DEBUG
5 10
     #define GAPS_ASSERT(cond)                                           \
6 11
         do {                                                            \
7 12
             if (!(cond))                                                \
8 13
             {                                                           \
9
-                Rprintf("assert failed %s %d\n", __FILE__, __LINE__);   \
14
+                gaps_printf("assert failed %s %d\n", __FILE__, __LINE__);   \
10 15
                 std::exit(0);                                           \
11 16
             }                                                           \
12 17
         } while(0)
... ...
@@ -15,7 +20,7 @@
15 20
         do {                                                            \
16 21
             if (!(cond))                                                \
17 22
             {                                                           \
18
-                Rcpp::Rcout << "assert failed " << __FILE__ << " " <<   \
23
+                gaps_cout << "assert failed " << __FILE__ << " " <<   \
19 24
                     __LINE__ << " , " << msg << '\n';                   \
20 25
                 std::exit(0);                                           \
21 26
             }                                                           \
... ...
@@ -25,10 +30,14 @@
25 30
     #define GAPS_ASSERT_MSG(cond, msg) ((void)sizeof(cond))
26 31
 #endif 
27 32
 
33
+#ifdef __GAPS_R_BUILD__
34
+#define gaps_stop Rcpp::stop
35
+#endif
36
+
28 37
 #define GAPS_ERROR(msg)                             \
29 38
     do {                                            \
30
-        Rcpp::Rcout << "error: " << msg << '\n';    \
31
-        Rcpp::stop("CoGAPS aborted");                              \
39
+        gaps_cout << "error: " << msg << '\n';    \
40
+        gaps_stop("CoGAPS aborted");                              \
32 41
     } while(0)
33 42
 
34 43
 #endif
35 44
\ No newline at end of file
... ...
@@ -2,58 +2,86 @@
2 2
 
3 3
 #include <string>
4 4
 
5
-void GapsDispatcher::runOneCycle(unsigned k)
6
-{
7
-
8
-}
5
+#ifdef __GAPS_OPENMP__
6
+    #include <omp.h>
7
+#endif
9 8
 
10
-Rcpp::List GapsDispatcher::run()
9
+static std::vector< std::vector<unsigned> > sampleIndices(unsigned n, unsigned nSets)
11 10
 {
12
-    unsigned iterPerCycle = mMaxIterations / 10;
13
-    unsigned whichCycle = 1;
14
-    while (whichCycle <= 10)
11
+    unsigned setSize = n / nSets;
12
+    std::vector< std::vector<unsigned> > sampleIndices;
13
+    std::vector<unsigned> toBeSampled;
14
+    for (unsigned i = 0; i < n; ++i)
15 15
     {
16
-        runOneCycle(iterPerCycle);
17
-        RowMatrix pMaster = syncPatterns();
18
-        broadcastPatterns(pMaster, static_cast<float>(whichCycle) / 10.f);
19
-        whichCycle++;
16
+        toBeSampled.push_back(i);
20 17
     }
21
-    
22
-    for (unsigned i = 0; i < mRunners.size(); ++i)
18
+
19
+    for (unsigned i = 0; i < (nSets - 1); ++i)
23 20
     {
24
-        mRunners[i]->enableSampling();
25
-        mRunners[i]->fixPatternMatrix();
21
+        sampleIndices.push_back(gaps::random::sample(toBeSampled, setSize));
26 22
     }
27 23
 
28
-    runOneCycle(mMaxIterations);
24
+    GAPS_ASSERT(!toBeSampled.empty());
29 25
 
30
-    // stitch together matrices
26
+    sampleIndices.push_back(toBeSampled);
27
+    return sampleIndices;
31 28
 }
32 29
 
33
-void GapsDispatcher::useDefaultUncertainty()
30
+void GapsDispatcher::runOneCycle(unsigned k)
34 31
 {
35
-
32
+    GAPS_ASSERT(mDataIsLoaded);
33
+    mRunners[0]->run(k, mOutputFrequency, mPrintMessages, mNumCoresPerSet);
36 34
 }
37 35
 
38
-void GapsDispatcher::setUncertainty(const std::string &pathToMatrix)
36
+GapsResult GapsDispatcher::run()
39 37
 {
38
+    #ifdef __GAPS_OPENMP__
39
+    if (mPrintMessages)
40
+    {
41
+        unsigned availableCores = omp_get_max_threads();
42
+        gaps_printf("Running on %d out of %d available cores\n",
43
+            mNumCoresPerSet, availableCores);
44
+    }
45
+    #endif
40 46
 
41
-}
42
-
43
-void GapsDispatcher::setUncertainty(const RowMatrix &S)
44
-{
47
+    GapsResult result(mRunners[0]->nRow(), mRunners[0]->nCol());
48
+    GAPS_ASSERT(mDataIsLoaded);
49
+    runOneCycle(mMaxIterations);
50
+    mRunners[0]->startSampling();
51
+    runOneCycle(mMaxIterations);
45 52
 
53
+    result.Amean = mRunners[0]->AMean();
54
+    result.Pmean = mRunners[0]->PMean();
55
+    result.Asd = mRunners[0]->AStd();
56
+    result.Psd = mRunners[0]->PStd();
57
+    result.seed = mSeed;
58
+    return result;
46 59
 }
47 60
 
48
-
49 61
 void GapsDispatcher::loadData(const RowMatrix &D)
50 62
 {
51
-
63
+    mRunners.push_back(new GapsRunner(D, mNumPatterns, mAlphaA,
64
+        mAlphaP, mMaxGibbsMassA, mMaxGibbsMassP, mSingleCell));
65
+    mDataIsLoaded = true;
52 66
 }
53 67
 
54
-void GapsDispatcher::loadData(const std::string &pathToData);   
68
+void GapsDispatcher::setUncertainty(const RowMatrix &S)
55 69
 {
70
+    GAPS_ASSERT(mDataIsLoaded);
71
+    mRunners[0]->setUncertainty(S);
72
+}
56 73
 
74
+void GapsDispatcher::loadData(const std::string &pathToData)
75
+{
76
+    FileParser parser(pathToData);
77
+    mRunners.push_back(new GapsRunner(parser, mNumPatterns, mAlphaA,
78
+        mAlphaP, mMaxGibbsMassA, mMaxGibbsMassP, mSingleCell));
79
+    mDataIsLoaded = true;
57 80
 }
58 81
 
59
-    
82
+void GapsDispatcher::setUncertainty(const std::string &pathToMatrix)
83
+{
84
+    GAPS_ASSERT(mDataIsLoaded);
85
+    FileParser parser(pathToMatrix);
86
+    mRunners[0]->setUncertainty(parser);
87
+}
60 88
\ No newline at end of file
... ...
@@ -1,11 +1,11 @@
1
-#ifndef __COGAPS_DISPATCHER_H__
2
-#define __COGAPS_DISPATCHER_H__
1
+#ifndef __COGAPS_GAPS_DISPATCHER_H__
2
+#define __COGAPS_GAPS_DISPATCHER_H__
3 3
 
4 4
 #include "GapsRunner.h"
5 5
 
6 6
 #include <string>
7 7
 
8
-struct GapsReturn
8
+struct GapsResult
9 9
 {
10 10
     ColMatrix Amean;
11 11
     ColMatrix Asd;
... ...
@@ -14,6 +14,13 @@ struct GapsReturn
14 14
     
15 15
     float meanChiSq;
16 16
     uint32_t seed;
17
+
18
+    GapsResult(unsigned nrow, unsigned ncol) : Amean(nrow, ncol),
19
+        Asd(nrow, ncol), Pmean(nrow, ncol), Psd(nrow, ncol), meanChiSq(0.f),
20
+        seed(0)
21
+    {}
22
+
23
+    void writeCsv(const std::string &path);
17 24
 };
18 25
 
19 26
 // should be agnostic to external caller (R/Python/CLI)
... ...
@@ -32,27 +39,41 @@ private:
32 39
     float mMaxGibbsMassP;
33 40
 
34 41
     bool mPrintMessages;
35
-    bool mSingleCellRnaSeq;
42
+    bool mSingleCell;
43
+
44
+    bool mDataIsLoaded;    
36 45
 
37
-    std:vector<GapsRunner*> mRunners;
46
+    unsigned mNumCoresPerSet;
47
+
48
+    std::vector<GapsRunner*> mRunners;
38 49
 
39 50
     void runOneCycle(unsigned k);
40 51
 
41 52
 public:
42 53
 
43
-    GapsDispatcher() : mNumPatterns(3), mMaxIterations(1000),
44
-        mOutputFrequency(250), mSeed(0), mAlphaA(0.01), mAlphaP(0.01),
54
+    GapsDispatcher(uint32_t seed=0) : mNumPatterns(3), mMaxIterations(1000),
55
+        mOutputFrequency(250), mSeed(seed), mAlphaA(0.01), mAlphaP(0.01),
45 56
         mMaxGibbsMassA(100.f), mMaxGibbsMassP(100.f), mPrintMessages(true),
46
-        mSingleCellRnaSeq(false)
47
-    {}
57
+        mSingleCell(false), mDataIsLoaded(false), mNumCoresPerSet(1)
58
+    {
59
+        gaps::random::setSeed(mSeed);
60
+    }
61
+
62
+    ~GapsDispatcher()
63
+    {
64
+        for (unsigned i = 0; i < mRunners.size(); ++i)
65
+        {
66
+            delete mRunners[i];
67
+        }
68
+    }
48 69
 
49 70
     void setNumPatterns(unsigned n)     { mNumPatterns = n; }
50 71
     void setMaxIterations(unsigned n)   { mMaxIterations = n; }
51 72
     void setOutputFrequency(unsigned n) { mOutputFrequency = n; }
52
-    void setSeed(unsigned seed)         { mSeed = seed; }
73
+    void setNumCoresPerSet(unsigned n)  { mNumCoresPerSet = n; }
53 74
 
54 75
     void printMessages(bool print) { mPrintMessages = print; }
55
-    void singleCellRNASeq(bool sc) { mSingleCellRnaSeq = sc; }
76
+    void singleCell(bool sc) { mSingleCell = sc; }
56 77
 
57 78
     void setAlpha(float alphaA, float alphaP)
58 79
     {
... ...
@@ -65,15 +86,16 @@ public:
65 86
         mMaxGibbsMassA = maxA;
66 87
         mMaxGibbsMassP = maxP;
67 88
     }
89
+    
90
+    void loadCheckpointFile(const std::string &pathToCptFile);
68 91
 
69
-    void useDefaultUncertainty();
70
-    void setUncertainty(const std::string &pathToMatrix);
71 92
     void setUncertainty(const RowMatrix &S);
93
+    void setUncertainty(const std::string &pathToMatrix);
72 94
 
73 95
     void loadData(const RowMatrix &D);
74
-    void loadData(const std::string &pathToData);    
96
+    void loadData(const std::string &pathToData);
75 97
     
76
-    GapsReturn run();
98
+    GapsResult run();
77 99
 };
78 100
 
79
-#endif
80 101
\ No newline at end of file
102
+#endif // __COGAPS_GAPS_DISPATCHER_H__
81 103
\ No newline at end of file
82 104
new file mode 100644
... ...
@@ -0,0 +1,12 @@
1
+#ifndef __COGAPS_GAPS_PRINT_H__
2
+#define __COGAPS_GAPS_PRINT_H__
3
+
4
+#ifdef __GAPS_R_BUILD__
5
+    #define gaps_printf Rprintf
6
+    #define gaps_cout Rcpp::Rcout
7
+#else
8
+    #define gaps_printf printf
9
+    #define gaps_cout std::cout
10
+#endif
11
+
12
+#endif // __COGAPS_GAPS_PRINT_H__
0 13
\ No newline at end of file
... ...
@@ -1,307 +1,101 @@
1
+#include "GapsAssert.h"
2
+#include "GapsPrint.h"
1 3
 #include "GapsRunner.h"
2
-#include "math/SIMD.h"
3 4
 #include "math/Random.h"
4
-#include "GapsAssert.h"
5
-#include <algorithm>
5
+#include "math/SIMD.h"
6 6
 
7
-#ifdef __GAPS_OPENMP__
8
-    #include <omp.h>
7
+#ifdef __GAPS_R_BUILD__
8
+#include <Rcpp.h>
9 9
 #endif
10 10
 
11
-// create "nSets" vectors where each vector contains a vector of indices in the
12
-// range [0,n)
13
-static std::vector< std::vector<unsigned> > sampleIndices(unsigned n, unsigned nSets)
14
-{
15
-    unsigned setSize = n / nSets;
16
-    std::vector< std::vector<unsigned> > sampleIndices;
17
-    std::vector<unsigned> toBeSampled;
18
-    for (unsigned i = 1; i < n; ++i)
19
-    {
20
-        toBeSampled.push_back(i);
21
-    }
22
-
23
-    for (unsigned i = 0; i < (nSets - 1); ++i)
24
-    {
25
-        sampleIndices.push_back(gaps::random::sample(toBeSampled, setSize));
26
-    }
27
-
28
-    GAPS_ASSERT(!toBeSampled.empty());
29
-
30
-    sampleIndices.push_back(toBeSampled);
31
-
32
-    return sampleIndices;
33
-}
11
+#include <algorithm>
34 12
 
35
-GapsRunner::GapsRunner(const Rcpp::NumericMatrix &D, const Rcpp::NumericMatrix &S,
36
-unsigned nFactor, unsigned nEquil, unsigned nCool, unsigned nSample,
37
-unsigned nOutputs, unsigned nSnapshots, float alphaA, float alphaP,
38
-float maxGibbsMassA, float maxGibbsMassP, uint32_t seed, bool messages,
39
-bool singleCellRNASeq, unsigned cptInterval, const std::string &cptFile,
40
-char whichMatrixFixed, const Rcpp::NumericMatrix &FP, unsigned nCores)
13
+GapsRunner::GapsRunner(const RowMatrix &data, unsigned nPatterns, float alphaA,
14
+float alphaP, float maxGibbsMassA, float maxGibbsMassP, bool singleCell)
41 15
     :
42
-mChiSqEquil(nEquil), mNumAAtomsEquil(nEquil), mNumPAtomsEquil(nEquil),
43
-mChiSqSample(nSample), mNumAAtomsSample(nSample), mNumPAtomsSample(nSample),
44
-mIterA(10), mIterP(10), mEquilIter(nEquil), mCoolIter(nCool),
45