Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • I INMOST
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Terekhov
  • INMOST
  • Wiki
  • 0404 Compilation Trilinos Linux

Last edited by Kirill Terekhov Sep 21, 2015
Page history

0404 Compilation Trilinos Linux

Compiling INMOST with Trilinos on Linux

INMOST may be configured with optional Trilinos support. In this case INMOST will support calling linear solvers from Trilinos package, i.e. you will be able to activate Solver::Trilinos_Aztec, Solver::Trilinos_ML, Solver::Trilinos_Ifpack, Solver::Trilinos_Belos packages in Solver::Solver constructor.

INMOST is known to work with Trilinos version 11.12.1.

Compiling Trilinos

You can download Trilinos package from http://trilinos.org/download/. Please note that in order to download it you have to provide some basic information about yourself. Place the source archive in $INMOST_ROOT directory.

PETSc installation guide

We will unpack Trilinos source archive and create new build directory for Trilinos compilation. We will also define two variables TRILINOS_BASE and TRILINOS_INSTALL_PATH, those will be used later.

cd "$INMOST_ROOT"
tar jxf trilinos-11.12.1-Source.tar.bz2
cd trilinos-11.12.1-Source
export TRILINOS_BASE="`pwd`"
export TRILINOS_INSTALL_PATH="$TRILINOS_BASE/installed"
mkdir -p build
cd build

At this point we recommend you to create a helper script and configuration file. We predefined the set of required Trilinos packages, enabled MPI support, and also defined INSTALL_PREFIX. For fine-tuning and troubleshooting your configuration refer to Trilinos quick reference guide.

cat > do-configure << EOF
#!/bin/bash
export SOURCE_BASE="$TRILINOS_BASE"
EXTRA_ARGS=\$@
cmake \\
  -D Trilinos_CONFIGURE_OPTIONS_FILE="`pwd`/MyConfigureOptions.cmake" \\
  \$EXTRA_ARGS \\
  \${SOURCE_BASE}
EOF
chmod +x do-configure

cat > MyConfigureOptions.cmake << EOF
SET(CMAKE_INSTALL_PREFIX "$TRILINOS_INSTALL_PATH" CACHE PATH "" FORCE)
SET(TPL_ENABLE_MPI ON CACHE BOOL "" FORCE)
SET(Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES OFF CACHE BOOL "" FORCE)
SET(Trilinos_ENABLE_Epetra ON CACHE BOOL "" FORCE)
SET(Trilinos_ENABLE_AztecOO ON CACHE BOOL "" FORCE)
SET(Trilinos_ENABLE_Ifpack ON CACHE BOOL "" FORCE)
SET(Trilinos_ENABLE_ML ON CACHE BOOL "" FORCE)
SET(Trilinos_ENABLE_Amesos ON CACHE BOOL "" FORCE)
SET(Trilinos_ENABLE_Belos ON CACHE BOOL "" FORCE)
EOF

Now you are ready to configure and build Trilinos package, these steps can take some time. Note, if you need to provide path to BLAS and LAPACK libraries, just add options TPL_BLAS_LIBRARIES and TPL_LAPACK_LIBRARIES to do-configure script (e.g., if you used PETSc installer: ./do-configure -DTPL_BLAS_LIBRARIES="$PETSC_DIR/$PETSC_ARCH/lib/libf2cblas.a" -DTPL_LAPACK_LIBRARIES="$PETSC_DIR/$PETSC_ARCH/lib/libf2clapack.a")

./do-configure
make all
make install

Compiling INMOST with Trilinos support

Make sure the environment variable TRILINOS_INSTALL_PATH is initialized correctly, see above. CMake will detect your Trilinos installation if you provide the install path.

cd "$INMOST_ROOT"
mkdir -p INMOST-build
cd INMOST-build
cmake -DUSE_SOLVER_TRILINOS=ON -DTRILINOS_PATH="$TRILINOS_INSTALL_PATH" ../INMOST-0.1
make all
Clone repository
  • 0100 Compilation
  • 0200 Compilation Windows
  • 0201 Obtain MSVC
  • 0202 Obtain MSMPI
  • 0203 Compilation INMOST Windows
  • 0204 Compilation ParMETIS Windows
  • 0205 Compilation Zoltan Windows
  • 0206 Compilation PETSc Windows
  • 0207 Compilation Trilinos Windows
  • 0400 Compilation Linux
  • 0401 Install MPI
  • 0402 Compilation INMOST Linux
  • 0403 Compilation PETSc Linux
  • 0404 Compilation Trilinos Linux
  • 0405 Compilation ParMETIS Linux
View All Pages