Open azzeddinetiba opened 10 months ago
I noticed this happens in some versions of CMake, and I don't know how to fix properly the Cmake file, but can be solved with the following into your configure.sh
:
-DTRILINOS_LIBRARY_PREFIX="trilinos_" \
-DTRILINOS_INCLUDE_DIR="/usr/include/trilinos" \
-DTRILINOS_LIBRARY_DIR="/usr/lib/x86_64-linux-gnu/" \
Hello @loumalouomega , they're already added in my configure. sh
Hello @loumalouomega , they're already added in my
configure. sh
CMake Warning (dev) at CMakeLists.txt:1 (project): cmake_minimum_required() should be called prior to this top-level project() call. Please see the cmake-commands(7) manual for usage documentation of both commands. This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.
Which version of cmake are you using?
@loumalouomega 3.27.4
@loumalouomega 3.27.4
Are you 100% sure?, cmake is compalining the version. Looks like you are trying to compile with SLURM, are you sure you are using the same cmake?, verify that. Maybe SLURM is loading an old version.
I'm pretty sure it's the version I'm using yes :
which -a cmake
->
/usr/local/bin/cmake
/usr/bin/cmake
/bin/cmake
/usr/local/bin/cmake --version
->
cmake version 3.27.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).
in my configure I replaced cmake
with /usr/local/bin/cmake
. It gives the same result
I'm pretty sure it's the version I'm using yes :
which -a cmake
->/usr/local/bin/cmake /usr/bin/cmake /bin/cmake
/usr/local/bin/cmake --version
->cmake version 3.27.4 CMake suite maintained and supported by Kitware (kitware.com/cmake).
in my configure I replaced
cmake
with/usr/local/bin/cmake
. It gives the same result
Strange....
Explicit the version of cmake in the configure:
add_app () {
export KRATOS_APPLICATIONS="${KRATOS_APPLICATIONS}$1;"
}
# Load modules required for compilation
module purge
module load boost
module load python
module load openmpi
module switch gcc gcc/10.2.0
# Set compiler
export CC=${CC:-gcc}
export CXX=${CXX:-g++}
# Set variables
export KRATOS_SOURCE="${KRATOS_SOURCE:-"$( cd "$(dirname "$0")" ; pwd -P )"/..}"
export KRATOS_BUILD="${KRATOS_SOURCE}/build"
export KRATOS_APP_DIR="${KRATOS_SOURCE}/applications"
export KRATOS_INSTALL_PYTHON_USING_LINKS=ON
# Set basic configuration
export KRATOS_BUILD_TYPE=${KRATOS_BUILD_TYPE:-"Release"}
export PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE:-"/usr/bin/python3"}
# Set applications to compile
export KRATOS_APPLICATIONS=
add_app ${KRATOS_APP_DIR}/LinearSolversApplication
add_app ${KRATOS_APP_DIR}/MeshMovingApplication
add_app ${KRATOS_APP_DIR}/MappingApplication
add_app ${KRATOS_APP_DIR}/FluidDynamicsApplication
add_app ${KRATOS_APP_DIR}/ConstitutiveLawsApplication
add_app ${KRATOS_APP_DIR}/StructuralMechanicsApplication
add_app ${KRATOS_APP_DIR}/CoSimulationApplication
add_app ${KRATOS_APP_DIR}/FluidDynamicsBiomedicalApplication
add_app ${KRATOS_APP_DIR}/MetisApplication
add_app ${KRATOS_APP_DIR}/TrilinosApplication
# Clean
clear
rm -rf "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}/cmake_install.cmake"
rm -rf "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}/CMakeCache.txt"
rm -rf "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}/CMakeFiles"
# Configure
/usr/local/bin/cmake -H"${KRATOS_SOURCE}" -B"${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" \
-DUSE_MPI=ON \
-DKRATOS_SHARED_MEMORY_PARALLELIZATION="OpenMP" \
-DUSE_EIGEN_MKL=OFF \
-DTRILINOS_INCLUDE_DIR="/usr/include/trilinos"
-DTRILINOS_LIBRARY_DIR="/usr/lib/x86_64-linux-gnu"
-DTRILINOS_LIBRARY_PREFIX="trilinos_"
# Build
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target install -- -j$(nproc)
I'm sorry, I'm not sure I understand ? What should I add on the configure file ?
I'm sorry, I'm not sure I understand ? What should I add on the configure file ?
cmake -> /usr/local/bin/cmake in the configure.sh
Yes I tried
in my configure I replaced
cmake
with/usr/local/bin/cmake
. It gives the same result
it gives the same result
Yes I tried
in my configure I replaced
cmake
with/usr/local/bin/cmake
. It gives the same resultit gives the same result
Then I don't know, but the error you shared looks like realted with Cmake version
In fact, in the error message I think it recognizes the good cmake
... EPETRA_INCLUDE_PATH: /usr/include/trilinos EPETRA_LIBRARY: EPETRA_LIBRARY-NOTFOUND CMake Warning (dev) at /usr/local/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to
find_package_handle_standard_args
(EPETRA) does not match the name of the calling package (TRILINOS). This can lead to problems in calling code that expectsfind_package
result variables (e.g.,_FOUND
) to follow a certain pattern. Call Stack (most recent call first): cmake_modules/FindTRILINOS.cmake:155 (find_package_handle_standard_args) CMakeLists.txt:518 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. -- Could NOT find EPETRA (missing: EPETRA_LIBRARY) TEUCHOS_INCLUDE_PATH: /usr/include/trilinos TEUCHOS_LIBRARIES: CMake Warning (dev) at /usr/local/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed tofind_package_handle_standard_args
(TRIUTILS) does not match the name of the calling package (TRILINOS). This can lead to problems in calling code that expectsfind_package
result variables (e.g.,_FOUND
) to follow a certain pattern. Call Stack (most recent call first): cmake_modules/FindTRILINOS.cmake:176 (find_package_handle_standard_args) CMakeLists.txt:518 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. -- Could NOT find TRIUTILS (missing: TRIUTILS_LIBRARY) ...
Can you share the result of ls
in the library folder?
A priori is Okay and the same content as my library folder, so I am completely lost why it fails. Can you give me more info about this machine?, it is a Ubuntu server with SLURM. Can you try to compile in the host node? (just start it, the host node is not for compiling, it is to see if works)
I'm not familiar with SLURM. It's a container (lxc) with Ubuntu 20.04.3
I'm not familiar with SLURM. It's a container (lxc) with Ubuntu 20.04.3
Do you need to use Ubuntu 20.04? just asking.
If not SLURM why this:
# Load modules required for compilation
module purge
module load boost
module load python
module load openmpi
module switch gcc gcc/10.2.0
@roigcarlo help
Do you need to use Ubuntu 20.04? just asking.
Theoretically, I can upgrade. For now, I don't have any other problems with Ubuntu 20.04, so I avoid to.
If not SLURM why this:
# Load modules required for compilation module purge module load boost module load python module load openmpi module switch gcc gcc/10.2.0
True, I forgot to remove those lines. I had copied it with the rest of the script from here (Removing them gives the same results)
Do you need to use Ubuntu 20.04? just asking.
Theoretically, I can upgrade. For now, I don't have any other problems with Ubuntu 20.04, so I avoid to.
If not SLURM why this:
# Load modules required for compilation module purge module load boost module load python module load openmpi module switch gcc gcc/10.2.0
True, I forgot to remove those lines. I had copied it with the rest of the script from here (Removing them gives the same results)
That is older than time itself, can you tried proivided scripts instead, maybe there is something stupid there.
Do you need to use Ubuntu 20.04? just asking.
Theoretically, I can upgrade. For now, I don't have any other problems with Ubuntu 20.04, so I avoid to.
If not SLURM why this:
# Load modules required for compilation module purge module load boost module load python module load openmpi module switch gcc gcc/10.2.0
True, I forgot to remove those lines. I had copied it with the rest of the script from here (Removing them gives the same results)
That is older than time itself, can you tried proivided scripts instead, maybe there is something stupid there.
Otherwise I xan only think in updating Ubuntu, and maybe we have crashed CMake compatibility beyond our understaning.
Hi @azzeddinetiba
In ubuntu, typically you do not need to pass the prefix / suffix options, cmake should be able to find trilinos if its correctly installed.
Hi @azzeddinetiba
In ubuntu, typically you do not need to pass the prefix / suffix options, cmake should be able to find trilinos if its correctly installed.
* Can you confirm that trilinos is actually installed in the system? (And tell me if you did it through compilation or a package manager) * After, please, can you provide a list of the names and location of the libraries?
We already checked that a priori
A ok, I see the log, i though it was the compilation log sorry. If there are there, Have you tried to just remove everything related with trilinos from the configure file? it should work out of the box just with enabling the app if all are default libs
Description Hello, Cmake doesn't seem to be able to find trilinos libraries. I followed the installation istructions in here
my
/usr/lib/x86_64-linux-gnu
does contain the trilinos libraries. And Kratos compiles just fine with openMP and the other applications.Scope
configure script
The error message
Thank you in advance !