1. You need cmake installed in your computer.
2. You need msys installed in your computer.
3. Of course, visual studio also. The free express edition is OK.
4. You need BLAS and LAPACK compiler in you computer. I choose clapack beacuse it need no Fortran compiler which could be compiler by express edition of visual studio.
5. Optional: MPI ( MPICH2 or MS-MPI ) for parallel computation.
And, HDF5, MUMPS、UMFPACK etc
6. Download Trilinos and uncompress it.
7. Make a new dir in your Trilinos home, e.g. &(TRILINOS_HOME)\build
8. Write down a shell script in this new folder like below
#!/bin/sh
EXTRA_ARGS=&@
rm -r CMakeCache.txt CMakeFiles/
cmake \
-G "Visual Studio 11 Win64" \
-D Trilinos_ENABLE_TESTS:BOOL=ON \
-D TPL_ENABLE_MPI:BOOL=ON \
-D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_EpetraExt:BOOL=ON \
-D Trilinos_ENABLE_AztecOO:BOOL=ON \
-D Trilinos_ENABLE_Amesos:BOOL=ON \
-D Trilinos_ENABLE_Belos:BOOL=ON \
-D Trilinos_ENABLE_Ifpack:BOOL=ON \
-D Trilinos_ENABLE_FEI:BOOL=ON \
-D Trilinos_ENABLE_ML:BOOL=ON \
-D Trilinos_ENABLE_Stratimikos:BOOL=ON \
-D Trilinos_ENABLE_Fortran:BOOL=OFF \
-D TPL_ENABLE_BLAS:BOOL=ON \
-D TPL_ENABLE_LAPACK:BOOL=ON \
$EXTRA_ARGS \
${TRILINOS_HOME}
9. Just run it in msys, it will generate files neccesary for VS compiler.
10. Compile.
Compiler errors
1. Return type error in Teuchos_Array.hpp
2. std::insert not defined error in Teucho_array.hpp, Ifpack_ConfigDefs.hpp, MLAPI_MultiVector.h.
Just include <funtional> to resolve it.
3. Add the following line into file EpetraExt_ConfigDefs.h if you include both HDF5 and MPI. Otheriwise errors of H5Pset_fapl_mpio etc not defined exist.
#ifndef H5_HAVE_PARALLEL
#define H5_HAVE_PARALLEL
#endif
4. There exists many error in packages like anasazi, zoltan that is hard to resolve!
订阅:
博文评论 (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部落的士兵在指南車的...
没有评论:
发表评论