-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile TrilinosApplication #11900
Comments
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 -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 |
CMake Warning (dev) at CMakeLists.txt:1 (project): -- The C compiler identification is GNU 9.4.0 Which version of cmake are you using? |
@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 :
in my configure I replaced |
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 ? |
cmake -> /usr/local/bin/cmake in the configure.sh |
Yes I tried
it 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
|
Can you share the result of |
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 |
Do you need to use Ubuntu 20.04? just asking. If not SLURM why this:
@roigcarlo help |
Theoretically, I can upgrade. For now, I don't have any other problems with Ubuntu 20.04, so I avoid to.
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. |
In ubuntu, typically you do not need to pass the prefix / suffix options, cmake should be able to find trilinos if its correctly installed.
|
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 !
The text was updated successfully, but these errors were encountered: