Commit c50aadf2 authored by David Bommes's avatar David Bommes
Browse files

Mac build updates + minor fixes

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@165 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 09a36906
......@@ -28,8 +28,11 @@ solve(const MatrixT& _A,
{
#if COMISO_ARPACK_AVAILABLE
Matrix A(_A);
// ARSymStdEig<double, Matrix> eig_prob(A.matrix().cols(), _n_eigvalues, &A, &Matrix::mult_Mv, (char*)_which_eigs,
// 0, 0.0, 2000);
ARSymStdEig<double, Matrix> eig_prob(A.matrix().cols(), _n_eigvalues, &A, &Matrix::mult_Mv, (char*)_which_eigs,
0, 0.0, 2000);
0, 0.0, 100000);
int n_converged = eig_prob.FindEigenvectors();
......
......@@ -14,18 +14,18 @@ acg_append_files (sources "*.cc" ${directories})
acg_drop_templates (sources)
if (WIN32)
acg_add_executable (small_nleast_squares WIN32 ${sources} ${headers} )
acg_add_executable (small_nsolver WIN32 ${sources} ${headers} )
elseif (APPLE)
# generate bundle on mac
acg_add_executable (small_nleast_squares MACOSX_BUNDLE ${sources} ${headers} )
acg_add_executable (small_nsolver MACOSX_BUNDLE ${sources} ${headers} )
else ()
acg_add_executable (small_nleast_squares ${sources} ${headers} )
acg_add_executable (small_nsolver ${sources} ${headers} )
endif ()
# enable rpath linking
set_target_properties(small_nleast_squares PROPERTIES INSTALL_RPATH_USE_LINK_PATH 1)
set_target_properties(small_nsolver PROPERTIES INSTALL_RPATH_USE_LINK_PATH 1)
target_link_libraries (small_nleast_squares
target_link_libraries (small_nsolver
CoMISo
${COMISO_LINK_LIBRARIES}
)
......
......@@ -23,10 +23,15 @@
\*===========================================================================*/
#include <CoMISo/Config/config.hh>
#include <CoMISo/Utils/StopWatch.hh>
#include <vector>
#include <cstdlib>
#include <iostream>
//------------------------------------------------------------------------------------------------------
#if COMISO_SUITESPARSE_SPQR_AVAILABLE // additional spqr library required
//------------------------------------------------------------------------------------------------------
#include <CoMISo/Utils/StopWatch.hh>
#include <Eigen/Sparse>
#include <CoMISo/Solver/SparseQRSolver.hh>
#include <CoMISo/Solver/Eigen_Tools.hh>
......@@ -159,3 +164,13 @@ int main(void)
return 0;
}
#else // COMISO_SUITESPARSE_SPQR_AVAILABLE
int main(void)
{
std::cerr << " SUITESPARSE_SPQR not available, please re-configure!\n";
return 0;
}
#endif // COMISO_SUITESPARSE_SPQR_AVAILABLE
......@@ -133,6 +133,8 @@ MISolver::solve_cplex(
for(unsigned int i=0; i<n; ++i)
objective -= 2*_rhs[i]*vars[i];
// ToDo: objective correction!!!
// _A.jc[c+1]
// _A.pr[write]
// _A.ir[write]
......
......@@ -15,6 +15,7 @@ GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH )
FIND_PATH(Eigen3_INCLUDE_DIR NAMES Eigen/Dense
PATHS /usr/include/eigen3
/usr/local/include
/usr/local/include/eigen3/
/opt/local/include/eigen3/
"c:\\libs\\eigen3\\include"
"c:\\libs\\eigen\\include"
......
......@@ -40,11 +40,13 @@ if( WIN32 )
else( WIN32 )
IF( APPLE)
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS /opt/local/include/ufsparse )
PATHS /opt/local/include/ufsparse
/usr/local/include)
FIND_PATH( SUITESPARSE_LIBRARY_DIR
NAMES libcholmod.a
PATHS /opt/local/lib )
PATHS /opt/local/lib
/usr/local/lib)
......@@ -86,6 +88,11 @@ else( WIN32 )
# list ( APPEND SUITESPARSE_LIBRARIES spqr)
list ( APPEND SUITESPARSE_LIBRARIES umfpack)
IF( APPLE )
list ( APPEND SUITESPARSE_LIBRARIES tbb)
list ( APPEND SUITESPARSE_LIBRARIES suitesparseconfig)
ENDIF( APPLE )
# Metis and spqr are optional
FIND_LIBRARY( SUITESPARSE_METIS_LIBRARY
NAMES metis
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment