Python和科学计算认证群组  - 讨论区

标题:SuiteSparse-3.6.1 + METIS-4.0.3的CMake构建patch

2011年08月16日 星期二 11:31

在Windows平台下手动编译Scipy,如果需要高性能的稀疏矩阵处理
需要首先构建SuiteSparse + METIS库
而这两个库只提供了UNIX环境下的Makefile
于是我自己动手给这两个库搞了一个CMake构建脚本

构建过程:
1. 下载SuiteSparse-3.6.1和METIS-4.0.3的代码(注意!5.0版不能用)
   解压,并将METIS-4.0.3目录树移动到SuiteSparse里,改名为metis-4.0
2. 打上后面的patch
3. 打开CMake GUI,选择输出VS2008工程
4. 用VS2008打开输出的.sln文件,编译安装,安装后得到如下文件:
 - libufconfig/libamd/libcamd/libcolamd/libccolamd/libcholmod/libumfpack的头文件
 - 一个holistic的libsuitesparse.{dll,lib},包含上面所有库的导出symbol
5. 可以手动编译SuiteSparse中自带的demo并运行,运行libcholmod的demo时要跟编译出的库使用
   同一个CRT


注意事项:
    这组脚本中没有检测BLAC/LAPACK,而是直接用了MKL
    请根据自己的情况修改SuiteSparse/CMakeLists.txt

SuiteSparse-METIS-CMake.patch文件内容(也可从文件共享区下载)
======================================================================

# HG changeset patch
# User Simpson@Simpson-Laptop
# Date 1313422043 -28800
# Node ID 962f928cd6373d10a2b362b2a6015b09f87e0bb9
# Parent  bd330bb9c312cd870f40dc89070d84b1346a79f3
libsuitesparse build 1, includes:
libufconfig
libamd
libcamd
libcolamd
libccolamd
libcholmod
libumfpack

