Skip to content

Commit a3ca7e8

Browse files
committed
Backport OpenBLAS and CMake changes to 1.2.7
1 parent c56e183 commit a3ca7e8

File tree

23 files changed

+1903
-775
lines changed

23 files changed

+1903
-775
lines changed

dynadjust/CMakeLists.txt

Lines changed: 1553 additions & 500 deletions
Large diffs are not rendered by default.

dynadjust/FindXercesC.cmake

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ SET (PKG_MGR_PATH_INCLUDE /usr/include)
2121

2222
# SET THE ROOT DIRECTORY WHERE XERCES-C++ IS INSTALLED
2323
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
24-
# Apple
25-
SET (XERCESC_ROOT_DIR /usr/local/Cellar/xerces-c/3.2.2)
24+
# Apple - try homebrew locations first
25+
IF (EXISTS /opt/homebrew/opt/xerces-c)
26+
SET (XERCESC_ROOT_DIR /opt/homebrew/opt/xerces-c)
27+
ELSEIF (EXISTS /usr/local/opt/xerces-c)
28+
SET (XERCESC_ROOT_DIR /usr/local/opt/xerces-c)
29+
ELSE()
30+
SET (XERCESC_ROOT_DIR /usr/local/Cellar/xerces-c/3.2.2)
31+
ENDIF()
2632
SET (XERCESC_LIBRARY_DIR ${XERCESC_ROOT_DIR}/lib)
2733
SET (XERCESC_INCLUDE_DIR ${XERCESC_ROOT_DIR}/include)
2834

@@ -75,4 +81,9 @@ IF (EXISTS ${XERCESC_INCLUDE_DIR})
7581
ENDIF ()
7682
ENDIF ()
7783

84+
# Set CMake-style variables for compatibility
85+
SET(XercesC_INCLUDE_DIRS ${XERCESC_INCLUDE_DIR})
86+
SET(XercesC_LIBRARIES ${XERCESC_LIBRARY})
87+
SET(XercesC_FOUND ${XERCESC_FOUND})
88+
7889
mark_as_advanced(XERCESC_LIBRARY)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Static build optimisations for DynAdjust
2+
# This file is included when BUILD_STATIC is ON

dynadjust/dynadjust/dnaadjust/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# <dnaadjust/...> build rules
22
project (dnaadjust)
33

4-
add_definitions(-DBUILD_DNAADJUST_DLL -DBUILD_EXPORTDNATYPES -DMULTI_THREAD_ADJUST -DMKL_ILP64 -fopenmp)
4+
add_definitions(-DBUILD_DNAADJUST_DLL -DBUILD_EXPORTDNATYPES -DMULTI_THREAD_ADJUST -DMKL_ILP64)
55

66
include_directories (${PROJECT_SOURCE_DIR})
77

dynadjust/dynadjust/dnaadjust/dnaadjust.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ void dna_adjust::InitialiseAdjustment()
208208

209209
// Confidence interval
210210
double conf(projectSettings_.a.confidence_interval * 0.01);
211-
normal dist(0.0, 1.0);
211+
boost::math::normal normal_dist(0.0, 1.0);
212212
conf += (1.0 - conf) / 2.0;
213-
criticalValue_ = quantile(dist, conf);
213+
criticalValue_ = boost::math::quantile(normal_dist, conf);
214214

215215
potentialOutlierCount_ = 0;
216216

dynadjust/dynadjust/dnaadjust/dnaadjust.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
#endif
3030
#endif
3131

32-
#include <mkl.h>
32+
// MKL/BLAS/LAPACK is included via dnamatrix_contiguous.hpp
33+
// #include <mkl.h>
3334

3435
#include <exception>
3536
#include <stdexcept>

dynadjust/dynadjust/dnaadjust/precompile.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
// Support MKL inverse oly if compiler is Intel
1313
#if defined(__ICC) || defined(__INTEL_COMPILER) // Intel compiler
14-
#include <mkl.h>
14+
// MKL/BLAS/LAPACK is included via dnamatrix_contiguous.hpp
15+
// #include <mkl.h>
1516
#endif
1617

1718
#include <include/config/dnaexports.hpp>

dynadjust/dynadjust/dnaadjustwrapper/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project (dnaadjustwrapper)
44
# build dnaadjust library first
55
add_subdirectory (${CMAKE_SOURCE_DIR}/dynadjust/dnaadjust ${CMAKE_BINARY_DIR}/dynadjust/dnaadjust)
66

7-
add_definitions (-DBUILD_ADJUST_EXE -DMULTI_THREAD_ADJUST -DMKL_ILP64 -fopenmp)
7+
add_definitions (-DBUILD_ADJUST_EXE -DMULTI_THREAD_ADJUST -DMKL_ILP64)
88

99
include_directories (${PROJECT_SOURCE_DIR})
1010

dynadjust/dynadjust/dnaadjustwrapper/dnaadjustwrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,8 +1164,8 @@ int main(int argc, char* argv[])
11641164
cout << " " << leafStr<string>(p.a.bst_file) << " last modified on " << ctime(&t_bst);
11651165
cout << " " << leafStr<string>(p.a.bms_file) << " last modified on " << ctime(&t_bms) << endl;
11661166
cout << " " << leafStr<string>(p.a.seg_file) << " created on " << ctime(&t_seg) << endl;
1167-
cout << " Run 'segment " << p.g.network_name << " [options]' to re-create the segmentation file, or re-run" << endl <<
1168-
" adjust using the --" << SEG_FILE << " option if the file " << basename(p.a.seg_file) << " must\n be used." << endl << endl;
1167+
cout << " Run 'segment " << p.g.network_name << " [options]' to re-create the segmentation file, or re-run" << endl <<
1168+
" adjust using the --" << SEG_FILE << " option if the file " << path(p.a.seg_file).filename().string() << " must\n be used." << endl << endl;
11691169
cout_mutex.unlock();
11701170
return EXIT_FAILURE;
11711171
}

dynadjust/dynadjust/dnaimport/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# <dnaimport/...> build rules
22
project (dnaimport)
33

4-
add_definitions(-DBUILD_DNAIMPORT_DLL -DBUILD_EXPORTDNATYPES -DMKL_ILP64 -fopenmp)
4+
add_definitions(-DBUILD_DNAIMPORT_DLL -DBUILD_EXPORTDNATYPES -DMKL_ILP64)
55

66
include_directories (${PROJECT_SOURCE_DIR})
77

0 commit comments

Comments
 (0)