trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.21k stars 565 forks source link

Error found while installing in Ubuntu. What should I do? #12246

Closed Bapun-kumar closed 1 year ago

Bapun-kumar commented 1 year ago

CMake Error at cmake/tribits/core/package_arch/TribitsProcessEnabledTpls.cmake:278 (message): ERROR: TPL_HDF5_NOT_FOUND=TRUE, aborting! Call Stack (most recent call first): cmake/tribits/core/package_arch/TribitsProcessEnabledTpls.cmake:171 (tribits_address_failed_tpl_find) cmake/tribits/core/package_arch/TribitsProcessEnabledTpls.cmake:105 (tribits_process_enabled_standard_tpl) cmake/tribits/core/package_arch/TribitsProjectImpl.cmake:197 (tribits_process_enabled_tpls) cmake/tribits/core/package_arch/TribitsProject.cmake:92 (tribits_project_impl) CMakeLists.txt:101 (TRIBITS_PROJECT)

cgcgcg commented 1 year ago

@Bapun-kumar Did you set HDF5_LIBRARY_DIRS and HDF5_INCLUDE_DIRS to point to your HDF5 installation?

Bapun-kumar commented 1 year ago

Can you give me the command to set these libraries for Ubuntu ?

Bapun-kumar commented 1 year ago

@Bapun-kumar Did you set HDF5_LIBRARY_DIRS and HDF5_INCLUDE_DIRS to point to your HDF5 installation?

Can you give me the command to set these libraries for Ubuntu ?

cgcgcg commented 1 year ago

Those are CMake variables that you can set with cmake -D.

Bapun-kumar commented 1 year ago

!/bin/bash

sudo apt-get update sudo apt-get -yq install gcc build-essential wget bzip2 tar zlib1g-dev m4 libopenmpi-dev file libcurl4-openssl-dev

Build HDF5

wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.bz2 tar xjvf hdf5-1.12.0.tar.bz2 cd hdf5-1.12.0 ./configure --prefix=/home/rama/local/hdf5 --enable-parallel make make install cd .. rm -rf hdf5-1.12.0 hdf5-1.12.0.tar.bz2

Build netcdf

wget https://github.com/Unidata/netcdf-c/archive/v4.8.0.tar.gz tar xzvf v4.8.0.tar.gz mv largefiles.patch netcdf-c-4.8.0/largefiles.patch cd netcdf-c-4.8.0 patch -p1 < largefiles.patch ./configure --prefix=/home/rama/local/netcdf --disable-netcdf-4 --disable-dap \ CC=mpicc \ LDFLAGS=-L/home/rama/local/hdf5/lib \ CFLAGS=-I/home/rama/local/hdf5/include make make install cd .. rm -rf netcdf-c-4.8.0 v4.8.0.tar.gz

sudo apt-get -yq install g++ gfortran python libblas-dev liblapack-dev libboost-dev git libyaml-cpp-dev

cp https://github.com/Kitware/CMake/releases/download/v3.20.5/cmake-3.20.5-linux-x86_64.sh /cmake-3.20.5-Linux-x86_64.sh mkdir /opt/cmake sh /cmake-3.20.5-Linux-x86_64.sh --prefix=/opt/cmake --skip-license ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake cmake --version

Build Trilinos

git clone https://github.com/trilinos/Trilinos.git trilinos git checkout trilinos-release-13-1-0 mkdir trilinos/build mv trilinos-debian-cmake.sh /trilinos/build/trilinos-debian-cmake.sh cd trilinos/build ./trilinos-debian-cmake.sh make && make install cd ../.. rm -rf trilinos

apt-get -yq install openmpi-bin apt-get -yq install openssh-server apt-get -yq install libboost1.55 git clone https://github.com/peridigm/peridigm peridigm

mkdir peridigm/build

cd peridigm/build cmake \ -D CMAKE_BUILD_TYPE:STRING=Release \ -D CMAKE_INSTALL_PREFIX:PATH=/home/rama/local/peridigm \ -D CMAKE_CXX_FLAGS:STRING="-O2 -Wall -std=c++14 -pedantic -Wno-long-long -ftrapv -Wno-deprecated" \ -D TRILINOS_DIR:PATH=/home/rama/local/trilinos \ -D CMAKE_CXX_COMPILER:STRING="mpicxx" \ -D USE_DAKOTA:BOOL=OFF \ ..; \ make && make install cd .. rm -rf peridigm

Actually this is the installation command I have used. Can anyone please tell me where is the mistake I did?

cgcgcg commented 1 year ago

Where does trilinos-debian-cmake.sh come from? What commands are in there?

Bapun-kumar commented 1 year ago

!/bin/bash

rm -f CMakeCache.txt

MPI_HOME=/usr EXTRA_ARGS=$@

