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
没有评论:
发表评论