... | ... |
@@ -70,11 +70,6 @@ if test "x$use_simd" = "xsse" ; then |
70 | 70 |
GAPS_CXX_FLAGS+=" -mno-avx " |
71 | 71 |
fi |
72 | 72 |
|
73 |
-# if test "x$use_simd" != "xno" ; then |
|
74 |
-# echo "Using AVX instructions if available" |
|
75 |
-# GAPS_CXX_FLAGS+=" -march=native " |
|
76 |
-# fi |
|
77 |
- |
|
78 | 73 |
GAPS_SOURCE_FILES+=" Cogaps.o" |
79 | 74 |
GAPS_SOURCE_FILES+=" GapsParameters.o" |
80 | 75 |
GAPS_SOURCE_FILES+=" GapsResult.o" |
setting -march=native causes compilation to fail on arm64 apple silicon chip, we have already removed it in the windows configuration so I'm going to see if both an intel mac and an M1 mac are able to build without it and, if so, leave it out
... | ... |
@@ -70,10 +70,10 @@ if test "x$use_simd" = "xsse" ; then |
70 | 70 |
GAPS_CXX_FLAGS+=" -mno-avx " |
71 | 71 |
fi |
72 | 72 |
|
73 |
-if test "x$use_simd" != "xno" ; then |
|
74 |
- echo "Using AVX instructions if available" |
|
75 |
- GAPS_CXX_FLAGS+=" -march=native " |
|
76 |
-fi |
|
73 |
+# if test "x$use_simd" != "xno" ; then |
|
74 |
+# echo "Using AVX instructions if available" |
|
75 |
+# GAPS_CXX_FLAGS+=" -march=native " |
|
76 |
+# fi |
|
77 | 77 |
|
78 | 78 |
GAPS_SOURCE_FILES+=" Cogaps.o" |
79 | 79 |
GAPS_SOURCE_FILES+=" GapsParameters.o" |
... | ... |
@@ -27,7 +27,7 @@ AC_ARG_ENABLE(simd, [AC_HELP_STRING([--enable-simd], |
27 | 27 |
[use_simd=$enableval], [use_simd=yes]) |
28 | 28 |
|
29 | 29 |
# default CoGAPS specific flags |
30 |
-GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -DGAPS_DISABLE_CHECKPOINTS -D__GAPS_R_BUILD__ -Iinclude" |
|
30 |
+GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -DGAPS_DISABLE_CHECKPOINTS -D__GAPS_R_BUILD__" |
|
31 | 31 |
GAPS_CXX_FLAGS= |
32 | 32 |
GAPS_LIBS= |
33 | 33 |
|
... | ... |
@@ -27,7 +27,7 @@ AC_ARG_ENABLE(simd, [AC_HELP_STRING([--enable-simd], |
27 | 27 |
[use_simd=$enableval], [use_simd=yes]) |
28 | 28 |
|
29 | 29 |
# default CoGAPS specific flags |
30 |
-GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -D__GAPS_R_BUILD__ -Iinclude" |
|
30 |
+GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -DGAPS_DISABLE_CHECKPOINTS -D__GAPS_R_BUILD__ -Iinclude" |
|
31 | 31 |
GAPS_CXX_FLAGS= |
32 | 32 |
GAPS_LIBS= |
33 | 33 |
|
... | ... |
@@ -17,10 +17,6 @@ AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], |
17 | 17 |
AC_ARG_ENABLE(cpp-tests, [AC_HELP_STRING([--enable-cpp-tests], |
18 | 18 |
[turn on C++ unit tests])], [cpp_tests=yes], [cpp_tests=no]) |
19 | 19 |
|
20 |
-# Check if running internal tests |
|
21 |
-AC_ARG_ENABLE(internal-tests, [AC_HELP_STRING([--enable-internal-tests], |
|
22 |
- [allow for testing private data])], [internal_tests=yes], [internal_tests=no]) |
|
23 |
- |
|
24 | 20 |
# Check if compiler warnings should be turned on |
25 | 21 |
AC_ARG_ENABLE(warnings, [AC_HELP_STRING([--enable-warnings], |
26 | 22 |
[compile CoGAPS with warning messages])], [warnings=yes], [warnings=no]) |
... | ... |
@@ -58,12 +54,6 @@ if test "x$build_debug" = "xyes" ; then |
58 | 54 |
GAPS_CPP_FLAGS+=" -DGAPS_DEBUG " |
59 | 55 |
fi |
60 | 56 |
|
61 |
-# set compile flags for internal tests |
|
62 |
-if test "x$internal_tests" = "xyes" ; then |
|
63 |
- echo "Enabling Internal Tests" |
|
64 |
- GAPS_CPP_FLAGS+=" -DGAPS_INTERNAL_TESTS " |
|
65 |
-fi |
|
66 |
- |
|
67 | 57 |
# set compile flags if warnings enabled |
68 | 58 |
if test "x$warnings" = "xyes" ; then |
69 | 59 |
if test "x$ax_cv_cxx_compiler_vendor" = "xgnu" || test "x$ax_cv_cxx_compiler_vendor" = "xclang"; then |
... | ... |
@@ -121,22 +121,7 @@ GAPS_SOURCE_FILES+=" math/VectorMath.o" |
121 | 121 |
if test "x$cpp_tests" = "xyes" ; then |
122 | 122 |
echo "Enabling C++ Unit Tests" |
123 | 123 |
GAPS_CPP_FLAGS+=" -DGAPS_CPP_UNIT_TESTS " |
124 |
- |
|
125 |
- GAPS_SOURCE_FILES+=" cpp_tests/testSamplerHighLevel.cpp" |
|
126 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testAtomicDomain.o" |
|
127 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testDenseGibbsSampler.o" |
|
128 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testFileParsers.o" |
|
129 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testHashSets.o" |
|
130 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testHybridMatrix.o" |
|
131 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testHybridVector.o" |
|
132 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testMatrix.o" |
|
133 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testRandom.o" |
|
134 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testSerialization.o" |
|
135 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testSparseGibbsSampler.o" |
|
136 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testSparseIterator.o" |
|
137 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testSparseMatrix.o" |
|
138 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testSparseVector.o" |
|
139 |
- # GAPS_SOURCE_FILES+=" cpp_tests/testVector.o" |
|
124 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testVector.o" |
|
140 | 125 |
fi |
141 | 126 |
|
142 | 127 |
# export variables containing flags |
... | ... |
@@ -107,7 +107,7 @@ GAPS_SOURCE_FILES+=" data_structures/SparseVector.o" |
107 | 107 |
GAPS_SOURCE_FILES+=" data_structures/Vector.o" |
108 | 108 |
GAPS_SOURCE_FILES+=" file_parser/CharacterDelimitedParser.o" |
109 | 109 |
GAPS_SOURCE_FILES+=" file_parser/FileParser.o" |
110 |
-GAPS_SOURCE_FILES+=" file_parser/GctParser.o" |
|
110 |
+GAPS_SOURCE_FILES+=" file_parser/MatrixElement.o" |
|
111 | 111 |
GAPS_SOURCE_FILES+=" file_parser/MtxParser.o" |
112 | 112 |
GAPS_SOURCE_FILES+=" gibbs_sampler/AlphaParameters.o" |
113 | 113 |
GAPS_SOURCE_FILES+=" gibbs_sampler/DenseNormalModel.o" |
... | ... |
@@ -105,10 +105,9 @@ GAPS_SOURCE_FILES+=" data_structures/SparseIterator.o" |
105 | 105 |
GAPS_SOURCE_FILES+=" data_structures/SparseMatrix.o" |
106 | 106 |
GAPS_SOURCE_FILES+=" data_structures/SparseVector.o" |
107 | 107 |
GAPS_SOURCE_FILES+=" data_structures/Vector.o" |
108 |
-GAPS_SOURCE_FILES+=" file_parser/CsvParser.o" |
|
108 |
+GAPS_SOURCE_FILES+=" file_parser/CharacterDelimitedParser.o" |
|
109 | 109 |
GAPS_SOURCE_FILES+=" file_parser/FileParser.o" |
110 | 110 |
GAPS_SOURCE_FILES+=" file_parser/GctParser.o" |
111 |
-GAPS_SOURCE_FILES+=" file_parser/TsvParser.o" |
|
112 | 111 |
GAPS_SOURCE_FILES+=" file_parser/MtxParser.o" |
113 | 112 |
GAPS_SOURCE_FILES+=" gibbs_sampler/AlphaParameters.o" |
114 | 113 |
GAPS_SOURCE_FILES+=" gibbs_sampler/DenseNormalModel.o" |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
# get version of CoGAPS from DESCRIPTION file |
2 |
-AC_INIT(CoGAPS, m4_esyscmd_s([awk -e '/^Version:/ {print $2}' DESCRIPTION])) |
|
2 |
+AC_INIT(CoGAPS, m4_esyscmd_s([awk '/^Version:/ {print $2}' DESCRIPTION])) |
|
3 | 3 |
|
4 | 4 |
# get C++ compiler from R configuration |
5 | 5 |
CXX=`"${R_HOME}/bin/R" CMD config CXX` |
... | ... |
@@ -93,6 +93,7 @@ GAPS_SOURCE_FILES+=" GapsStatistics.o" |
93 | 93 |
GAPS_SOURCE_FILES+=" RcppExports.o" |
94 | 94 |
GAPS_SOURCE_FILES+=" test-runner.o" |
95 | 95 |
GAPS_SOURCE_FILES+=" atomic/Atom.o" |
96 |
+GAPS_SOURCE_FILES+=" atomic/ConcurrentAtom.o" |
|
96 | 97 |
GAPS_SOURCE_FILES+=" atomic/AtomicDomain.o" |
97 | 98 |
GAPS_SOURCE_FILES+=" atomic/ConcurrentAtomicDomain.o" |
98 | 99 |
GAPS_SOURCE_FILES+=" atomic/ProposalQueue.o" |
... | ... |
@@ -92,6 +92,7 @@ GAPS_SOURCE_FILES+=" GapsRunner.o" |
92 | 92 |
GAPS_SOURCE_FILES+=" GapsStatistics.o" |
93 | 93 |
GAPS_SOURCE_FILES+=" RcppExports.o" |
94 | 94 |
GAPS_SOURCE_FILES+=" test-runner.o" |
95 |
+GAPS_SOURCE_FILES+=" atomic/Atom.o" |
|
95 | 96 |
GAPS_SOURCE_FILES+=" atomic/AtomicDomain.o" |
96 | 97 |
GAPS_SOURCE_FILES+=" atomic/ConcurrentAtomicDomain.o" |
97 | 98 |
GAPS_SOURCE_FILES+=" atomic/ProposalQueue.o" |
... | ... |
@@ -93,6 +93,7 @@ GAPS_SOURCE_FILES+=" GapsStatistics.o" |
93 | 93 |
GAPS_SOURCE_FILES+=" RcppExports.o" |
94 | 94 |
GAPS_SOURCE_FILES+=" test-runner.o" |
95 | 95 |
GAPS_SOURCE_FILES+=" atomic/AtomicDomain.o" |
96 |
+GAPS_SOURCE_FILES+=" atomic/ConcurrentAtomicDomain.o" |
|
96 | 97 |
GAPS_SOURCE_FILES+=" atomic/ProposalQueue.o" |
97 | 98 |
GAPS_SOURCE_FILES+=" data_structures/HashSets.o" |
98 | 99 |
GAPS_SOURCE_FILES+=" data_structures/HybridMatrix.o" |
... | ... |
@@ -120,20 +120,21 @@ if test "x$cpp_tests" = "xyes" ; then |
120 | 120 |
echo "Enabling C++ Unit Tests" |
121 | 121 |
GAPS_CPP_FLAGS+=" -DGAPS_CPP_UNIT_TESTS " |
122 | 122 |
|
123 |
- GAPS_SOURCE_FILES+=" cpp_tests/testAtomicDomain.o" |
|
124 |
- GAPS_SOURCE_FILES+=" cpp_tests/testDenseGibbsSampler.o" |
|
125 |
- GAPS_SOURCE_FILES+=" cpp_tests/testFileParsers.o" |
|
126 |
- GAPS_SOURCE_FILES+=" cpp_tests/testHashSets.o" |
|
127 |
- GAPS_SOURCE_FILES+=" cpp_tests/testHybridMatrix.o" |
|
128 |
- GAPS_SOURCE_FILES+=" cpp_tests/testHybridVector.o" |
|
129 |
- GAPS_SOURCE_FILES+=" cpp_tests/testMatrix.o" |
|
130 |
- GAPS_SOURCE_FILES+=" cpp_tests/testRandom.o" |
|
131 |
- GAPS_SOURCE_FILES+=" cpp_tests/testSerialization.o" |
|
132 |
- GAPS_SOURCE_FILES+=" cpp_tests/testSparseGibbsSampler.o" |
|
133 |
- GAPS_SOURCE_FILES+=" cpp_tests/testSparseIterator.o" |
|
134 |
- GAPS_SOURCE_FILES+=" cpp_tests/testSparseMatrix.o" |
|
135 |
- GAPS_SOURCE_FILES+=" cpp_tests/testSparseVector.o" |
|
136 |
- GAPS_SOURCE_FILES+=" cpp_tests/testVector.o" |
|
123 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testSamplerHighLevel.cpp" |
|
124 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testAtomicDomain.o" |
|
125 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testDenseGibbsSampler.o" |
|
126 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testFileParsers.o" |
|
127 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testHashSets.o" |
|
128 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testHybridMatrix.o" |
|
129 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testHybridVector.o" |
|
130 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testMatrix.o" |
|
131 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testRandom.o" |
|
132 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testSerialization.o" |
|
133 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testSparseGibbsSampler.o" |
|
134 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testSparseIterator.o" |
|
135 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testSparseMatrix.o" |
|
136 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testSparseVector.o" |
|
137 |
+ # GAPS_SOURCE_FILES+=" cpp_tests/testVector.o" |
|
137 | 138 |
fi |
138 | 139 |
|
139 | 140 |
# export variables containing flags |
... | ... |
@@ -109,7 +109,6 @@ GAPS_SOURCE_FILES+=" file_parser/TsvParser.o" |
109 | 109 |
GAPS_SOURCE_FILES+=" file_parser/MtxParser.o" |
110 | 110 |
GAPS_SOURCE_FILES+=" gibbs_sampler/AlphaParameters.o" |
111 | 111 |
GAPS_SOURCE_FILES+=" gibbs_sampler/DenseNormalModel.o" |
112 |
-GAPS_SOURCE_FILES+=" gibbs_sampler/DenseNormalWithUncertaintyModel.o" |
|
113 | 112 |
GAPS_SOURCE_FILES+=" gibbs_sampler/SparseNormalModel.o" |
114 | 113 |
GAPS_SOURCE_FILES+=" math/Math.o" |
115 | 114 |
GAPS_SOURCE_FILES+=" math/MatrixMath.o" |
... | ... |
@@ -109,6 +109,7 @@ GAPS_SOURCE_FILES+=" file_parser/TsvParser.o" |
109 | 109 |
GAPS_SOURCE_FILES+=" file_parser/MtxParser.o" |
110 | 110 |
GAPS_SOURCE_FILES+=" gibbs_sampler/AlphaParameters.o" |
111 | 111 |
GAPS_SOURCE_FILES+=" gibbs_sampler/DenseNormalModel.o" |
112 |
+GAPS_SOURCE_FILES+=" gibbs_sampler/DenseNormalWithUncertaintyModel.o" |
|
112 | 113 |
GAPS_SOURCE_FILES+=" gibbs_sampler/SparseNormalModel.o" |
113 | 114 |
GAPS_SOURCE_FILES+=" math/Math.o" |
114 | 115 |
GAPS_SOURCE_FILES+=" math/MatrixMath.o" |
... | ... |
@@ -108,8 +108,8 @@ GAPS_SOURCE_FILES+=" file_parser/GctParser.o" |
108 | 108 |
GAPS_SOURCE_FILES+=" file_parser/TsvParser.o" |
109 | 109 |
GAPS_SOURCE_FILES+=" file_parser/MtxParser.o" |
110 | 110 |
GAPS_SOURCE_FILES+=" gibbs_sampler/AlphaParameters.o" |
111 |
-GAPS_SOURCE_FILES+=" gibbs_sampler/DenseStoragePolicy.o" |
|
112 |
-GAPS_SOURCE_FILES+=" gibbs_sampler/SparseStoragePolicy.o" |
|
111 |
+GAPS_SOURCE_FILES+=" gibbs_sampler/DenseNormalModel.o" |
|
112 |
+GAPS_SOURCE_FILES+=" gibbs_sampler/SparseNormalModel.o" |
|
113 | 113 |
GAPS_SOURCE_FILES+=" math/Math.o" |
114 | 114 |
GAPS_SOURCE_FILES+=" math/MatrixMath.o" |
115 | 115 |
GAPS_SOURCE_FILES+=" math/Random.o" |
... | ... |
@@ -105,7 +105,6 @@ GAPS_SOURCE_FILES+=" data_structures/Vector.o" |
105 | 105 |
GAPS_SOURCE_FILES+=" file_parser/CsvParser.o" |
106 | 106 |
GAPS_SOURCE_FILES+=" file_parser/FileParser.o" |
107 | 107 |
GAPS_SOURCE_FILES+=" file_parser/GctParser.o" |
108 |
-GAPS_SOURCE_FILES+=" file_parser/Hdf5Parser.o" |
|
109 | 108 |
GAPS_SOURCE_FILES+=" file_parser/TsvParser.o" |
110 | 109 |
GAPS_SOURCE_FILES+=" file_parser/MtxParser.o" |
111 | 110 |
GAPS_SOURCE_FILES+=" gibbs_sampler/AlphaParameters.o" |
... | ... |
@@ -97,8 +97,9 @@ GAPS_SOURCE_FILES+=" data_structures/SparseMatrix.o" |
97 | 97 |
GAPS_SOURCE_FILES+=" data_structures/SparseVector.o" |
98 | 98 |
GAPS_SOURCE_FILES+=" data_structures/Vector.o" |
99 | 99 |
GAPS_SOURCE_FILES+=" file_parser/CsvParser.o" |
100 |
-GAPS_SOURCE_FILES+=" file_parser/GctParser.o" |
|
101 | 100 |
GAPS_SOURCE_FILES+=" file_parser/FileParser.o" |
101 |
+GAPS_SOURCE_FILES+=" file_parser/GctParser.o" |
|
102 |
+GAPS_SOURCE_FILES+=" file_parser/Hdf5Parser.o" |
|
102 | 103 |
GAPS_SOURCE_FILES+=" file_parser/TsvParser.o" |
103 | 104 |
GAPS_SOURCE_FILES+=" file_parser/MtxParser.o" |
104 | 105 |
GAPS_SOURCE_FILES+=" gibbs_sampler/AlphaParameters.o" |
... | ... |
@@ -101,8 +101,9 @@ GAPS_SOURCE_FILES+=" file_parser/GctParser.o" |
101 | 101 |
GAPS_SOURCE_FILES+=" file_parser/FileParser.o" |
102 | 102 |
GAPS_SOURCE_FILES+=" file_parser/TsvParser.o" |
103 | 103 |
GAPS_SOURCE_FILES+=" file_parser/MtxParser.o" |
104 |
-GAPS_SOURCE_FILES+=" gibbs_sampler/DenseGibbsSampler.o" |
|
105 |
-GAPS_SOURCE_FILES+=" gibbs_sampler/SparseGibbsSampler.o" |
|
104 |
+GAPS_SOURCE_FILES+=" gibbs_sampler/AlphaParameters.o" |
|
105 |
+GAPS_SOURCE_FILES+=" gibbs_sampler/DenseStoragePolicy.o" |
|
106 |
+GAPS_SOURCE_FILES+=" gibbs_sampler/SparseStoragePolicy.o" |
|
106 | 107 |
GAPS_SOURCE_FILES+=" math/Math.o" |
107 | 108 |
GAPS_SOURCE_FILES+=" math/MatrixMath.o" |
108 | 109 |
GAPS_SOURCE_FILES+=" math/Random.o" |
... | ... |
@@ -75,6 +75,11 @@ if test "x$use_simd" = "xno" ; then |
75 | 75 |
echo "Building without SIMD instructions" |
76 | 76 |
fi |
77 | 77 |
|
78 |
+if test "x$use_simd" = "xsse" ; then |
|
79 |
+ echo "Disabling AVX instructions" |
|
80 |
+ GAPS_CXX_FLAGS+=" -mno-avx " |
|
81 |
+fi |
|
82 |
+ |
|
78 | 83 |
if test "x$use_simd" != "xno" ; then |
79 | 84 |
GAPS_CXX_FLAGS+=" -march=native " |
80 | 85 |
fi |
... | ... |
@@ -13,6 +13,10 @@ AC_PROG_CXX |
13 | 13 |
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], |
14 | 14 |
[build debug version of CoGAPS])], [build_debug=yes], [build_debug=no]) |
15 | 15 |
|
16 |
+# Check if running C++ tests (this adds to compilation time) |
|
17 |
+AC_ARG_ENABLE(cpp-tests, [AC_HELP_STRING([--enable-cpp-tests], |
|
18 |
+ [turn on C++ unit tests])], [cpp_tests=yes], [cpp_tests=no]) |
|
19 |
+ |
|
16 | 20 |
# Check if running internal tests |
17 | 21 |
AC_ARG_ENABLE(internal-tests, [AC_HELP_STRING([--enable-internal-tests], |
18 | 22 |
[allow for testing private data])], [internal_tests=yes], [internal_tests=no]) |
... | ... |
@@ -75,10 +79,61 @@ if test "x$use_simd" != "xno" ; then |
75 | 79 |
GAPS_CXX_FLAGS+=" -march=native " |
76 | 80 |
fi |
77 | 81 |
|
82 |
+GAPS_SOURCE_FILES+=" Cogaps.o" |
|
83 |
+GAPS_SOURCE_FILES+=" GapsParameters.o" |
|
84 |
+GAPS_SOURCE_FILES+=" GapsResult.o" |
|
85 |
+GAPS_SOURCE_FILES+=" GapsRunner.o" |
|
86 |
+GAPS_SOURCE_FILES+=" GapsStatistics.o" |
|
87 |
+GAPS_SOURCE_FILES+=" RcppExports.o" |
|
88 |
+GAPS_SOURCE_FILES+=" test-runner.o" |
|
89 |
+GAPS_SOURCE_FILES+=" atomic/AtomicDomain.o" |
|
90 |
+GAPS_SOURCE_FILES+=" atomic/ProposalQueue.o" |
|
91 |
+GAPS_SOURCE_FILES+=" data_structures/HashSets.o" |
|
92 |
+GAPS_SOURCE_FILES+=" data_structures/HybridMatrix.o" |
|
93 |
+GAPS_SOURCE_FILES+=" data_structures/HybridVector.o" |
|
94 |
+GAPS_SOURCE_FILES+=" data_structures/Matrix.o" |
|
95 |
+GAPS_SOURCE_FILES+=" data_structures/SparseIterator.o" |
|
96 |
+GAPS_SOURCE_FILES+=" data_structures/SparseMatrix.o" |
|
97 |
+GAPS_SOURCE_FILES+=" data_structures/SparseVector.o" |
|
98 |
+GAPS_SOURCE_FILES+=" data_structures/Vector.o" |
|
99 |
+GAPS_SOURCE_FILES+=" file_parser/CsvParser.o" |
|
100 |
+GAPS_SOURCE_FILES+=" file_parser/GctParser.o" |
|
101 |
+GAPS_SOURCE_FILES+=" file_parser/FileParser.o" |
|
102 |
+GAPS_SOURCE_FILES+=" file_parser/TsvParser.o" |
|
103 |
+GAPS_SOURCE_FILES+=" file_parser/MtxParser.o" |
|
104 |
+GAPS_SOURCE_FILES+=" gibbs_sampler/DenseGibbsSampler.o" |
|
105 |
+GAPS_SOURCE_FILES+=" gibbs_sampler/SparseGibbsSampler.o" |
|
106 |
+GAPS_SOURCE_FILES+=" math/Math.o" |
|
107 |
+GAPS_SOURCE_FILES+=" math/MatrixMath.o" |
|
108 |
+GAPS_SOURCE_FILES+=" math/Random.o" |
|
109 |
+GAPS_SOURCE_FILES+=" math/VectorMath.o" |
|
110 |
+ |
|
111 |
+# add c++ tests to source list |
|
112 |
+if test "x$cpp_tests" = "xyes" ; then |
|
113 |
+ echo "Enabling C++ Unit Tests" |
|
114 |
+ GAPS_CPP_FLAGS+=" -DGAPS_CPP_UNIT_TESTS " |
|
115 |
+ |
|
116 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testAtomicDomain.o" |
|
117 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testDenseGibbsSampler.o" |
|
118 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testFileParsers.o" |
|
119 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testHashSets.o" |
|
120 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testHybridMatrix.o" |
|
121 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testHybridVector.o" |
|
122 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testMatrix.o" |
|
123 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testRandom.o" |
|
124 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testSerialization.o" |
|
125 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testSparseGibbsSampler.o" |
|
126 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testSparseIterator.o" |
|
127 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testSparseMatrix.o" |
|
128 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testSparseVector.o" |
|
129 |
+ GAPS_SOURCE_FILES+=" cpp_tests/testVector.o" |
|
130 |
+fi |
|
131 |
+ |
|
78 | 132 |
# export variables containing flags |
79 | 133 |
AC_SUBST(GAPS_CPP_FLAGS) |
80 | 134 |
AC_SUBST(GAPS_CXX_FLAGS) |
81 | 135 |
AC_SUBST(GAPS_LIBS) |
136 |
+AC_SUBST(GAPS_SOURCE_FILES) |
|
82 | 137 |
|
83 | 138 |
# create makefile, output configure file |
84 | 139 |
AC_CONFIG_FILES([src/Makevars]) |
... | ... |
@@ -27,7 +27,7 @@ AC_ARG_ENABLE(simd, [AC_HELP_STRING([--enable-simd], |
27 | 27 |
[use_simd=$enableval], [use_simd=yes]) |
28 | 28 |
|
29 | 29 |
# default CoGAPS specific flags |
30 |
-GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -D__GAPS_R_BUILD__ " |
|
30 |
+GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -D__GAPS_R_BUILD__ -Iinclude" |
|
31 | 31 |
GAPS_CXX_FLAGS= |
32 | 32 |
GAPS_LIBS= |
33 | 33 |
|
... | ... |
@@ -73,9 +73,7 @@ if test "x$use_simd" = "xno" ; then |
73 | 73 |
fi |
74 | 74 |
|
75 | 75 |
if test "x$use_simd" != "xno" ; then |
76 |
- if test "x$ax_cv_cxx_compiler_vendor" = "xgnu" || test "x$ax_cv_cxx_compiler_vendor" = "xclang"; then |
|
77 |
- GAPS_CXX_FLAGS+=" -march=native " |
|
78 |
- fi |
|
76 |
+ GAPS_CXX_FLAGS+=" -march=native " |
|
79 | 77 |
fi |
80 | 78 |
|
81 | 79 |
# export variables containing flags |
... | ... |
@@ -64,7 +64,7 @@ fi |
64 | 64 |
# set compile flags if warnings enabled |
65 | 65 |
if test "x$warnings" = "xyes" ; then |
66 | 66 |
if test "x$ax_cv_cxx_compiler_vendor" = "xgnu" || test "x$ax_cv_cxx_compiler_vendor" = "xclang"; then |
67 |
- GAPS_CXX_FLAGS+=" -Wall -Wextra -Werror -Wno-unused-parameter " |
|
67 |
+ GAPS_CXX_FLAGS+=" -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unknown-pragmas" |
|
68 | 68 |
fi |
69 | 69 |
fi |
70 | 70 |
|
... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
# get version of CoGAPS from DESCRIPTION file |
2 | 2 |
AC_INIT(CoGAPS, m4_esyscmd_s([awk -e '/^Version:/ {print $2}' DESCRIPTION])) |
3 |
-AM_INIT_AUTOMAKE([-Wall -Werror foreign]) |
|
3 |
+# AM_INIT_AUTOMAKE([-Wall -Werror foreign]) |
|
4 | 4 |
|
5 | 5 |
# get C++ compiler from R configuration |
6 | 6 |
CXX=`"${R_HOME}/bin/R" CMD config CXX` |
... | ... |
@@ -22,10 +22,10 @@ AC_ARG_ENABLE(internal-tests, [AC_HELP_STRING([--enable-internal-tests], |
22 | 22 |
AC_ARG_ENABLE(warnings, [AC_HELP_STRING([--enable-warnings], |
23 | 23 |
[compile CoGAPS with warning messages])], [warnings=yes], [warnings=no]) |
24 | 24 |
|
25 |
-# Check if specific version of SIMD instructions requested |
|
25 |
+# Use SIMD unless requested not to |
|
26 | 26 |
AC_ARG_ENABLE(simd, [AC_HELP_STRING([--enable-simd], |
27 |
- [specify simd instruction set (sse, avx)])], |
|
28 |
- [simd_version=$enableval], [simd_version=avx]) |
|
27 |
+ [compile with SIMD support if available])], |
|
28 |
+ [use_simd=$enableval], [use_simd=yes]) |
|
29 | 29 |
|
30 | 30 |
# default CoGAPS specific flags |
31 | 31 |
GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -D__GAPS_R_BUILD__ " |
... | ... |
@@ -47,9 +47,6 @@ if test "x$use_openmp" != "xno" ; then |
47 | 47 |
GAPS_LIBS+=" $OPENMP_CXXFLAGS " |
48 | 48 |
fi |
49 | 49 |
|
50 |
-# detect SIMD support |
|
51 |
-AX_EXT |
|
52 |
- |
|
53 | 50 |
echo "building on $ax_cv_cxx_compiler_vendor compiler version $ax_cv_cxx_compiler_version" |
54 | 51 |
|
55 | 52 |
# set compile flags for debug build |
... | ... |
@@ -71,48 +68,16 @@ if test "x$warnings" = "xyes" ; then |
71 | 68 |
fi |
72 | 69 |
fi |
73 | 70 |
|
74 |
-# set compile flags for SIMD |
|
75 |
-echo "Supported SIMD flags: " $SIMD_FLAGS |
|
76 |
- |
|
77 |
-if test "x$simd_version" != "xavx" && test "x$simd_version" != "xsse" && test "x$simd_version" != "xno" && test "x$simd_version" != "xyes" ; then |
|
78 |
- echo "Invalid SIMD Type, Defaulting to AVX" |
|
79 |
- simd_version=avx |
|
80 |
-fi |
|
81 |
- |
|
82 |
-avx_supported=false |
|
83 |
-if test "x$simd_version" = "xavx" || test "x$simd_version" = "xyes" ; then |
|
84 |
- for s in $SIMD_FLAGS; do |
|
85 |
- if test "x$s" = "x-mavx"; then |
|
86 |
- avx_supported=true |
|
87 |
- echo "Building with AVX instructions" |
|
88 |
- GAPS_CXX_FLAGS+=" -mavx " |
|
89 |
- fi |
|
90 |
- done |
|
91 |
- if test "x$avx_supported" = "xfalse" ; then |
|
92 |
- echo "Note: AVX not supported, trying for SSE" |
|
93 |
- simd_version=sse |
|
94 |
- fi |
|
71 |
+if test "x$use_simd" = "xno" ; then |
|
72 |
+ echo "Building without SIMD instructions" |
|
95 | 73 |
fi |
96 | 74 |
|
97 |
-sse_supported=false |
|
98 |
-if test "x$simd_version" = "xsse" ; then |
|
99 |
- for s in $SIMD_FLAGS; do |
|
100 |
- if test "x$s" = "x-msse4.2"; then |
|
101 |
- sse_supported=true |
|
102 |
- echo "Building with SSE instructions" |
|
103 |
- GAPS_CXX_FLAGS+=" -msse4.2 " |
|
104 |
- fi |
|
105 |
- done |
|
106 |
- if test "x$sse_supported" = "xfalse" ; then |
|
107 |
- echo "Note: SSE not supported" |
|
108 |
- simd_version=no |
|
75 |
+if test "x$use_simd" != "xno" ; then |
|
76 |
+ if test "x$ax_cv_cxx_compiler_vendor" = "xgnu" || test "x$ax_cv_cxx_compiler_vendor" = "xclang"; then |
|
77 |
+ GAPS_CXX_FLAGS+=" -march=native " |
|
109 | 78 |
fi |
110 | 79 |
fi |
111 | 80 |
|
112 |
-if test "x$simd_version" = "xno" ; then |
|
113 |
- echo "Building without SIMD instructions" |
|
114 |
-fi |
|
115 |
- |
|
116 | 81 |
# export variables containing flags |
117 | 82 |
AC_SUBST(GAPS_CPP_FLAGS) |
118 | 83 |
AC_SUBST(GAPS_CXX_FLAGS) |
... | ... |
@@ -14,6 +14,10 @@ AC_PROG_CXX |
14 | 14 |
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], |
15 | 15 |
[build debug version of CoGAPS])], [build_debug=yes], [build_debug=no]) |
16 | 16 |
|
17 |
+# Check if running internal tests |
|
18 |
+AC_ARG_ENABLE(internal-tests, [AC_HELP_STRING([--enable-internal-tests], |
|
19 |
+ [allow for testing private data])], [internal_tests=yes], [internal_tests=no]) |
|
20 |
+ |
|
17 | 21 |
# Check if compiler warnings should be turned on |
18 | 22 |
AC_ARG_ENABLE(warnings, [AC_HELP_STRING([--enable-warnings], |
19 | 23 |
[compile CoGAPS with warning messages])], [warnings=yes], [warnings=no]) |
... | ... |
@@ -54,6 +58,12 @@ if test "x$build_debug" = "xyes" ; then |
54 | 58 |
GAPS_CPP_FLAGS+=" -DGAPS_DEBUG " |
55 | 59 |
fi |
56 | 60 |
|
61 |
+# set compile flags for internal tests |
|
62 |
+if test "x$internal_tests" = "xyes" ; then |
|
63 |
+ echo "Enabling Internal Tests" |
|
64 |
+ GAPS_CPP_FLAGS+=" -DGAPS_INTERNAL_TESTS " |
|
65 |
+fi |
|
66 |
+ |
|
57 | 67 |
# set compile flags if warnings enabled |
58 | 68 |
if test "x$warnings" = "xyes" ; then |
59 | 69 |
if test "x$ax_cv_cxx_compiler_vendor" = "xgnu" || test "x$ax_cv_cxx_compiler_vendor" = "xclang"; then |
... | ... |
@@ -32,10 +32,16 @@ GAPS_LIBS= |
32 | 32 |
AX_COMPILER_VENDOR |
33 | 33 |
AX_COMPILER_VERSION |
34 | 34 |
|
35 |
-# set openmp flags |
|
35 |
+# set openmp flags, disable only if requested |
|
36 |
+AC_ARG_ENABLE(openmp, [AC_HELP_STRING([--enable-openmp], |
|
37 |
+ [compile with openMP support if available])], |
|
38 |
+ [use_openmp=$enableval], [use_openmp=yes]) |
|
39 |
+ |
|
36 | 40 |
AX_OPENMP |
37 |
-GAPS_CXX_FLAGS+=" $OPENMP_CXXFLAGS " |
|
38 |
-GAPS_LIBS+=" $OPENMP_CXXFLAGS " |
|
41 |
+if test "x$use_openmp" != "xno" ; then |
|
42 |
+ GAPS_CXX_FLAGS+=" $OPENMP_CXXFLAGS " |
|
43 |
+ GAPS_LIBS+=" $OPENMP_CXXFLAGS " |
|
44 |
+fi |
|
39 | 45 |
|
40 | 46 |
# detect SIMD support |
41 | 47 |
AX_EXT |
... | ... |
@@ -21,7 +21,7 @@ AC_ARG_ENABLE(warnings, [AC_HELP_STRING([--enable-warnings], |
21 | 21 |
# Check if specific version of SIMD instructions requested |
22 | 22 |
AC_ARG_ENABLE(simd, [AC_HELP_STRING([--enable-simd], |
23 | 23 |
[specify simd instruction set (sse, avx)])], |
24 |
- [simd_version=$enableval], [simd_version=sse]) |
|
24 |
+ [simd_version=$enableval], [simd_version=avx]) |
|
25 | 25 |
|
26 | 26 |
# default CoGAPS specific flags |
27 | 27 |
GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -D__GAPS_R_BUILD__ " |
... | ... |
@@ -37,6 +37,9 @@ AX_OPENMP |
37 | 37 |
GAPS_CXX_FLAGS+=" $OPENMP_CXXFLAGS " |
38 | 38 |
GAPS_LIBS+=" $OPENMP_CXXFLAGS " |
39 | 39 |
|
40 |
+# detect SIMD support |
|
41 |
+AX_EXT |
|
42 |
+ |
|
40 | 43 |
echo "building on $ax_cv_cxx_compiler_vendor compiler version $ax_cv_cxx_compiler_version" |
41 | 44 |
|
42 | 45 |
# set compile flags for debug build |
... | ... |
@@ -53,7 +56,6 @@ if test "x$warnings" = "xyes" ; then |
53 | 56 |
fi |
54 | 57 |
|
55 | 58 |
# set compile flags for SIMD |
56 |
-AX_EXT |
|
57 | 59 |
echo "Supported SIMD flags: " $SIMD_FLAGS |
58 | 60 |
|
59 | 61 |
if test "x$simd_version" != "xavx" && test "x$simd_version" != "xsse" && test "x$simd_version" != "xno" && test "x$simd_version" != "xyes" ; then |
... | ... |
@@ -30,9 +30,9 @@ GAPS_LIBS= |
30 | 30 |
# get compiler info |
31 | 31 |
AX_COMPILER_VENDOR |
32 | 32 |
AX_COMPILER_VERSION |
33 |
-AX_OPENMP |
|
34 | 33 |
|
35 | 34 |
# set openmp flags |
35 |
+AX_OPENMP |
|
36 | 36 |
GAPS_CXX_FLAGS+=" $OPENMP_CXXFLAGS " |
37 | 37 |
GAPS_LIBS+=" $OPENMP_CXXFLAGS " |
38 | 38 |
|
... | ... |
@@ -46,28 +46,52 @@ fi |
46 | 46 |
|
47 | 47 |
# set compile flags if warnings enabled |
48 | 48 |
if test "x$warnings" = "xyes" ; then |
49 |
- AX_CHECK_COMPILE_FLAG([-Wall], [GAPS_CXX_FLAGS+=" -Wall "]) |
|
50 |
- AX_CHECK_COMPILE_FLAG([-Wextra], [GAPS_CXX_FLAGS+=" -Wextra "]) |
|
51 |
- AX_CHECK_COMPILE_FLAG([-Werror], [GAPS_CXX_FLAGS+=" -Werror "]) |
|
52 |
- AX_CHECK_COMPILE_FLAG([-Wno-unused-parameter], |
|
53 |
- [GAPS_CXX_FLAGS+=" -Wno-unused-parameter "]) |
|
49 |
+ if test "x$ax_cv_cxx_compiler_vendor" = "xgnu" || test "x$ax_cv_cxx_compiler_vendor" = "xclang"; then |
|
50 |
+ GAPS_CXX_FLAGS+=" -Wall -Wextra -Werror -Wno-unused-parameter " |
|
51 |
+ fi |
|
54 | 52 |
fi |
55 | 53 |
|
56 | 54 |
# set compile flags for SIMD |
55 |
+AX_EXT |
|
56 |
+echo "Supported SIMD flags: " $SIMD_FLAGS |
|
57 |
+ |
|
58 |
+if test "x$simd_version" != "xavx" && test "x$simd_version" != "xsse" && test "x$simd_version" != "xno" && test "x$simd_version" != "xyes" ; then |
|
59 |
+ echo "Invalid SIMD Type, Defaulting to AVX" |
|
60 |
+ simd_version=avx |
|
61 |
+fi |
|
62 |
+ |
|
63 |
+avx_supported=false |
|
64 |
+if test "x$simd_version" = "xavx" || test "x$simd_version" = "xyes" ; then |
|
65 |
+ for s in $SIMD_FLAGS; do |
|
66 |
+ if test "x$s" = "x-mavx"; then |
|
67 |
+ avx_supported=true |
|
68 |
+ echo "Building with AVX instructions" |
|
69 |
+ GAPS_CXX_FLAGS+=" -mavx " |
|
70 |
+ fi |
|
71 |
+ done |
|
72 |
+ if test "x$avx_supported" = "xfalse" ; then |
|
73 |
+ echo "Note: AVX not supported, trying for SSE" |
|
74 |
+ simd_version=sse |
|
75 |
+ fi |
|
76 |
+fi |
|
77 |
+ |
|
78 |
+sse_supported=false |
|
57 | 79 |
if test "x$simd_version" = "xsse" ; then |
58 |
- echo "Compiling with SSE instructions" |
|
59 |
- AX_CHECK_COMPILE_FLAG([-msse4.2], [GAPS_CXX_FLAGS+=" -msse4.2 "]) |
|
60 |
-elif test "x$simd_version" = "xyes" ; then |
|
61 |
- echo "Compiling with SSE instructions" |
|
62 |
- AX_CHECK_COMPILE_FLAG([-msse4.2], [GAPS_CXX_FLAGS+=" -msse4.2 "]) |
|
63 |
-elif test "x$simd_version" = "xavx" ; then |
|
64 |
- echo "Compiling with AVX instructions" |
|
65 |
- AX_CHECK_COMPILE_FLAG([-mavx], [GAPS_CXX_FLAGS+=" -mavx "]) |
|
66 |
-elif test "x$simd_version" = "xno" ; then |
|
67 |
- echo "Compiling without SIMD instructions" |
|
68 |
-else |
|
69 |
- echo "Error: Invalid SIMD type" |
|
70 |
- exit -1 |
|
80 |
+ for s in $SIMD_FLAGS; do |
|
81 |
+ if test "x$s" = "x-msse4.2"; then |
|
82 |
+ sse_supported=true |
|
83 |
+ echo "Building with SSE instructions" |
|
84 |
+ GAPS_CXX_FLAGS+=" -msse4.2 " |
|
85 |
+ fi |
|
86 |
+ done |
|
87 |
+ if test "x$sse_supported" = "xfalse" ; then |
|
88 |
+ echo "Note: SSE not supported" |
|
89 |
+ simd_version=no |
|
90 |
+ fi |
|
91 |
+fi |
|
92 |
+ |
|
93 |
+if test "x$simd_version" = "xno" ; then |
|
94 |
+ echo "Building without SIMD instructions" |
|
71 | 95 |
fi |
72 | 96 |
|
73 | 97 |
# export variables containing flags |
... | ... |
@@ -49,8 +49,8 @@ if test "x$warnings" = "xyes" ; then |
49 | 49 |
AX_CHECK_COMPILE_FLAG([-Wall], [GAPS_CXX_FLAGS+=" -Wall "]) |
50 | 50 |
AX_CHECK_COMPILE_FLAG([-Wextra], [GAPS_CXX_FLAGS+=" -Wextra "]) |
51 | 51 |
AX_CHECK_COMPILE_FLAG([-Werror], [GAPS_CXX_FLAGS+=" -Werror "]) |
52 |
- AX_CHECK_COMPILE_FLAG([-Wno-unused-parameter], [GAPS_CXX_FLAGS+=" -Wno-unused-parameter "]) |
|
53 |
- AX_CHECK_COMPILE_FLAG([-Wno-unused-function], [GAPS_CXX_FLAGS+=" -Wno-unused-function "]) |
|
52 |
+ AX_CHECK_COMPILE_FLAG([-Wno-unused-parameter], |
|
53 |
+ [GAPS_CXX_FLAGS+=" -Wno-unused-parameter "]) |
|
54 | 54 |
fi |
55 | 55 |
|
56 | 56 |
# set compile flags for SIMD |
... | ... |
@@ -13,10 +13,6 @@ AC_PROG_CXX |
13 | 13 |
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], |
14 | 14 |
[build debug version of CoGAPS])], [build_debug=yes], [build_debug=no]) |
15 | 15 |
|
16 |
-# Check if compiling debug version with thread sanitizer |
|
17 |
-AC_ARG_ENABLE(debug_tsan, [AC_HELP_STRING([--enable-debug-tsan], |
|
18 |
- [build debug version of CoGAPS])], [build_debug_tsan=yes], [build_debug_tsan=no]) |
|
19 |
- |
|
20 | 16 |
# Check if compiler warnings should be turned on |
21 | 17 |
AC_ARG_ENABLE(warnings, [AC_HELP_STRING([--enable-warnings], |
22 | 18 |
[compile CoGAPS with warning messages])], [warnings=yes], [warnings=no]) |
... | ... |
@@ -45,21 +41,7 @@ echo "building on $ax_cv_cxx_compiler_vendor compiler version $ax_cv_cxx_compile |
45 | 41 |
# set compile flags for debug build |
46 | 42 |
if test "x$build_debug" = "xyes" ; then |
47 | 43 |
echo "Building Debug Version of CoGAPS" |
48 |
- GAPS_CPP_FLAGS+=" -DGAPS_DEBUG -fno-omit-frame-pointer " |
|
49 |
- if test "x$ax_cv_cxx_compiler_vendor" = "xclang" ; then |
|
50 |
- GAPS_CPP_FLAGS+=" -fsanitize=address -fsanitize=undefined " |
|
51 |
- GAPS_LIBS+=" -fsanitize=address -fsanitize=undefined " |
|
52 |
- elif test "x$ax_cv_cxx_compiler_vendor" = "xgnu" ; then |
|
53 |
- GAPS_CPP_FLAGS+=" -fsanitize=address -fsanitize=undefined " |
|
54 |
- GAPS_LIBS+=" -fsanitize=address -fsanitize=undefined " |
|
55 |
- fi |
|
56 |
-elif test "x$build_debug_tsan" = "xyes" ; then |
|
57 |
- echo "Building Debug Version of CoGAPS with thread sanitizer" |
|
58 |
- GAPS_CPP_FLAGS+=" -DGAPS_DEBUG -fno-omit-frame-pointer " |
|
59 |
- if test "x$ax_cv_cxx_compiler_vendor" = "xclang" ; then |
|
60 |
- GAPS_CPP_FLAGS+=" -fsanitize=thread " |
|
61 |
- GAPS_LIBS+=" -fsanitize=thread " |
|
62 |
- fi |
|
44 |
+ GAPS_CPP_FLAGS+=" -DGAPS_DEBUG " |
|
63 | 45 |
fi |
64 | 46 |
|
65 | 47 |
# set compile flags if warnings enabled |
... | ... |
@@ -1,11 +1,5 @@ |
1 |
-# include macros |
|
2 |
-m4_builtin([include], m4/ax_check_compile_flag.m4) |
|
3 |
-m4_builtin([include], m4/ax_compiler_vendor.m4) |
|
4 |
-m4_builtin([include], m4/ax_compiler_version.m4) |
|
5 |
-m4_builtin([include], m4/ax_openmp.m4) |
|
6 |
- |
|
7 | 1 |
# get version of CoGAPS from DESCRIPTION file |
8 |
-AC_INIT(CoGAPS, m4_esyscmd_s([awk -e '/^Version:/ {print $2}' Repo/DESCRIPTION])) |
|
2 |
+AC_INIT(CoGAPS, m4_esyscmd_s([awk -e '/^Version:/ {print $2}' DESCRIPTION])) |
|
9 | 3 |
|
10 | 4 |
# get C++ compiler from R configuration |
11 | 5 |
CXX=`"${R_HOME}/bin/R" CMD config CXX` |
... | ... |
@@ -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 |
|
... | ... |
@@ -1,8 +1,8 @@ |
1 | 1 |
# include macros |
2 |
-m4_builtin([include], ax_check_compile_flag.m4) |
|
3 |
-m4_builtin([include], ax_compiler_vendor.m4) |
|
4 |
-m4_builtin([include], ax_compiler_version.m4) |
|
5 |
-m4_builtin([include], ax_openmp.m4) |
|
2 |
+m4_builtin([include], m4/ax_check_compile_flag.m4) |
|
3 |
+m4_builtin([include], m4/ax_compiler_vendor.m4) |
|
4 |
+m4_builtin([include], m4/ax_compiler_version.m4) |
|
5 |
+m4_builtin([include], m4/ax_openmp.m4) |
|
6 | 6 |
|
7 | 7 |
# get version of CoGAPS from DESCRIPTION file |
8 | 8 |
AC_INIT(CoGAPS, m4_esyscmd_s([awk -e '/^Version:/ {print $2}' Repo/DESCRIPTION])) |
... | ... |
@@ -19,6 +19,10 @@ AC_PROG_CXX |
19 | 19 |
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], |
20 | 20 |
[build debug version of CoGAPS])], [build_debug=yes], [build_debug=no]) |
21 | 21 |
|
22 |
+# Check if compiling debug version with thread sanitizer |
|
23 |
+AC_ARG_ENABLE(debug_tsan, [AC_HELP_STRING([--enable-debug-tsan], |
|
24 |
+ [build debug version of CoGAPS])], [build_debug_tsan=yes], [build_debug_tsan=no]) |
|
25 |
+ |
|
22 | 26 |
# Check if compiler warnings should be turned on |
23 | 27 |
AC_ARG_ENABLE(warnings, [AC_HELP_STRING([--enable-warnings], |
24 | 28 |
[compile CoGAPS with warning messages])], [warnings=yes], [warnings=no]) |
... | ... |
@@ -47,7 +51,21 @@ echo "building on $ax_cv_cxx_compiler_vendor compiler version $ax_cv_cxx_compile |
47 | 51 |
# set compile flags for debug build |
48 | 52 |
if test "x$build_debug" = "xyes" ; then |
49 | 53 |
echo "Building Debug Version of CoGAPS" |
50 |
- GAPS_CPP_FLAGS+=" -DGAPS_DEBUG " |
|
54 |
+ GAPS_CPP_FLAGS+=" -DGAPS_DEBUG -fno-omit-frame-pointer " |
|
55 |
+ if test "x$ax_cv_cxx_compiler_vendor" = "xclang" ; then |
|
56 |
+ GAPS_CPP_FLAGS+=" -fsanitize=address -fsanitize=undefined " |
|
57 |
+ GAPS_LIBS+=" -fsanitize=address -fsanitize=undefined " |
|
58 |
+ elif test "x$ax_cv_cxx_compiler_vendor" = "xgnu" ; then |
|
59 |
+ GAPS_CPP_FLAGS+=" -fsanitize=address -fsanitize=undefined " |
|
60 |
+ GAPS_LIBS+=" -fsanitize=address -fsanitize=undefined " |
|
61 |
+ fi |
|
62 |
+elif test "x$build_debug_tsan" = "xyes" ; then |
|
63 |
+ echo "Building Debug Version of CoGAPS with thread sanitizer" |
|
64 |
+ GAPS_CPP_FLAGS+=" -DGAPS_DEBUG -fno-omit-frame-pointer " |
|
65 |
+ if test "x$ax_cv_cxx_compiler_vendor" = "xclang" ; then |
|
66 |
+ GAPS_CPP_FLAGS+=" -fsanitize=thread " |
|
67 |
+ GAPS_LIBS+=" -fsanitize=thread " |
|
68 |
+ fi |
|
51 | 69 |
fi |
52 | 70 |
|
53 | 71 |
# set compile flags if warnings enabled |
... | ... |
@@ -1,8 +1,8 @@ |
1 | 1 |
# include macros |
2 |
-m4_builtin([include], ax_check_compile_flag.m4) |
|
3 |
-m4_builtin([include], ax_compiler_vendor.m4) |
|
4 |
-m4_builtin([include], ax_compiler_version.m4) |
|
5 |
-m4_builtin([include], ax_openmp.m4) |
|
2 |
+m4_builtin([include], m4/ax_check_compile_flag.m4) |
|
3 |
+m4_builtin([include], m4/ax_compiler_vendor.m4) |
|
4 |
+m4_builtin([include], m4/ax_compiler_version.m4) |
|
5 |
+m4_builtin([include], m4/ax_openmp.m4) |
|
6 | 6 |
|
7 | 7 |
# get version of CoGAPS from DESCRIPTION file |
8 | 8 |
AC_INIT(CoGAPS, m4_esyscmd_s([awk -e '/^Version:/ {print $2}' Repo/DESCRIPTION])) |
... | ... |
@@ -1,77 +1,87 @@ |
1 |
-# include macros |
|
2 |
-m4_builtin([include], ax_check_compile_flag.m4) |
|
3 |
-m4_builtin([include], ax_compiler_vendor.m4) |
|
4 |
-m4_builtin([include], ax_compiler_version.m4) |
|
5 |
-m4_builtin([include], ax_openmp.m4) |
|
6 |
- |
|
7 |
-# get version of CoGAPS from DESCRIPTION file |
|
8 |
-AC_INIT(CoGAPS, m4_esyscmd_s([awk -e '/^Version:/ {print $2}' Repo/DESCRIPTION])) |
|
9 |
- |
|
10 |
-# get C++ compiler from R configuration |
|
11 |
-CXX=`"${R_HOME}/bin/R" CMD config CXX` |
|
12 |
- |
|
13 |
-# Switch to a C++ compiler, and check if it works. |
|
14 |
-AC_LANG(C++) |
|
15 |
-AC_REQUIRE_CPP |
|
16 |
-AC_PROG_CXX |
|
17 |
- |
|
18 |
-# Check if compiling debug version |
|
19 |
-AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], |
|
20 |
- [build debug version of CoGAPS])], [build_debug=yes], [build_debug=no]) |
|
21 |
- |
|
22 |
-# Check if specific version of SIMD instructions requested |
|
23 |
-AC_ARG_ENABLE(simd, [AC_HELP_STRING([--enable-simd], |
|
24 |
- [specify simd instruction set (sse, avx)])], |
|
25 |
- [simd_version=$enableval], [simd_version=sse]) |
|
26 |
- |
|
27 |
-# default CoGAPS specific flags |
|
28 |
-GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 " |
|
29 |
-GAPS_CXX_FLAGS= |
|
30 |
-GAPS_LIBS= |
|
31 |
- |
|
32 |
-# get compiler info |
|
33 |
-AX_COMPILER_VENDOR |
|
34 |
-AX_COMPILER_VERSION |
|
35 |
-AX_OPENMP |
|
36 |
- |
|
37 |
-# set openmp flags |
|
38 |
-GAPS_CXX_FLAGS+=" $OPENMP_CXXFLAGS " |
|
39 |
-GAPS_LIBS+=" $OPENMP_CXXFLAGS " |
|
40 |
- |
|
41 |
-echo "building on $ax_cv_cxx_compiler_vendor compiler version $ax_cv_cxx_compiler_version" |
|
42 |
- |
|
43 |
-# set compile flags for debug build |
|
44 |
-if test "x$build_debug" = "xyes" ; then |
|
45 |
- echo "Building Debug Version of CoGAPS" |
|
46 |
- GAPS_CPP_FLAGS+=" -DGAPS_DEBUG " |
|
47 |
- AX_CHECK_COMPILE_FLAG([-Wall], [GAPS_CXX_FLAGS+=" -Wall "]) |
|
48 |
- AX_CHECK_COMPILE_FLAG([-Wextra], [GAPS_CXX_FLAGS+=" -Wextra "]) |
|
49 |
- AX_CHECK_COMPILE_FLAG([-Werror], [GAPS_CXX_FLAGS+=" -Werror "]) |
|
50 |
-fi |
|
51 |
- |
|
52 |
-# set compile flags for SIMD |
|
53 |
-if test "x$simd_version" = "xsse" ; then |
|
54 |
- echo "Compiling with SSE instructions" |
|
55 |
- AX_CHECK_COMPILE_FLAG([-msse4.2], [GAPS_CXX_FLAGS+=" -msse4.2 "]) |
|
56 |
-elif test "x$simd_version" = "xyes" ; then |
|
57 |
- echo "Compiling with SSE instructions" |
|
58 |
- AX_CHECK_COMPILE_FLAG([-msse4.2], [GAPS_CXX_FLAGS+=" -msse4.2 "]) |
|
59 |
-elif test "x$simd_version" = "xavx" ; then |
|
60 |
- echo "Compiling with AVX instructions" |
|
61 |
- AX_CHECK_COMPILE_FLAG([-mavx], [GAPS_CXX_FLAGS+=" -mavx "]) |
|
62 |
-elif test "x$simd_version" = "xno" ; then |
|
63 |
- echo "Compiling without SIMD instructions" |
|
64 |
-else |
|
65 |
- echo "Error: Invalid SIMD type" |
|
66 |
- exit -1 |
|
67 |
-fi |
|
68 |
- |
|
69 |
-# export variables containing flags |
|
70 |
-AC_SUBST(GAPS_CPP_FLAGS) |
|
71 |
-AC_SUBST(GAPS_CXX_FLAGS) |
|
72 |
-AC_SUBST(GAPS_LIBS) |
|
73 |
- |
|
74 |
-# create makefile, output configure file |
|
75 |
-AC_CONFIG_FILES([src/Makevars]) |
|
76 |
-AC_OUTPUT |
|
77 |
- |
|
1 |
+# include macros |
|
2 |
+m4_builtin([include], ax_check_compile_flag.m4) |
|
3 |
+m4_builtin([include], ax_compiler_vendor.m4) |
|
4 |
+m4_builtin([include], ax_compiler_version.m4) |
|
5 |
+m4_builtin([include], ax_openmp.m4) |
|
6 |
+ |
|
7 |
+# get version of CoGAPS from DESCRIPTION file |
|
8 |
+AC_INIT(CoGAPS, m4_esyscmd_s([awk -e '/^Version:/ {print $2}' Repo/DESCRIPTION])) |
|
9 |
+ |
|
10 |
+# get C++ compiler from R configuration |
|
11 |
+CXX=`"${R_HOME}/bin/R" CMD config CXX` |
|
12 |
+ |
|
13 |
+# Switch to a C++ compiler, and check if it works. |
|
14 |
+AC_LANG(C++) |
|
15 |
+AC_REQUIRE_CPP |
|
16 |
+AC_PROG_CXX |
|
17 |
+ |
|
18 |
+# Check if compiling debug version |
|
19 |
+AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], |
|
20 |
+ [build debug version of CoGAPS])], [build_debug=yes], [build_debug=no]) |
|
21 |
+ |
|
22 |
+# Check if compiler warnings should be turned on |
|
23 |
+AC_ARG_ENABLE(warnings, [AC_HELP_STRING([--enable-warnings], |
|
24 |
+ [compile CoGAPS with warning messages])], [warnings=yes], [warnings=no]) |
|
25 |
+ |
|
26 |
+# Check if specific version of SIMD instructions requested |
|
27 |
+AC_ARG_ENABLE(simd, [AC_HELP_STRING([--enable-simd], |
|
28 |
+ [specify simd instruction set (sse, avx)])], |
|
29 |
+ [simd_version=$enableval], [simd_version=sse]) |
|
30 |
+ |
|
31 |
+# default CoGAPS specific flags |
|
32 |
+GAPS_CPP_FLAGS=" -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 " |
|
33 |
+GAPS_CXX_FLAGS= |
|
34 |
+GAPS_LIBS= |
|
35 |
+ |
|
36 |
+# get compiler info |
|