cmake -D CMAKE_INSTALL_PREFIX:PATH=/home/bapun/trilinos/ \ \ -D MPI_BASE_DIR:PATH=/home/bapun123/openmpi-4.1.1 \ -D CMAKE_CXX_FLAGS:STRING="-O2 -std=c++11 -pedantic -ftrapv -Wall -Wno-long-long" \ \ -D CMAKE_BUILD_TYPE:STRING=Release \ -D CMAKE_Fortran_COMPILER:FILEPATH=/usr/bin/mpif90 \ -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING="" \ -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \ -D Trilinos_ENABLE_Teuchos:BOOL=ON \ -D Trilinos_ENABLE_Shards:BOOL=ON \ -D Trilinos_ENABLE_Sacado:BOOL=ON \ -D Trilinos_ENABLE_Epetra:BOOL=ON \ -D Trilinos_ENABLE_EpetraExt:BOOL=ON \ -D Trilinos_ENABLE_Ifpack:BOOL=ON \ -D Trilinos_ENABLE_AztecOO:BOOL=ON \ -D Trilinos_ENABLE_Amesos:BOOL=ON \ -D Trilinos_ENABLE_Anasazi:BOOL=ON \ -D Trilinos_ENABLE_Belos:BOOL=ON \ -D Trilinos_ENABLE_ML:BOOL=ON \ -D Trilinos_ENABLE_Phalanx:BOOL=ON \ -D Trilinos_ENABLE_Intrepid:BOOL=ON \ -D Trilinos_ENABLE_NOX:BOOL=ON \ -D Trilinos_ENABLE_Stratimikos:BOOL=ON \ -D Trilinos_ENABLE_Thyra:BOOL=ON \ -D Trilinos_ENABLE_Rythmos:BOOL=ON \ -D Trilinos_ENABLE_MOOCHO:BOOL=ON \ -D Trilinos_ENABLE_TriKota:BOOL=OFF \ -D Trilinos_ENABLE_Stokhos:BOOL=ON \ -D Trilinos_ENABLE_Zoltan:BOOL=ON \ -D Trilinos_ENABLE_Piro:BOOL=ON \ -D Trilinos_ENABLE_Teko:BOOL=ON \ -D Trilinos_ENABLE_SEACASIoss:BOOL=ON \ -D Trilinos_ENABLE_SEACAS:BOOL=ON \ -D Trilinos_ENABLE_SEACASBlot:BOOL=OFF \ -D Trilinos_ENABLE_Pamgen:BOOL=ON \ -D Trilinos_ENABLE_EXAMPLES:BOOL=OFF \ -D Trilinos_ENABLE_TESTS:BOOL=ON \ -D TPL_ENABLE_Matio:BOOL=OFF \ -D TPL_ENABLE_HDF5:BOOL=ON \ -D TPL_ENABLE_X11=OFF \ -D HDF5_INCLUDE_DIRS:PATH=/home/bapun/hdf5/include \ -D HDF5_LIBRARY_DIRS:PATH=/home/bapun/hdf5/lib \ -D TPL_ENABLE_Netcdf:BOOL=ON \ -D Netcdf_INCLUDE_DIRS:PATH=/home/bapun/netcdf/include \ -D Netcdf_LIBRARY_DIRS:PATH=/home/bapun/netcdf/lib \ -D TPL_ENABLE_MPI:BOOL=ON \ -D TPL_ENABLE_BLAS:BOOL=ON \ -D TPL_ENABLE_LAPACK:BOOL=ON \ -D TPL_ENABLE_Boost:BOOL=OFF \ -D TPL_ENABLE_yaml-cpp:BOOL=ON \ -D TPL_yaml-cpp_LIBRARIES:FILEPATH=/usr/lib/x86_64-linux-gnu/libyaml-cpp.so \ -D TPL_yaml-cpp_INCLUDE_DIRS:PATH=/usr/include/yaml-cpp \ -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \ -D Trilinos_VERBOSE_CONFIGURE:BOOL=OFF \ -D BUILD_SHARED_LIBS=ON \ -D Trilinos_SHOW_DEPRECATED_WARNINGS:BOOL=OFF \ \ $EXTRA_ARGS \ ..

Where does trilinos-debian-cmake.sh come from? What commands are in there?

cgcgcg commented 1 year ago

From what I can see, you installed HDF5 in /home/rama/local/hdf5. In trilinos-debian-cmake.sh you are setting

-D HDF5_INCLUDE_DIRS:PATH=/home/bapun/hdf5/include
-D HDF5_LIBRARY_DIRS:PATH=/home/bapun/hdf5/lib 
GrahamBenHarper commented 1 year ago

@Bapun-kumar I agree with Christian; there's an inconsistency with regards to whether your home directory is rama or bapun. To add on: if you're installing Boost immediately after installing Trilinos, I suggest changing the order of operations and utilizing Boost as a TPL for Trilinos. Since it's installed as a system library, Trilinos should be able to find it automatically.

Bapun-kumar commented 1 year ago

Yes, It is installing. Thank you.

Bapun-kumar commented 1 year ago

From what I can see, you installed HDF5 in /home/rama/local/hdf5. In trilinos-debian-cmake.sh you are setting

-D HDF5_INCLUDE_DIRS:PATH=/home/bapun/hdf5/include
-D HDF5_LIBRARY_DIRS:PATH=/home/bapun/hdf5/lib 

Thank You