Compared to build Trilinos by visual studio, it is easier to build Trilinos in cygwin. Because lots of external libararies, such as pthread, zlib, HDF5, blas and lapack, suitesparse, could be installed by setup script of cygwin by just one click. There are also many libararies be compilered by cygwin much easier that VS. But, we could only obtains a win32 library by cygwin!
The build process is quite like that here. The configure files looks like:
#!/bin/sh
EXTRA_ARGS=$@
rm -r CMakeCache.txt CMakeFiles/
cmake \
-D Trilinos_ENABLE_TESTS:BOOL=ON \
-D CMAKE_CXX_COMPILER:FILEPATH=/usr/local/bin/mpic++ \
-D CMAKE_CXX_FLAGS:STRING="-D__cplusplus" \
-D CMAKE_C_COMPILER:FILEPATH=/usr/local/bin/mpicc \
-D CMAKE_Fortran_COMPILER:FILEPATH=/usr/local/bin/mpif90 \
-D TPL_ENABLE_MPI:BOOL=ON \
-D TPL_ENABLE_HDF5:BOOL=ON \
-D TPL_ENABLE_UMFPACK:BOOL=ON \
-D TPL_ENABLE_AMD:BOOL=ON \
-D TPL_ENABLE_BLAS:BOOL=ON \
-D TPL_ENABLE_LAPACK:BOOL=ON \
-D TPL_ENABLE_Zlib:BOOL=ON \
-D TPL_ENABLE_Pthread:BOOL=ON \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_AztecOO:BOOL=ON \
-D Trilinos_ENABLE_Anasazi:BOOL=ON \
-D Trilinos_ENABLE_Amesos:BOOL=ON \
-D Trilinos_ENABLE_Ifpack:BOOL=ON \
-D Trilinos_ENABLE_FEI:BOOL=ON \
-D Trilinos_ENABLE_ML:BOOL=ON \
-D Trilinos_ENABLE_NOX:BOOL=ON \
-D Trilinos_ENABLE_Rythmos:BOOL=ON \
-D Trilinos_ENABLE_Thyra:BOOL=ON \
-D Trilinos_ENABLE_Zoltan:BOOL=ON \
-D UMFPACK_INCLUDE_DIRS:PATH="/usr/include/suitesparse" \
-D AMD_INCLUDE_DIRS:PATH="/usr/include/suitesparse" \
$EXTRA_ARGS \
../../Trilinos-11.0.3
However, all the config file generated by the cmake are not accessible. We need modify their attribute like below
#!/bin/sh
chmod u+wr packages/teuchos/src/Teuchos_config.h
chmod u+wr packages/teuchos/src/Teuchos_DLLExportMacro.h
chmod u+wr packages/ThreadPool/src/ThreadPool_config.h
chmod u+wr packages/sacado/src/Sacado_config.h
chmod u+wr packages/rtop/src/RTOp_Config.h
chmod u+wr packages/kokkos/classic/NodeAPI/KokkosClassic_config.h
chmod u+wr packages/kokkos/NodeAPI/Kokkos_config.h
chmod u+wr packages/epetra/src/Epetra_config.h
chmod u+wr packages/epetra/src/Epetra_DLLExportMacro.h
chmod u+wr packages/zoltan/src/Zoltan_config.h
chmod u+wr packages/triutils/src/Triutils_config.h
chmod u+wr packages/kokkos/LinAlg/Kokkos_config.h
chmod u+wr packages/kokkos/classic/LinAlg/KokkosClassic_config.h
chmod u+wr packages/kokkos/classic/NodeTSQR/Tsqr_Config.hpp
chmod u+wr packages/tpetra/src/Tpetra_config.h
chmod u+wr packages/epetraext/src/EpetraExt_config.h
chmod u+wr packages/thyra/core/src/Thyra_Config.h
chmod u+wr packages/isorropia/src/Isorropia_config.h
chmod u+wr packages/aztecoo/src/AztecOO_config.h
chmod u+wr packages/galeri/src/Galeri_config.h
chmod u+wr packages/amesos/src/Amesos_config.h
chmod u+wr packages/ifpack/src/Ifpack_config.h
chmod u+wr packages/ml/src/ml_config.h
chmod u+wr packages/belos/src/Belos_config.h
chmod u+wr packages/stratimikos/src/Stratimikos_InternalConfig.h
chmod u+wr packages/stratimikos/src/Stratimikos_Config.h
chmod u+wr packages/fei/base/FEI_config.h
chmod u+wr packages/fei/support-Trilinos/FEI_config.h
chmod u+wr packages/fei/test_utils/FEI_config.h
chmod u+wr packages/anasazi/src/Anasazi_config.h
chmod u+wr packages/anasazi/src/Anasazi_DLLExportMacro.h
chmod u+wr packages/anasazi/epetra/src/Anasaziepetra_DLLExportMacro.h
chmod u+wr packages/anasazi/epetra/util/ModeLaplace/Anasaziepetra_ModeLaplace_DLLExportMacro.h
chmod u+wr packages/nox/src/NOX_Config.h
chmod u+wr packages/rythmos/src/Rythmos_config.h
订阅:
博文评论 (Atom)
VS Code下cmake, c++编译,调试环境的构成步骤
1 下载必须extension 按[Ctrl+Shift+X]打开extension窗口,选择安装"C/C++", "CMake", "CMake Tools" 2 在VSCode下打开作业目录 ...
-
假设时间步i中的所有物理量X i 已知, 如果时间步i+1中的所有物理量X i+1 可以表为X i 的显函数 (1) X i+1 = F(X i ) (注;本文以下标i,i+1等表示时间步) 则该物理量X可以显式计算。而如果 (2) ...
-
学过连续体力学(包括固体力学,流体力学等)都知道应力张量是对称的(下面将说明它是有条件的)。 对于初学者, 这似乎有些难于理解, 如 http://forum.simwe.com/forum.php?mod=viewthread&tid=503234&hig...
-
话说黄帝蚩尤大战于涿鹿, 其时浓雾弥漫, 不知东西. 黄帝造指南車辨识道路...... Fig.1 Parralel transport of a vector along a great circle of the sphere 现在考虑A部落的士兵在指南車的...
没有评论:
发表评论