diff -r bd330bb9c312 -r 962f928cd637 AMD/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/AMD/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+add_subdirectory(Include)
+add_subdirectory(Lib)
diff -r bd330bb9c312 -r 962f928cd637 AMD/Include/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/AMD/Include/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,1 @@
+install(FILES amd.h DESTINATION include)
diff -r bd330bb9c312 -r 962f928cd637 AMD/Lib/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/AMD/Lib/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,18 @@
+include_directories(../Include ${PROJECT_SOURCE_DIR}/UFconfig)
+
+set(libamd_sources
+    ../Include/amd.h ../Include/amd_internal.h
+    ../Source/amd_aat.c ../Source/amd_1.c ../Source/amd_2.c
+    ../Source/amd_dump.c ../Source/amd_postorder.c ../Source/amd_post_tree.c
+    ../Source/amd_defaults.c ../Source/amd_order.c ../Source/amd_control.c
+    ../Source/amd_info.c ../Source/amd_valid.c ../Source/amd_preprocess.c)
+
+add_library(libamd_dint STATIC EXCLUDE_FROM_ALL ${libamd_sources})
+set_target_properties(libamd_dint PROPERTIES COMPILE_DEFINITIONS "DINT")
+
+add_library(libamd_dlong STATIC EXCLUDE_FROM_ALL ${libamd_sources})
+set_target_properties(libamd_dlong PROPERTIES COMPILE_DEFINITIONS "DLONG")
+
+add_library(libamd STATIC EXCLUDE_FROM_ALL
+    ../Include/amd.h ../Include/amd_internal.h ../Source/amd_global.c)
+target_link_libraries(libamd libamd_dint libamd_dlong libufconfig)
diff -r bd330bb9c312 -r 962f928cd637 CAMD/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CAMD/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+add_subdirectory(Include)
+add_subdirectory(Lib)
diff -r bd330bb9c312 -r 962f928cd637 CAMD/Include/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CAMD/Include/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,1 @@
+install(FILES camd.h DESTINATION include)
diff -r bd330bb9c312 -r 962f928cd637 CAMD/Lib/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CAMD/Lib/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,18 @@
+include_directories(../Include ${PROJECT_SOURCE_DIR}/UFconfig)
+
+set(libcamd_sources
+    ../Include/camd.h ../Include/camd_internal.h
+    ../Source/camd_aat.c ../Source/camd_1.c ../Source/camd_2.c
+    ../Source/camd_dump.c ../Source/camd_postorder.c ../Source/camd_defaults.c
+    ../Source/camd_order.c ../Source/camd_control.c ../Source/camd_info.c
+    ../Source/camd_valid.c ../Source/camd_preprocess.c)
+
+add_library(libcamd_dint STATIC EXCLUDE_FROM_ALL ${libcamd_sources})
+set_target_properties(libcamd_dint PROPERTIES COMPILE_DEFINITIONS "DINT")
+
+add_library(libcamd_dlong STATIC EXCLUDE_FROM_ALL ${libcamd_sources})
+set_target_properties(libcamd_dlong PROPERTIES COMPILE_DEFINITIONS "DLONG")
+
+add_library(libcamd STATIC EXCLUDE_FROM_ALL
+    ../Include/camd.h ../Include/camd_internal.h ../Source/camd_global.c)
+target_link_libraries(libcamd libcamd_dint libcamd_dlong libufconfig)
diff -r bd330bb9c312 -r 962f928cd637 CCOLAMD/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CCOLAMD/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+add_subdirectory(Include)
+add_subdirectory(Lib)
diff -r bd330bb9c312 -r 962f928cd637 CCOLAMD/Include/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CCOLAMD/Include/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,1 @@
+install(FILES ccolamd.h DESTINATION include)
diff -r bd330bb9c312 -r 962f928cd637 CCOLAMD/Lib/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CCOLAMD/Lib/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,14 @@
+include_directories(../Include ${PROJECT_SOURCE_DIR}/UFconfig)
+
+set(libccolamd_sources
+    ../Include/ccolamd.h ../Source/ccolamd.c)
+
+add_library(libccolamd_dint STATIC EXCLUDE_FROM_ALL ${libccolamd_sources})
+set_target_properties(libccolamd_dint PROPERTIES COMPILE_DEFINITIONS "DINT")
+
+add_library(libccolamd_dlong STATIC EXCLUDE_FROM_ALL ${libccolamd_sources})
+set_target_properties(libccolamd_dlong PROPERTIES COMPILE_DEFINITIONS "DLONG")
+
+add_library(libccolamd STATIC EXCLUDE_FROM_ALL
+    ../Include/ccolamd.h ../Source/ccolamd_global.c)
+target_link_libraries(libccolamd libccolamd_dint libccolamd_dlong libufconfig)
diff -r bd330bb9c312 -r 962f928cd637 CHOLMOD/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CHOLMOD/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+add_subdirectory(Include)
+add_subdirectory(Lib)
diff -r bd330bb9c312 -r 962f928cd637 CHOLMOD/Include/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CHOLMOD/Include/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,5 @@
+install(FILES
+    cholmod.h cholmod_io64.h cholmod_config.h cholmod_core.h cholmod_check.h
+    cholmod_cholesky.h cholmod_matrixops.h cholmod_modify.h cholmod_partition.h
+    cholmod_supernodal.h
+    DESTINATION include)
diff -r bd330bb9c312 -r 962f928cd637 CHOLMOD/Lib/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CHOLMOD/Lib/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,124 @@
+include_directories(../Include
+    ${PROJECT_SOURCE_DIR}/UFconfig
+    ${PROJECT_SOURCE_DIR}/AMD/Include
+    ${PROJECT_SOURCE_DIR}/CAMD/Include
+    ${PROJECT_SOURCE_DIR}/COLAMD/Include
+    ${PROJECT_SOURCE_DIR}/CCOLAMD/Include
+    ${PROJECT_SOURCE_DIR}/metis-4.0/Lib)
+
+set(libcholmod_headers
+    ../Include/cholmod.h
+    ../Include/cholmod_blas.h
+    ../Include/cholmod_check.h
+    ../Include/cholmod_cholesky.h
+    ../Include/cholmod_complexity.h
+    ../Include/cholmod_config.h
+    ../Include/cholmod_core.h
+    ../Include/cholmod_internal.h
+    ../Include/cholmod_matrixops.h
+    ../Include/cholmod_modify.h
+    ../Include/cholmod_partition.h
+    ../Include/cholmod_supernodal.h
+    ../Include/cholmod_template.h)
+
+set(libcholmod_core_sources
+    ../Core/cholmod_aat.c
+    ../Core/cholmod_add.c
+    ../Core/cholmod_band.c
+    ../Core/cholmod_change_factor.c
+    ../Core/cholmod_common.c
+    ../Core/cholmod_complex.c
+    ../Core/cholmod_copy.c
+    ../Core/cholmod_dense.c
+    ../Core/cholmod_error.c
+    ../Core/cholmod_factor.c
+    ../Core/cholmod_memory.c
+    ../Core/cholmod_sparse.c
+    ../Core/cholmod_transpose.c
+    ../Core/cholmod_triplet.c)
+
+set(libcholmod_check_sources
+    ../Check/cholmod_check.c
+    ../Check/cholmod_read.c
+    ../Check/cholmod_write.c)
+
+set(libcholmod_cholesky_sources
+    ../Cholesky/cholmod_amd.c
+    ../Cholesky/cholmod_analyze.c
+    ../Cholesky/cholmod_colamd.c
+    ../Cholesky/cholmod_etree.c
+    ../Cholesky/cholmod_factorize.c
+    ../Cholesky/cholmod_postorder.c
+    ../Cholesky/cholmod_rcond.c
+    ../Cholesky/cholmod_resymbol.c
+    ../Cholesky/cholmod_rowcolcounts.c
+    ../Cholesky/cholmod_rowfac.c
+    ../Cholesky/cholmod_solve.c
+    ../Cholesky/cholmod_spsolve.c)
+
+set(libcholmod_matrixops_sources
+    ../MatrixOps/cholmod_drop.c
+    ../MatrixOps/cholmod_horzcat.c
+    ../MatrixOps/cholmod_norm.c
+    ../MatrixOps/cholmod_scale.c
+    ../MatrixOps/cholmod_sdmult.c
+    ../MatrixOps/cholmod_ssmult.c
+    ../MatrixOps/cholmod_submatrix.c
+    ../MatrixOps/cholmod_vertcat.c
+    ../MatrixOps/cholmod_symmetry.c)
+
+set(libcholmod_partition_sources
+    ../Partition/cholmod_ccolamd.c
+    ../Partition/cholmod_csymamd.c
+    ../Partition/cholmod_metis.c
+    ../Partition/cholmod_nesdis.c
+    ../Partition/cholmod_camd.c)
+
+set(libcholmod_modify_sources
+    ../Modify/cholmod_rowadd.c
+    ../Modify/cholmod_rowdel.c
+    ../Modify/cholmod_updown.c)
+
+set(libcholmod_supernodal_sources
+    ../SuperNodal/cholmod_super_numeric.c
+    ../SuperNodal/cholmod_super_solve.c
+    ../SuperNodal/cholmod_super_symbolic.c)
+
+set(libcholmod_templates
+    ../Core/t_cholmod_change_factor.c
+    ../Core/t_cholmod_dense.c
+    ../Core/t_cholmod_transpose.c
+    ../Core/t_cholmod_triplet.c
+    ../Cholesky/t_cholmod_lsolve.c
+    ../Cholesky/t_cholmod_ltsolve.c
+    ../Cholesky/t_cholmod_rowfac.c
+    ../Cholesky/t_cholmod_solve.c
+    ../Modify/t_cholmod_updown.c
+    ../Modify/t_cholmod_updown_numkr.c
+    ../MatrixOps/t_cholmod_sdmult.c
+    ../SuperNodal/t_cholmod_super_numeric.c
+    ../SuperNodal/t_cholmod_super_solve.c)
+
+set(libcholmod_sources
+    ${libcholmod_headers}
+    ${libcholmod_core_sources}
+    ${libcholmod_check_sources}
+    ${libcholmod_cholesky_sources}
+    ${libcholmod_matrixops_sources}
+    ${libcholmod_partition_sources}
+    ${libcholmod_modify_sources}
+    ${libcholmod_supernodal_sources})
+
+add_library(libcholmod_dint STATIC EXCLUDE_FROM_ALL ${libcholmod_sources})
+set_target_properties(libcholmod_dint PROPERTIES COMPILE_DEFINITIONS "DINT")
+add_dependencies(libcholmod_dint ${libcholmod_templates})
+
+add_library(libcholmod_dlong STATIC EXCLUDE_FROM_ALL ${libcholmod_sources})
+set_target_properties(libcholmod_dlong PROPERTIES COMPILE_DEFINITIONS "DLONG")
+add_dependencies(libcholmod_dlong ${libcholmod_templates})
+
+add_library(libcholmod STATIC EXCLUDE_FROM_ALL
+    ${libcholmod_headers} dummy.c)
+target_link_libraries(libcholmod
+    libcholmod_dint libcholmod_dlong
+    libamd libcamd libcolamd libccolamd libufconfig libmetis ${MKL_LIBRARIES})
diff -r bd330bb9c312 -r 962f928cd637 CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 2.8)
+project(SuiteSparse-3.6.1)
+
+link_directories("C:/Intel/ComposerXE-2011/mkl/lib/intel64")
+set(MKL_LIBRARIES mkl_rt.lib)
+
+add_subdirectory(UFconfig)
+add_subdirectory(AMD)
+add_subdirectory(CAMD)
+add_subdirectory(COLAMD)
+add_subdirectory(CCOLAMD)
+add_subdirectory(metis-4.0)
+add_subdirectory(CHOLMOD)
+add_subdirectory(UMFPACK)
+
+add_library(libsuitesparse SHARED dummy.c libsuitesparse.def)
+target_link_libraries(libsuitesparse
+    libufconfig libamd libcamd libcolamd libccolamd libcholmod libumfpack)
+
+install(TARGETS libsuitesparse
+    RUNTIME DESTINATION bin
+    LIBRARY DESTINATION lib
+    ARCHIVE DESTINATION lib)
diff -r bd330bb9c312 -r 962f928cd637 COLAMD/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/COLAMD/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+add_subdirectory(Include)
+add_subdirectory(Lib)
diff -r bd330bb9c312 -r 962f928cd637 COLAMD/Include/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/COLAMD/Include/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,1 @@
+install(FILES colamd.h DESTINATION include)
diff -r bd330bb9c312 -r 962f928cd637 COLAMD/Lib/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/COLAMD/Lib/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,14 @@
+include_directories(../Include ${PROJECT_SOURCE_DIR}/UFconfig)
+
+set(libcolamd_sources
+    ../Include/colamd.h ../Source/colamd.c)
+
+add_library(libcolamd_dint STATIC EXCLUDE_FROM_ALL ${libcolamd_sources})
+set_target_properties(libcolamd_dint PROPERTIES COMPILE_DEFINITIONS "DINT")
+
+add_library(libcolamd_dlong STATIC EXCLUDE_FROM_ALL ${libcolamd_sources})
+set_target_properties(libcolamd_dlong PROPERTIES COMPILE_DEFINITIONS "DLONG")
+
+add_library(libcolamd STATIC EXCLUDE_FROM_ALL
+    ../Include/colamd.h ../Source/colamd_global.c)
+target_link_libraries(libcolamd libcolamd_dint libcolamd_dlong libufconfig)
diff -r bd330bb9c312 -r 962f928cd637 UFconfig/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UFconfig/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,3 @@
+install(FILES UFconfig.h DESTINATION include)
+
+add_library(libufconfig STATIC EXCLUDE_FROM_ALL UFconfig.h UFconfig.c)
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+add_subdirectory(Include)
+add_subdirectory(Lib)
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/Include/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/Include/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,35 @@
+install(FILES
+    umfpack.h
+    umfpack_symbolic.h
+    umfpack_numeric.h
+    umfpack_solve.h
+    umfpack_free_symbolic.h
+    umfpack_free_numeric.h
+    umfpack_defaults.h
+    umfpack_qsymbolic.h
+    umfpack_wsolve.h
+    umfpack_triplet_to_col.h
+    umfpack_col_to_triplet.h
+    umfpack_transpose.h
+    umfpack_scale.h
+    umfpack_get_lunz.h
+    umfpack_get_numeric.h
+    umfpack_get_symbolic.h
+    umfpack_save_numeric.h
+    umfpack_load_numeric.h
+    umfpack_save_symbolic.h
+    umfpack_load_symbolic.h
+    umfpack_get_determinant.h
+    umfpack_report_status.h
+    umfpack_report_info.h
+    umfpack_report_control.h
+    umfpack_report_matrix.h
+    umfpack_report_triplet.h
+    umfpack_report_vector.h
+    umfpack_report_symbolic.h
+    umfpack_report_numeric.h
+    umfpack_report_perm.h
+    umfpack_timer.h
+    umfpack_tictoc.h
+    umfpack_global.h
+    DESTINATION include)
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/Lib/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/Lib/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,153 @@
+include_directories(../Include
+    ${PROJECT_SOURCE_DIR}/UFconfig
+    ${PROJECT_SOURCE_DIR}/AMD/Include
+    ${PROJECT_SOURCE_DIR}/CAMD/Include
+    ${PROJECT_SOURCE_DIR}/COLAMD/Include
+    ${PROJECT_SOURCE_DIR}/CCOLAMD/Include
+    ${PROJECT_SOURCE_DIR}/CHOLMOD/Include)
+
+set(libumfpack_headers
+    ../Include/umfpack.h
+    ../Include/umfpack_symbolic.h
+    ../Include/umfpack_numeric.h
+    ../Include/umfpack_solve.h
+    ../Include/umfpack_free_symbolic.h
+    ../Include/umfpack_free_numeric.h
+    ../Include/umfpack_defaults.h
+    ../Include/umfpack_qsymbolic.h
+    ../Include/umfpack_wsolve.h
+    ../Include/umfpack_triplet_to_col.h
+    ../Include/umfpack_col_to_triplet.h
+    ../Include/umfpack_transpose.h
+    ../Include/umfpack_scale.h
+    ../Include/umfpack_get_lunz.h
+    ../Include/umfpack_get_numeric.h
+    ../Include/umfpack_get_symbolic.h
+    ../Include/umfpack_save_numeric.h
+    ../Include/umfpack_load_numeric.h
+    ../Include/umfpack_save_symbolic.h
+    ../Include/umfpack_load_symbolic.h
+    ../Include/umfpack_get_determinant.h
+    ../Include/umfpack_report_status.h
+    ../Include/umfpack_report_info.h
+    ../Include/umfpack_report_control.h
+    ../Include/umfpack_report_matrix.h
+    ../Include/umfpack_report_triplet.h
+    ../Include/umfpack_report_vector.h
+    ../Include/umfpack_report_symbolic.h
+    ../Include/umfpack_report_numeric.h
+    ../Include/umfpack_report_perm.h
+    ../Include/umfpack_timer.h
+    ../Include/umfpack_tictoc.h
+    ../Include/umfpack_global.h)
+
+set(libumfpack_sources
+    ../Source/umf_analyze.c
+    ../Source/umf_apply_order.c
+    ../Source/umf_assemble.c
+    ../Source/umf_blas3_update.c
+    ../Source/umf_build_tuples.c
+    ../Source/umf_cholmod.c
+    ../Source/umf_colamd.c
+    ../Source/umf_create_element.c
+    ../Source/umf_dump.c
+    ../Source/umf_extend_front.c
+    ../Source/umf_free.c
+    ../Source/umf_fsize.c
+    ../Source/umf_garbage_collection.c
+    ../Source/umf_get_memory.c
+    ../Source/umf_grow_front.c
+    ../Source/umf_init_front.c
+    ../Source/umf_is_permutation.c
+    ../Source/umf_kernel.c
+    ../Source/umf_kernel_init.c
+    ../Source/umf_kernel_wrapup.c
+    ../Source/umf_local_search.c
+    ../Source/umf_lsolve.c
+    ../Source/umf_ltsolve.c
+    ../Source/umf_malloc.c
+    ../Source/umf_mem_alloc_element.c
+    ../Source/umf_mem_alloc_head_block.c
+    ../Source/umf_mem_alloc_tail_block.c
+    ../Source/umf_mem_free_tail_block.c
+    ../Source/umf_mem_init_memoryspace.c
+    ../Source/umf_realloc.c
+    ../Source/umf_report_perm.c
+    ../Source/umf_report_vector.c
+    ../Source/umf_row_search.c
+    ../Source/umf_scale.c
+    ../Source/umf_scale_column.c
+    ../Source/umf_set_stats.c
+    ../Source/umf_singletons.c
+    ../Source/umf_solve.c
+    ../Source/umf_start_front.c
+    ../Source/umf_store_lu.c
+    ../Source/umf_symbolic_usage.c
+    ../Source/umf_transpose.c
+    ../Source/umf_triplet.c
+    ../Source/umf_tuple_lengths.c
+    ../Source/umf_usolve.c
+    ../Source/umf_utsolve.c
+    ../Source/umf_valid_numeric.c
+    ../Source/umf_valid_symbolic.c
+    ../Source/umfpack_col_to_triplet.c
+    ../Source/umfpack_defaults.c
+    ../Source/umfpack_free_numeric.c
+    ../Source/umfpack_free_symbolic.c
+    ../Source/umfpack_get_determinant.c
+    ../Source/umfpack_get_lunz.c
+    ../Source/umfpack_get_numeric.c
+    ../Source/umfpack_get_symbolic.c
+    ../Source/umfpack_load_numeric.c
+    ../Source/umfpack_load_symbolic.c
+    ../Source/umfpack_numeric.c
+    ../Source/umfpack_qsymbolic.c
+    ../Source/umfpack_report_control.c
+    ../Source/umfpack_report_info.c
+    ../Source/umfpack_report_matrix.c
+    ../Source/umfpack_report_numeric.c
+    ../Source/umfpack_report_perm.c
+    ../Source/umfpack_report_status.c
+    ../Source/umfpack_report_symbolic.c
+    ../Source/umfpack_report_triplet.c
+    ../Source/umfpack_report_vector.c
+    ../Source/umfpack_save_numeric.c
+    ../Source/umfpack_save_symbolic.c
+    ../Source/umfpack_scale.c
+    ../Source/umfpack_solve.c
+    ../Source/umfpack_symbolic.c
+    ../Source/umfpack_transpose.c
+    ../Source/umfpack_triplet_to_col.c
+    umf_assemble_fixq.c
+    umf_store_lu_drop.c
+    umf_triplet_m.c
+    umf_triplet_v.c
+    umf_triplet_mv.c
+    umf_lhsolve.c
+    umf_uhsolve.c
+    umfpack_wslove.c)
+
+set(libumfpack_sources
+    ${libumfpack_headers}
+    ${libumfpack_sources})
+
+add_library(libumfpack_dint STATIC EXCLUDE_FROM_ALL ${libumfpack_sources})
+set_target_properties(libumfpack_dint PROPERTIES COMPILE_DEFINITIONS "DINT")
+
+add_library(libumfpack_dlong STATIC EXCLUDE_FROM_ALL ${libumfpack_sources})
+set_target_properties(libumfpack_dlong PROPERTIES COMPILE_DEFINITIONS "DLONG")
+
+add_library(libumfpack_zint STATIC EXCLUDE_FROM_ALL ${libumfpack_sources})
+set_target_properties(libumfpack_zint PROPERTIES COMPILE_DEFINITIONS "ZINT")
+
+add_library(libumfpack_zlong STATIC EXCLUDE_FROM_ALL ${libumfpack_sources})
+set_target_properties(libumfpack_zlong PROPERTIES COMPILE_DEFINITIONS "ZLONG")
+
+add_library(libumfpack STATIC EXCLUDE_FROM_ALL
+    ${libumfpack_headers}
+    ../Source/umfpack_global.c
+    ../Source/umfpack_timer.c
+    ../Source/umfpack_tictoc.c)
+target_link_libraries(libumfpack
+    libumfpack_dint libumfpack_dlong libumfpack_zint libumfpack_zlong
+    libufconfig libamd libcamd libcolamd libccolamd libcholmod ${MKL_LIBRARIES})
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/Lib/umf_assemble_fixq.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/Lib/umf_assemble_fixq.c Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+#define FIXQ
+#include "../Source/umf_assemble.c"
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/Lib/umf_lhsolve.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/Lib/umf_lhsolve.c Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+#define CONJUGATE_SOLVE
+#include "../Source/umf_ltsolve.c"
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/Lib/umf_store_lu_drop.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/Lib/umf_store_lu_drop.c Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+#define DROP
+#include "../Source/umf_store_lu.c"
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/Lib/umf_triplet_m.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/Lib/umf_triplet_m.c Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+#define DO_MAP
+#include "../Source/umf_triplet.c"
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/Lib/umf_triplet_mv.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/Lib/umf_triplet_mv.c Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,3 @@
+#define DO_MAP
+#define DO_VALUES
+#include "../Source/umf_triplet.c"
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/Lib/umf_triplet_v.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/Lib/umf_triplet_v.c Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+#define DO_VALUES
+#include "../Source/umf_triplet.c"
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/Lib/umf_uhsolve.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/Lib/umf_uhsolve.c Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+#define CONJUGATE_SOLVE
+#include "../Source/umf_utsolve.c"
diff -r bd330bb9c312 -r 962f928cd637 UMFPACK/Lib/umfpack_wslove.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UMFPACK/Lib/umfpack_wslove.c Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,2 @@
+#define WSOLVE
+#include "../Source/umfpack_solve.c"
diff -r bd330bb9c312 -r 962f928cd637 libsuitesparse.def
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libsuitesparse.def Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,480 @@
+LIBRARY libsuitesparse.dll
+EXPORTS
+
+UFmalloc
+UFfree
+
+amd_order
+amd_l_order
+amd_2
+amd_l2
+amd_valid
+amd_l_valid
+amd_defaults
+amd_l_defaults
+amd_control
+amd_l_control
+amd_info
+amd_l_info
+amd_malloc
+amd_free
+amd_realloc
+amd_calloc
+amd_printf
+
+camd_order
+camd_l_order
+camd_2
+camd_l2
+camd_valid
+camd_l_valid
+camd_cvalid
+camd_l_cvalid
+camd_defaults
+camd_l_defaults
+camd_control
+camd_l_control
+camd_info
+camd_l_info
+camd_malloc
+camd_free
+camd_realloc
+camd_calloc
+camd_printf
+
+colamd_recommended
+colamd_l_recommended
+colamd_set_defaults
+colamd_l_set_defaults
+colamd
+colamd_l
+colamd_report
+colamd_l_report
+symamd
+symamd_l
+symamd_report
+symamd_l_report
+colamd_printf
+
+ccolamd_recommended
+ccolamd_l_recommended
+ccolamd_set_defaults
+ccolamd_l_set_defaults
+ccolamd
+ccolamd_l
+ccolamd_report
+ccolamd_l_report
+ccolamd2
+ccolamd2_l
+ccolamd_apply_order
+ccolamd_l_apply_order
+ccolamd_fsize
+ccolamd_l_fsize
+ccolamd_postorder
+ccolamd_l_postorder
+ccolamd_post_tree
+ccolamd_l_post_tree
+csymamd
+csymamd_l
+csymamd_report
+csymamd_l_report
+ccolamd_printf
+
+cholmod_start
+cholmod_l_start
+cholmod_finish
+cholmod_l_finish
+cholmod_defaults
+cholmod_l_defaults
+cholmod_maxrank
+cholmod_l_maxrank
+cholmod_allocate_work
+cholmod_l_allocate_work
+cholmod_free_work
+cholmod_l_free_work
+cholmod_clear_flag
+cholmod_l_clear_flag
+cholmod_error
+cholmod_l_error
+cholmod_dbound
+cholmod_l_dbound
+cholmod_hypot
+cholmod_l_hypot
+cholmod_divcomplex
+cholmod_l_divcomplex
+cholmod_allocate_sparse
+cholmod_l_allocate_sparse
+cholmod_free_sparse
+cholmod_l_free_sparse
+cholmod_reallocate_sparse
+cholmod_l_reallocate_sparse
+cholmod_nnz
+cholmod_l_nnz
+cholmod_speye
+cholmod_l_speye
+cholmod_spzeros
+cholmod_l_spzeros
+cholmod_transpose
+cholmod_l_transpose
+cholmod_transpose_unsym
+cholmod_l_transpose_unsym
+cholmod_transpose_sym
+cholmod_l_transpose_sym
+cholmod_ptranspose
+cholmod_l_ptranspose
+cholmod_sort
+cholmod_l_sort
+cholmod_band
+cholmod_l_band
+cholmod_band_inplace
+cholmod_l_band_inplace
+cholmod_aat
+cholmod_l_aat
+cholmod_copy_sparse
+cholmod_l_copy_sparse
+cholmod_copy
+cholmod_l_copy
+cholmod_add
+cholmod_l_add
+cholmod_sparse_xtype
+cholmod_l_sparse_xtype
+cholmod_allocate_factor
+cholmod_l_allocate_factor
+cholmod_free_factor
+cholmod_l_free_factor
+cholmod_reallocate_factor
+cholmod_l_reallocate_factor
+cholmod_change_factor
+cholmod_l_change_factor
+cholmod_pack_factor
+cholmod_l_pack_factor
+cholmod_reallocate_column
+cholmod_l_reallocate_column
+cholmod_factor_to_sparse
+cholmod_l_factor_to_sparse
+cholmod_copy_factor
+cholmod_l_copy_factor
+cholmod_factor_xtype
+cholmod_l_factor_xtype
+cholmod_allocate_dense
+cholmod_l_allocate_dense
+cholmod_zeros
+cholmod_l_zeros
+cholmod_ones
+cholmod_l_ones
+cholmod_eye
+cholmod_l_eye
+cholmod_free_dense
+cholmod_l_free_dense
+cholmod_sparse_to_dense
+cholmod_l_sparse_to_dense
+cholmod_dense_to_sparse
+cholmod_l_dense_to_sparse
+cholmod_copy_dense
+cholmod_l_copy_dense
+cholmod_copy_dense2
+cholmod_l_copy_dense2
+cholmod_dense_xtype
+cholmod_l_dense_xtype
+cholmod_allocate_triplet
+cholmod_l_allocate_triplet
+cholmod_free_triplet
+cholmod_l_free_triplet
+cholmod_reallocate_triplet
+cholmod_l_reallocate_triplet
+cholmod_sparse_to_triplet
+cholmod_l_sparse_to_triplet
+cholmod_triplet_to_sparse
+cholmod_l_triplet_to_sparse
+cholmod_copy_triplet
+cholmod_l_copy_triplet
+cholmod_triplet_xtype
+cholmod_l_triplet_xtype
+cholmod_malloc
+cholmod_l_malloc
+cholmod_calloc
+cholmod_l_calloc
+cholmod_free
+cholmod_l_free
+cholmod_realloc
+cholmod_l_realloc
+cholmod_realloc_multiple
+cholmod_l_realloc_multiple
+cholmod_check_common
+cholmod_l_check_common
+cholmod_print_common
+cholmod_l_print_common
+cholmod_check_sparse
+cholmod_l_check_sparse
+cholmod_print_sparse
+cholmod_l_print_sparse
+cholmod_check_dense
+cholmod_l_check_dense
+cholmod_print_dense
+cholmod_l_print_dense
+cholmod_check_factor
+cholmod_l_check_factor
+cholmod_print_factor
+cholmod_l_print_factor
+cholmod_check_triplet
+cholmod_l_check_triplet
+cholmod_print_triplet
+cholmod_l_print_triplet
+cholmod_check_subset
+cholmod_l_check_subset
+cholmod_print_subset
+cholmod_l_print_subset
+cholmod_check_perm
+cholmod_l_check_perm
+cholmod_print_perm
+cholmod_l_print_perm
+cholmod_check_parent
+cholmod_l_check_parent
+cholmod_print_parent
+cholmod_l_print_parent
+cholmod_read_sparse
+cholmod_l_read_sparse
+cholmod_read_triplet
+cholmod_l_read_triplet
+cholmod_read_dense
+cholmod_l_read_dense
+cholmod_read_matrix
+cholmod_l_read_matrix
+cholmod_write_sparse
+cholmod_l_write_sparse
+cholmod_write_dense
+cholmod_l_write_dense
+cholmod_analyze
+cholmod_l_analyze
+cholmod_analyze_p
+cholmod_l_analyze_p
+cholmod_analyze_p2
+cholmod_l_analyze_p2
+cholmod_factorize
+cholmod_l_factorize
+cholmod_factorize_p
+cholmod_l_factorize_p
+cholmod_solve
+cholmod_l_solve
+cholmod_spsolve
+cholmod_l_spsolve
+cholmod_etree
+cholmod_l_etree
+cholmod_rowcolcounts
+cholmod_l_rowcolcounts
+cholmod_analyze_ordering
+cholmod_l_analyze_ordering
+cholmod_amd
+cholmod_l_amd
+cholmod_colamd
+cholmod_l_colamd
+cholmod_rowfac
+cholmod_l_rowfac
+cholmod_rowfac_mask
+cholmod_l_rowfac_mask
+cholmod_row_subtree
+cholmod_l_row_subtree
+cholmod_row_lsubtree
+cholmod_l_row_lsubtree
+cholmod_resymbol
+cholmod_l_resymbol
+cholmod_resymbol_noperm
+cholmod_l_resymbol_noperm
+cholmod_rcond
+cholmod_l_rcond
+cholmod_postorder
+cholmod_l_postorder
+cholmod_drop
+cholmod_l_drop
+cholmod_norm_dense
+cholmod_l_norm_dense
+cholmod_norm_sparse
+cholmod_l_norm_sparse
+cholmod_horzcat
+cholmod_l_horzcat
+cholmod_scale
+cholmod_l_scale
+cholmod_sdmult
+cholmod_l_sdmult
+cholmod_ssmult
+cholmod_l_ssmult
+cholmod_submatrix
+cholmod_l_submatrix
+cholmod_vertcat
+cholmod_l_vertcat
+cholmod_symmetry
+cholmod_l_symmetry
+cholmod_updown
+cholmod_l_updown
+cholmod_updown_solve
+cholmod_l_updown_solve
+cholmod_updown_mark
+cholmod_l_updown_mark
+cholmod_updown_mask
+cholmod_l_updown_mask
+cholmod_rowadd
+cholmod_l_rowadd
+cholmod_rowadd_solve
+cholmod_l_rowadd_solve
+cholmod_rowadd_mark
+cholmod_l_rowadd_mark
+cholmod_rowdel
+cholmod_l_rowdel
+cholmod_rowdel_solve
+cholmod_l_rowdel_solve
+cholmod_rowdel_mark
+cholmod_l_rowdel_mark
+cholmod_nested_dissection
+cholmod_l_nested_dissection
+cholmod_metis
+cholmod_l_metis
+cholmod_ccolamd
+cholmod_l_ccolamd
+cholmod_csymamd
+cholmod_l_csymamd
+cholmod_camd
+cholmod_l_camd
+cholmod_bisect
+cholmod_l_bisect
+cholmod_metis_bisector
+cholmod_l_metis_bisector
+cholmod_collapse_septree
+cholmod_l_collapse_septree
+cholmod_super_symbolic
+cholmod_l_super_symbolic
+cholmod_super_symbolic2
+cholmod_l_super_symbolic2
+cholmod_super_numeric
+cholmod_l_super_numeric
+cholmod_super_lsolve
+cholmod_l_super_lsolve
+cholmod_super_ltsolve
+cholmod_l_super_ltsolve
+
+umfpack_di_symbolic
+umfpack_dl_symbolic
+umfpack_zi_symbolic
+umfpack_zl_symbolic
+umfpack_di_numeric
+umfpack_dl_numeric
+umfpack_zi_numeric
+umfpack_zl_numeric
+umfpack_di_solve
+umfpack_dl_solve
+umfpack_zi_solve
+umfpack_zl_solve
+umfpack_di_free_symbolic
+umfpack_dl_free_symbolic
+umfpack_zi_free_symbolic
+umfpack_zl_free_symbolic
+umfpack_di_free_numeric
+umfpack_dl_free_numeric
+umfpack_zi_free_numeric
+umfpack_zl_free_numeric
+umfpack_di_defaults
+umfpack_dl_defaults
+umfpack_zi_defaults
+umfpack_zl_defaults
+umfpack_di_qsymbolic
+umfpack_dl_qsymbolic
+umfpack_zi_qsymbolic
+umfpack_zl_qsymbolic
+umfpack_di_fsymbolic
+umfpack_dl_fsymbolic
+umfpack_zi_fsymbolic
+umfpack_zl_fsymbolic
+umfpack_di_wsolve
+umfpack_dl_wsolve
+umfpack_zi_wsolve
+umfpack_zl_wsolve
+umfpack_di_triplet_to_col
+umfpack_dl_triplet_to_col
+umfpack_zi_triplet_to_col
+umfpack_zl_triplet_to_col
+umfpack_di_col_to_triplet
+umfpack_dl_col_to_triplet
+umfpack_zi_col_to_triplet
+umfpack_zl_col_to_triplet
+umfpack_di_transpose
+umfpack_dl_transpose
+umfpack_zi_transpose
+umfpack_zl_transpose
+umfpack_di_scale
+umfpack_dl_scale
+umfpack_zi_scale
+umfpack_zl_scale
+umfpack_di_get_lunz
+umfpack_dl_get_lunz
+umfpack_zi_get_lunz
+umfpack_zl_get_lunz
+umfpack_di_get_numeric
+umfpack_dl_get_numeric
+umfpack_zi_get_numeric
+umfpack_zl_get_numeric
+umfpack_di_get_symbolic
+umfpack_dl_get_symbolic
+umfpack_zi_get_symbolic
+umfpack_zl_get_symbolic
+umfpack_di_save_numeric
+umfpack_dl_save_numeric
+umfpack_zi_save_numeric
+umfpack_zl_save_numeric
+umfpack_di_load_numeric
+umfpack_dl_load_numeric
+umfpack_zi_load_numeric
+umfpack_zl_load_numeric
+umfpack_di_save_symbolic
+umfpack_dl_save_symbolic
+umfpack_zi_save_symbolic
+umfpack_zl_save_symbolic
+umfpack_di_load_symbolic
+umfpack_dl_load_symbolic
+umfpack_zi_load_symbolic
+umfpack_zl_load_symbolic
+umfpack_di_get_determinant
+umfpack_dl_get_determinant
+umfpack_zi_get_determinant
+umfpack_zl_get_determinant
+umfpack_di_report_status
+umfpack_dl_report_status
+umfpack_zi_report_status
+umfpack_zl_report_status
+umfpack_di_report_info
+umfpack_dl_report_info
+umfpack_zi_report_info
+umfpack_zl_report_info
+umfpack_di_report_control
+umfpack_dl_report_control
+umfpack_zi_report_control
+umfpack_zl_report_control
+umfpack_di_report_matrix
+umfpack_dl_report_matrix
+umfpack_zi_report_matrix
+umfpack_zl_report_matrix
+umfpack_di_report_triplet
+umfpack_dl_report_triplet
+umfpack_zi_report_triplet
+umfpack_zl_report_triplet
+umfpack_di_report_vector
+umfpack_dl_report_vector
+umfpack_zi_report_vector
+umfpack_zl_report_vector
+umfpack_di_report_symbolic
+umfpack_dl_report_symbolic
+umfpack_zi_report_symbolic
+umfpack_zl_report_symbolic
+umfpack_di_report_numeric
+umfpack_dl_report_numeric
+umfpack_zi_report_numeric
+umfpack_zl_report_numeric
+umfpack_di_report_perm
+umfpack_dl_report_perm
+umfpack_zi_report_perm
+umfpack_zl_report_perm
+umfpack_timer
+umfpack_tic
+umfpack_toc
+umfpack_hypot
+umfpack_divcomplex
+umf_hypot
+umf_divcomplex
diff -r bd330bb9c312 -r 962f928cd637 metis-4.0/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/metis-4.0/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,1 @@
+add_subdirectory(Lib)
diff -r bd330bb9c312 -r 962f928cd637 metis-4.0/Lib/CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/metis-4.0/Lib/CMakeLists.txt Mon Aug 15 23:27:23 2011 +0800
@@ -0,0 +1,18 @@
+include_directories(.)
+
+add_library(libmetis STATIC EXCLUDE_FROM_ALL
+    metis.h defs.h struct.h macros.h rename.h proto.h
+    coarsen.c fm.c initpart.c match.c ccgraph.c memory.c
+    pmetis.c pqueue.c refine.c util.c timing.c debug.c
+    bucketsort.c graph.c stat.c kmetis.c kwayrefine.c
+    kwayfm.c balance.c ometis.c srefine.c sfm.c separator.c
+    mincover.c mmd.c mesh.c meshpart.c frename.c fortran.c
+    myqsort.c compress.c parmetis.c estmem.c
+    mpmetis.c mcoarsen.c mmatch.c minitpart.c mbalance.c
+    mrefine.c mutil.c mfm.c mkmetis.c mkwayrefine.c mkwayfmh.c
+    mrefine2.c minitpart2.c mbalance2.c mfm2.c
+    kvmetis.c kwayvolrefine.c kwayvolfm.c subdomains.c)
+
+if(MSVC)
+    set_target_properties(libmetis PROPERTIES COMPILE_DEFINITIONS __VC__)
+endif()
diff -r bd330bb9c312 -r 962f928cd637 metis-4.0/Lib/metis.h
--- a/metis-4.0/Lib/metis.h Mon Aug 15 21:29:17 2011 +0800
+++ b/metis-4.0/Lib/metis.h Mon Aug 15 23:27:23 2011 +0800
@@ -18,7 +18,7 @@
 #else
 #include <malloc.h>
 #endif
-#include <strings.h>
+
 #include <string.h>
 #include <ctype.h>
 #include <math.h>
@@ -29,9 +29,9 @@
 #include <dmalloc.h>
 #endif
 
-#include <defs.h>
-#include <struct.h>
-#include <macros.h>
-#include <rename.h>
-#include <proto.h>
+#include "defs.h"
+#include "struct.h"
+#include "macros.h"
+#include "rename.h"
+#include "proto.h"
 

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号