Commit 0d4e4974 authored by David Bommes's avatar David Bommes

changed

-Finders to support Fedora
-fixed some configuration issues (not installed libraries...)

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@129 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 686cfe9a
......@@ -16,6 +16,9 @@ if( QT4_FOUND)
add_definitions (-DQT4_FOUND)
# message( WARNING " USING QT4" )
endif ()
set (COMISO_QT4_CONFIG_FILE_SETTINGS "#define COMISO_QT4_AVAILABLE 1" )
else()
set (COMISO_QT4_CONFIG_FILE_SETTINGS "#define COMISO_QT4_AVAILABLE 0" )
endif ()
acg_get_version ()
......@@ -68,6 +71,13 @@ else ()
message (STATUS "SUITESPARSE not found!")
set (COMISO_SUITESPARSE_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_AVAILABLE 0" )
endif ()
# special handling, since spqr is incorrect in several distributions
if(SUITESPARSE_SPQR_VALID)
set (COMISO_SUITESPARSE_SPQR_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_SPQR_AVAILABLE 1" )
else()
message (STATUS "SUITESPARSE SPQR seems to be invalid!")
set (COMISO_SUITESPARSE_SPQR_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_SPQR_AVAILABLE 0" )
endif()
find_package (MPI)
if (MPI_FOUND )
......@@ -102,6 +112,18 @@ else ()
set (COMISO_TAO_CONFIG_FILE_SETTINGS "#define COMISO_TAO_AVAILABLE 0" )
endif ()
find_package (METIS)
if (METIS_FOUND )
set (COMISO_METIS_CONFIG_FILE_SETTINGS "#define COMISO_METIS_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${METIS_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_DIRECTORIES ${METIS_LIBRARY_DIRS} )
list( APPEND COMISO_LINK_LIBRARIES ${METIS_LIBRARIES} )
else()
set (COMISO_METIS_CONFIG_FILE_SETTINGS "#define COMISO_METIS_AVAILABLE 0" )
message (STATUS "METIS not found!")
endif ()
find_package (MUMPS)
if (MUMPS_FOUND )
set (COMISO_MUMPS_CONFIG_FILE_SETTINGS "#define COMISO_MUMPS_AVAILABLE 1" )
......@@ -173,6 +195,18 @@ else ()
set (COMISO_ARPACK_CONFIG_FILE_SETTINGS "#define COMISO_ARPACK_AVAILABLE 0" )
endif ()
find_package (CPLEX)
if (CPLEX_FOUND )
set (COMISO_CPLEX_CONFIG_FILE_SETTINGS "#define COMISO_CPLEX_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${CPLEX_INCLUDE_DIRS} )
# list( APPEND COMISO_LINK_DIRECTORIES ${CPLEX_LIBRARY_DIR} )
# list( APPEND COMISO_LINK_DIRECTORIES ${CPLEX_CONCERT_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${CPLEX_LIBRARIES} )
else ()
message (STATUS "CPLEX not found!")
set (COMISO_ARPACK_CONFIG_FILE_SETTINGS "#define COMISO_CPLEX_AVAILABLE 0" )
endif ()
include_directories (
..
${CMAKE_CURRENT_SOURCE_DIR}
......@@ -289,6 +323,9 @@ endif()
if( EXISTS "${CMAKE_SOURCE_DIR}/Examples/eigen_solver/CMakeLists.txt" )
add_subdirectory (Examples/eigen_solver)
endif()
if( EXISTS "${CMAKE_SOURCE_DIR}/Examples/small_nsolver/CMakeLists.txt" )
add_subdirectory (Examples/small_nsolver)
endif()
// Build time dependencies for CoMiso
@COMISO_QT4_CONFIG_FILE_SETTINGS@
@COMISO_BLAS_CONFIG_FILE_SETTINGS@
@COMISO_GMM_CONFIG_FILE_SETTINGS@
@COMISO_SUITESPARSE_CONFIG_FILE_SETTINGS@
@COMISO_SUITESPARSE_SPQR_CONFIG_FILE_SETTINGS@
@COMISO_MPI_CONFIG_FILE_SETTINGS@
@COMISO_HSL_CONFIG_FILE_SETTINGS@
@COMISO_PETSC_CONFIG_FILE_SETTINGS@
@COMISO_TAO_CONFIG_FILE_SETTINGS@
@COMISO_IPOPT_CONFIG_FILE_SETTINGS@
@COMISO_MUMPS_CONFIG_FILE_SETTINGS@
@COMISO_METIS_CONFIG_FILE_SETTINGS@
@COMISO_TAUCS_CONFIG_FILE_SETTINGS@
@COMISO_GUROBI_CONFIG_FILE_SETTINGS@
@COMISO_ARPACK_CONFIG_FILE_SETTINGS@
@COMISO_CPLEX_CONFIG_FILE_SETTINGS@
......@@ -9,6 +9,7 @@
//== INCLUDES =================================================================
#include "LinearConstraintHandlerElimination.hh"
#include <CoMISo/Solver/SparseQRSolver.hh>
//== NAMESPACES ===============================================================
......@@ -29,6 +30,9 @@ initialize( const MatrixT& _C, const VectorT& _c)
}
else
{
// require SPQR SOLVER!!!
#if(COMISO_SUITESPARSE_SPQR_AVAILABLE)
// Construct constraints basis form via QR-factorization (see Nocedal 426...)
// Constraints in basis transformation form x_orig = b_ + C_*x_reduced
// notice that C_ is a basis of the nullspace of the constraints
......@@ -93,6 +97,9 @@ initialize( const MatrixT& _C, const VectorT& _c)
// std::cerr << "rank: " << rank << std::endl;
// std::cerr << "dim Q = " << gmm::mat_nrows(Q) << " x " << gmm::mat_ncols(Q) << std::endl;
// std::cerr << "dim R = " << gmm::mat_nrows(R) << " x " << gmm::mat_ncols(R) << std::endl;
#else
std::cerr << "ERROR: SQPR-Solver required by LinearConstraintHandlerElimination not available !!!" << std::endl;
#endif
}
}
......
This diff is collapsed.
......@@ -20,6 +20,7 @@
#include <gmm/gmm.h>
#include "NProblemGmmInterface.hh"
#include "NProblemInterface.hh"
//== FORWARDDECLARATIONS ======================================================
......@@ -43,11 +44,13 @@ public:
/// Default constructor
TAOSolver() {}
/// Destructor
~TAOSolver() {}
// solve problem
static int solve( NProblemInterface* _base);
static int solve( NProblemGmmInterface* _base);
......@@ -63,10 +66,18 @@ private:
static int objective(TAO_APPLICATION,Vec,double*,void*);
static int gradient (TAO_APPLICATION,Vec,Vec ,void*);
static int hessian (TAO_APPLICATION,Vec,Mat*,Mat*,MatStructure*,void*);
static int objective2(TAO_APPLICATION,Vec,double*,void*);
static int gradient2 (TAO_APPLICATION,Vec,Vec ,void*);
static int hessian2 (TAO_APPLICATION,Vec,Mat*,Mat*,MatStructure*,void*);
#else
static PetscErrorCode objective(TaoSolver,Vec,double*,void*);
static PetscErrorCode gradient (TaoSolver,Vec,Vec ,void*);
static PetscErrorCode hessian (TaoSolver,Vec,Mat*,Mat*,MatStructure*,void*);
static PetscErrorCode objective2(TaoSolver,Vec,double*,void*);
static PetscErrorCode gradient2 (TaoSolver,Vec,Vec ,void*);
static PetscErrorCode hessian2 (TaoSolver,Vec,Mat*,Mat*,MatStructure*,void*);
#endif
private:
......
......@@ -32,9 +32,15 @@
//== INCLUDES =================================================================
#include <CoMISo/Config/config.hh>
//== BUILD-TIME DEPENDENCIES =================================================================
#if(COMISO_QT4_AVAILABLE)
//============================================================================================
#include "MISolverDialogUI.hh"
#ifdef QT4_FOUND
#include <QtGui>
//== NAMESPACES ===============================================================
......@@ -143,6 +149,6 @@ slotCancelButton()
//=============================================================================
} // namespace COMISO
//=============================================================================
//== BUILD-TIME DEPENDENCIES ==================================================
#endif
//=============================================================================
......@@ -34,10 +34,14 @@
#define COMISO_MISOLVERDIALOG_HH
#include <CoMISo/Config/config.hh>
//== BUILD-TIME DEPENDENCIES =================================================================
#if(COMISO_QT4_AVAILABLE)
//============================================================================================
//== INCLUDES =================================================================
// qmake users have to include
#ifdef QT4_FOUND
#include "ui_QtMISolverDialogBaseUI.hh"
// ACGMake users have to include
......
......@@ -26,7 +26,7 @@
#include <CoMISo/Config/config.hh>
#include "MISolver.hh"
#ifdef QT4_FOUND
#if(COMISO_QT4_AVAILABLE)
#include <CoMISo/QtWidgets/MISolverDialogUI.hh>
#endif
......@@ -155,6 +155,7 @@ MISolver::solve_direct_rounding(
const bool enable_performance_test = false;
// performance comparison code
#if(COMISO_SUITESPARSE_SPQR_AVAILABLE)
if(enable_performance_test)
{
sw.start();
......@@ -169,6 +170,7 @@ MISolver::solve_direct_rounding(
gmm::add(_x,gmm::scaled(x2,-1.0),res);
std::cerr << "DIFFERENCE IN RESULT: " << gmm::vect_norm2(res) << std::endl;
}
#endif
// performance comparison code
if(enable_performance_test)
......@@ -719,9 +721,11 @@ void
MISolver::
show_options_dialog()
{
#ifdef QT4_FOUND
#if(COMISO_QT4_AVAILABLE)
MISolverDialog* pd = new MISolverDialog(*this);
pd->exec();
#else
std::cerr << "Warning: Qt not available to show solver dialog!!!" << std::endl;
#endif
}
......
......@@ -36,6 +36,7 @@
//== INCLUDES =================================================================
#include <CoMISo/Config/CoMISoDefines.hh>
#include <CoMISo/Config/config.hh>
#include "GMM_Tools.hh"
#include "CholmodSolver.hh"
......@@ -354,7 +355,9 @@ private:
bool use_constraint_reordering_;
#if(COMISO_QT4_AVAILABLE)
friend class COMISO::MISolverDialog;
#endif
};
......
/*===========================================================================*\
/*===========================================================================*\
* *
* CoMISo *
* Copyright (C) 2008-2009 by Computer Graphics Group, RWTH Aachen *
......@@ -26,6 +26,10 @@
#include "SparseQRSolver.hh"
//== BUILD-TIME DEPENDENCIES =================================================================
#if(COMISO_SUITESPARSE_SPQR_AVAILABLE)
//============================================================================================
namespace COMISO {
......@@ -238,3 +242,7 @@ bool SparseQRSolver::solve( double * _x, double * _b)
}
//== BUILD-TIME DEPENDENCIES ==================================================
#endif
//=============================================================================
......@@ -37,6 +37,7 @@
#include <CoMISo/Config/CoMISoDefines.hh>
#include <CoMISo/Config/config.hh>
#include "GMM_Tools.hh"
#include <CoMISo/Utils/StopWatch.hh>
......@@ -44,6 +45,11 @@
#include <iostream>
#include <vector>
//== BUILD-TIME DEPENDENCIES =================================================================
#if(COMISO_SUITESPARSE_SPQR_AVAILABLE)
//============================================================================================
#include "SuiteSparseQR.hpp"
#include "cholmod.h"
......@@ -140,6 +146,8 @@ private:
#define COMISO_SPARSE_QR_SOLVER_TEMPLATES
#include "SparseQRSolverT.cc"
#endif
//== BUILD-TIME DEPENDENCIES ==================================================
#endif
//=============================================================================
#endif // COMISO_SPARSE_QR_SOLVER_HH defined
//=============================================================================
# - Try to find CPLEX
# Once done this will define
# CPLEX_FOUND - System has Cplex
# CPLEX_INCLUDE_DIRS - The Cplex include directories
# CPLEX_LIBRARIES - The libraries needed to use Cplex
if (CPLEX_INCLUDE_DIR)
# in cache already
set(CPLEX_FOUND TRUE)
else (CPLEX_INCLUDE_DIR)
if (WIN32)
#TODO #######################################################################
find_path(CPLEX_INCLUDE_DIR NAMES SRC/gurobi_c++.h
PATHS
"C:\\libs\\gurobi45"
${GUROBI_INCLUDE_PATH}
)
find_library( GUROBI_LIBRARY_RELEASE
SuperLU
PATHS "C:\\libs\\gurobi45\\lib" )
find_library( GUROBI_LIBRARY_DEBUG
SuperLUd
PATHS "C:\\libs\\gurobi45\\lib" )
set ( GUROBI_LIBRARY "optimized;${GUROBI_LIBRARY_RELEASE};debug;${GUROBI_LIBRARY_DEBUG}" CACHE STRING "GUROBI Libraries" )
ELSEIF(APPLE)
#TODO #######################################################################
find_path(GUROBI_INCLUDE_DIR NAMES gurobi_c++.h
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40"
${GUROBI_INCLUDE_PATH}
)
find_library( GUROBI_LIBRARY
SuperLU
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40")
ELSE( WIN32 )
find_path(CPLEX_INCLUDE_DIR NAMES ilcplex/cplex.h
PATHS "$ENV{CPLEX_DIR}/cplex/include"
)
find_path(CPLEX_CONCERT_INCLUDE_DIR NAMES ilconcert/ilomodel.h
PATHS "$ENV{CPLEX_DIR}/concert/include"
)
# MESSAGE(STATUS "CPLEX include dir: ${CPLEX_INCLUDE_DIR}")
# MESSAGE(STATUS "CPLEX concert include dir: ${CPLEX_CONCERT_INCLUDE_DIR}")
find_library( CPLEX_LIBRARY
cplex
PATHS "$ENV{CPLEX_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic" )
find_library( CPLEX_ILO_LIBRARY
ilocplex
PATHS "$ENV{CPLEX_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic" )
find_library( CPLEX_CONCERT_LIBRARY
concert
PATHS "$ENV{CPLEX_DIR}/concert/lib/x86-64_sles10_4.1/static_pic" )
ENDIF()
set(CPLEX_INCLUDE_DIRS "${CPLEX_INCLUDE_DIR};${CPLEX_CONCERT_INCLUDE_DIR}" )
set(CPLEX_LIBRARIES "${CPLEX_LIBRARY};${CPLEX_ILO_LIBRARY};${CPLEX_CONCERT_LIBRARY}" )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(CPLEX DEFAULT_MSG
CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
mark_as_advanced(CPLEX_INCLUDE_DIR CPLEX_LIBRARY )
endif(CPLEX_INCLUDE_DIR)
\ No newline at end of file
......@@ -37,6 +37,20 @@ if ( COMISO_INCLUDE_DIR )
endif()
STRING(REGEX MATCH "\#define COMISO_SUITESPARSE_AVAILABLE 1" COMISO_SUITESPARSE_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_SUITESPARSE_BUILD_TIME_AVAILABLE )
find_package(SUITESPARSE)
if ( NOT SUITESPARSE_FOUND )
message(ERROR "COMISO configured with Suitesparse but Suitesparse not available")
endif()
list (APPEND COMISO_OPT_DEPS "SUITESPARSE")
endif()
STRING(REGEX MATCH "\#define COMISO_PETSC_AVAILABLE 1" COMISO_PETSC_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_PETSC_BUILD_TIME_AVAILABLE )
......@@ -65,6 +79,20 @@ if ( COMISO_INCLUDE_DIR )
endif()
STRING(REGEX MATCH "\#define COMISO_METIS_AVAILABLE 1" COMISO_METIS_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_METIS_BUILD_TIME_AVAILABLE )
find_package(METIS)
if ( NOT METIS_FOUND )
message(ERROR "COMISO configured with Metis but Metis not available")
endif()
list (APPEND COMISO_OPT_DEPS "METIS")
endif()
STRING(REGEX MATCH "\#define COMISO_MUMPS_AVAILABLE 1" COMISO_MUMPS_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_MUMPS_BUILD_TIME_AVAILABLE )
......@@ -134,6 +162,20 @@ if ( COMISO_INCLUDE_DIR )
list (APPEND COMISO_OPT_DEPS "ARPACK")
endif()
STRING(REGEX MATCH "\#define COMISO_CPLEX_AVAILABLE 1" COMISO_CPLEX_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_CPLEX_BUILD_TIME_AVAILABLE )
find_package(CPLEX)
if ( NOT CPLEX_FOUND )
message(ERROR "COMISO configured with CPLEX but CPLEX not available")
endif()
list (APPEND COMISO_OPT_DEPS "CPLEX")
endif()
add_definitions (-DCOMISODLL -DUSECOMISO )
......
# - Try to find IPOPT
# Once done this will define
# IPOPT_FOUND - System has IpOpt
# IPOPT_INCLUDE_DIRS - The IpOpt include directories
# IPOPT_LIBRARY_DIRS - The library directories needed to use IpOpt
# IPOPT_LIBRARIES - The libraries needed to use IpOpt
if (IPOPT_INCLUDE_DIR)
# in cache already
SET(IPOPT_FIND_QUIETLY TRUE)
......@@ -42,36 +50,41 @@ ELSEIF(APPLE)
ELSE( WIN32 )
find_path(IPOPT_INCLUDE_DIR NAMES IpNLP.hpp
PATHS "/usr/include/coin"
${IPOPT_INCLUDE_PATH}
PATHS "$ENV{IPOPT_HOME}/include/coin"
"/usr/include/coin"
)
# MESSAGE(STATUS "$ENV{IPOPT_HOME}/include")
IF(IPOPT_INCLUDE_DIR)
SET(IPOPT_FOUND TRUE)
SET(IPOPT_INCLUDE_DIR ${IPOPT_INCLUDE_DIR})
#wrong config under Debian workaround
add_definitions( -DHAVE_CSTDDEF )
# SET(IPOPT_LIBRARY_DIR "$ENV{IPOPT_DIR}/lib/$ENV{IPOPT_ARCH}/" CACHE PATH "Path to IPOPT Library")
# SET(IPOPT_LIBRARY "tao;taopetsc;taofortran" CACHE STRING "IPOPT Libraries")
# MESSAGE(STATUS "${IPOPT_LIBRARY_DIR}")
# MESSAGE(STATUS "${IPOPT_LIBRARY}")
ELSE(IPOPT_INCLUDE_DIR)
SET(IPOPT_FOUND FALSE)
SET(IPOPT_INCLUDE_DIR ${IPOPT_INCLUDE_DIR})
ENDIF(IPOPT_INCLUDE_DIR)
find_library( IPOPT_LIBRARY
ipopt
PATHS "/usr/lib" )
PATHS "$ENV{IPOPT_HOME}/lib"
"/usr/lib" )
#wrong config under Debian workaround
add_definitions( -DHAVE_CSTDDEF )
# set optional path to HSL Solver
find_path(IPOPT_HSL_LIBRARY_DIR NAMES libhsl.so
PATHS "$ENV{HOME}/opt/HSL/lib"
PATHS "$ENV{IPOPT_HSL_LIBRARY_PATH}"
"$ENV{HOME}/opt/HSL/lib"
)
IF( IPOPT_HSL_LIBRARY_DIR)
set(IPOPT_LIBRARY_DIR ${IPOPT_HSL_LIBRARY_DIR})
ENDIF(IPOPT_HSL_LIBRARY_DIR)
set(IPOPT_INCLUDE_DIRS "${IPOPT_INCLUDE_DIR}" )
set(IPOPT_LIBRARIES "${IPOPT_LIBRARY}" )
set(IPOPT_LIBRARY_DIRS "${IPOPT_HSL_LIBRARY_DIR}")
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(IPOPT DEFAULT_MSG
IPOPT_LIBRARY IPOPT_INCLUDE_DIR)
mark_as_advanced(IPOPT_INCLUDE_DIR IPOPT_LIBRARY )
ENDIF()
# - Try to find METIS
# Once done this will define
# METIS_FOUND - System has Metis
# METIS_INCLUDE_DIRS - The Metis include directories
# METIS_LIBRARY_DIRS - The library directories needed to use Metis
# METIS_LIBRARIES - The libraries needed to use Metis
if (METIS_INCLUDE_DIR)
# in cache already
SET(METIS_FIND_QUIETLY TRUE)
endif (METIS_INCLUDE_DIR)
find_path(METIS_INCLUDE_DIR NAMES metis.h
PATHS "$ENV{IPOPT_HOME}/ThirdParty/Metis/metis-4.0/Lib/"
"/usr/include/"
"/usr/include/metis"
)
find_library( METIS_LIBRARY
metis coinmetis
PATHS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib" )
set(METIS_INCLUDE_DIRS "${METIS_INCLUDE_DIR}" )
set(METIS_LIBRARIES "${METIS_LIBRARY}" )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(METIS DEFAULT_MSG
METIS_LIBRARY METIS_INCLUDE_DIR)
mark_as_advanced(METIS_INCLUDE_DIR METIS_LIBRARY )
\ No newline at end of file
# - Try to find MUMPS
# Once done this will define
# MUMPS_FOUND - System has Mumps
# MUMPS_INCLUDE_DIRS - The Mumps include directories
# MUMPS_LIBRARY_DIRS - The library directories needed to use Mumps
# MUMPS_LIBRARIES - The libraries needed to use Mumps
if (MUMPS_INCLUDE_DIR)
# in cache already
SET(MUMPS_FIND_QUIETLY TRUE)
endif (MUMPS_INCLUDE_DIR)
if (WIN32)
#TODO
ELSEIF(APPLE)
#TODO
ELSE( WIN32 )
find_path(MUMPS_INCLUDE_DIR NAMES dmumps_c.h
PATHS "/usr/include/"
find_path(MUMPS_INCLUDE_DIR NAMES dmumps_c.h
PATHS "$ENV{IPOPT_HOME}/ThirdParty/Mumps/MUMPS/include/"
"/usr/include/"
)
find_library( MUMPS_LIBRARY
dmumps coinmumps
PATHS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib" )
set(MUMPS_INCLUDE_DIRS "${MUMPS_INCLUDE_DIR}" )
set(MUMPS_LIBRARIES "${MUMPS_LIBRARY}" )
IF(MUMPS_INCLUDE_DIR)
SET(MUMPS_FOUND TRUE)
SET(MUMPS_INCLUDE_DIR ${MUMPS_INCLUDE_DIR})
ELSE(MUMPS_INCLUDE_DIR)
SET(MUMPS_FOUND FALSE)
SET(MUMPS_INCLUDE_DIR ${IPOPT_INCLUDE_DIR})
ENDIF(MUMPS_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(MUMPS DEFAULT_MSG
MUMPS_LIBRARY MUMPS_INCLUDE_DIR)
find_library( MUMPS_LIBRARY
dmumps
PATHS "/usr/lib" )
ENDIF()
mark_as_advanced(MUMPS_INCLUDE_DIR MUMPS_LIBRARY )
\ No newline at end of file
......@@ -8,7 +8,7 @@
# SUITESPARSE_SPQR_LIBRARY_DIR - name of spqr library (necessary due to error in debian package)
# SUITESPARSE_LIBRARY_DIR - Library main directory containing suitesparse libs
# SUITESPARSE_LIBRARY_DIRS - all Library directories containing suitesparse libs
#
# SUITESPARSE_SPQR_VALID - automatic identification whether or not spqr package is installed correctly
IF (SUITESPARSE_INCLUDE_DIRS)
# Already in cache, be silent
......@@ -50,13 +50,18 @@ else( WIN32 )
ELSE(APPLE)
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS /usr/local/include /usr/include /usr/include/suitesparse/ ${CMAKE_SOURCE_DIR}/MacOS/Libs/cholmod
PATHS /usr/local/include
/usr/include
/usr/include/suitesparse/
${CMAKE_SOURCE_DIR}/MacOS/Libs/cholmod
PATH_SUFFIXES cholmod/ CHOLMOD/ )
FIND_PATH( SUITESPARSE_LIBRARY_DIR
NAMES libcholmod.so
PATHS /usr/lib /usr/lib64 /usr/local/lib )
PATHS /usr/lib
/usr/lib64
/usr/local/lib )
ENDIF(APPLE)
......@@ -88,14 +93,23 @@ else( WIN32 )
IF (SUITESPARSE_METIS_LIBRARY)
list ( APPEND SUITESPARSE_LIBRARIES metis)
ENDIF(SUITESPARSE_METIS_LIBRARY)
if(EXISTS "${CHOLMOD_INCLUDE_DIR}/SuiteSparseQR.hpp")
SET(SUITESPARSE_SPQR_VALID TRUE CACHE BOOL "SuiteSparseSPQR valid")
else()
SET(SUITESPARSE_SPQR_VALID false CACHE BOOL "SuiteSparseSPQR valid")
endif()
if(SUITESPARSE_SPQR_VALID)
FIND_LIBRARY( SUITESPARSE_SPQR_LIBRARY
NAMES spqr
PATHS ${SUITESPARSE_LIBRARY_DIR} )
IF (SUITESPARSE_SPQR_LIBRARY)
list ( APPEND SUITESPARSE_LIBRARIES spqr)
ENDIF (SUITESPARSE_SPQR_LIBRARY)
endif()
FIND_LIBRARY( SUITESPARSE_SPQR_LIBRARY
NAMES spqr
PATHS ${SUITESPARSE_LIBRARY_DIR} )
IF (SUITESPARSE_SPQR_LIBRARY)
list ( APPEND SUITESPARSE_LIBRARIES spqr)
ENDIF (SUITESPARSE_SPQR_LIBRARY)
ENDIF( SUITESPARSE_LIBRARY_DIR )
ENDIF( SUITESPARSE_LIBRARY_DIR )
endif( WIN32 )
......
......@@ -47,11 +47,11 @@ find_path(TAO_INCLUDE_DIR NAMES "include/tao.h"
#check VERSION 1.x or 2
IF(IS_DIRECTORY "$ENV{TAO_DIR}/lib/$ENV{PETSC_ARCH}/")
MESSAGE(STATUS "TAO Version 1.x")
# MESSAGE(STATUS "TAO Version 1.x")
SET(TAO_LIBRARY_DIR "$ENV{TAO_DIR}/lib/$ENV{PETSC_ARCH}/" CACHE PATH "Path to TAO Library")
SET(TAO_LIBRARY "tao;taopetsc;taofortran" CACHE STRING "TAO Libraries")
ELSE(IS_DIRECTORY "$ENV{TAO_DIR}/lib/$ENV{PETSC_ARCH}/") #VERSION 2
MESSAGE(STATUS "TAO Version 2.x")
# MESSAGE(STATUS "TAO Version 2.x")
SET(TAO_LIBRARY_DIR "$ENV{TAO_DIR}/$ENV{PETSC_ARCH}/lib" CACHE PATH "Path to TAO Library")
SET(TAO_LIBRARY "tao" CACHE STRING "TAO Libraries")
ENDIF(IS_DIRECTORY "$ENV{TAO_DIR}/lib/$ENV{PETSC_ARCH}/")
......
Markdown is supported
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