Compiling TOUGH3 on Linux platform (Ubuntu): Failed to configure TOUGH TPLS
I tried to compile TOUGH3 eos7ca, but the following error message showed up. I changed PETSC_VERSION_PATCH 6 to PETSC_VERSION_PATCH 4 and deleted /esd-tough3/build and /esd-tough3/tough3-install before compiling. The compile was not successful.
Can you help me with the issue?
------
choy@ce-126063:~/TOUGH3L/tough3-build/esd-tough3$ EOS_NUM=7ca
choy@ce-126063:~/TOUGH3L/tough3-build/esd-tough3$ ./configure.sh --eos=$EOS_NUM --no-x11
--no-x11
[Fri Oct 18 22:49:02 DST 2019] Build directories ready
[Fri Oct 18 22:49:02 DST 2019] Searching for a C compiler
[Fri Oct 18 22:49:02 DST 2019] Searching for mpicc
[Fri Oct 18 22:49:02 DST 2019] Build with C compiler: /usr/local/bin/mpicc
[Fri Oct 18 22:49:02 DST 2019] Searching for a C++ compiler
[Fri Oct 18 22:49:02 DST 2019] Searching for mpicxx
[Fri Oct 18 22:49:02 DST 2019] Build with C++ compiler: /usr/local/bin/mpicxx
[Fri Oct 18 22:49:02 DST 2019] Searching for a Fortran compiler
[Fri Oct 18 22:49:02 DST 2019] Searching for mpif90
[Fri Oct 18 22:49:02 DST 2019] Build with Fortran compiler: /usr/local/bin/mpif90
[Fri Oct 18 22:49:02 DST 2019] Searching for mpiexec
[Fri Oct 18 22:49:02 DST 2019] Searching for mpiexec
[Fri Oct 18 22:49:02 DST 2019] MPIEXEC used: /usr/local/bin/mpiexec
[Fri Oct 18 22:49:02 DST 2019] Compiler Check complete
[Fri Oct 18 22:49:02 DST 2019] Tool check complete
Running on a Debian system...
-DMPI_EXEC=/usr/local/bin/mpiexec -DUSE_MPI:BOOL=TRUE -DCMAKE_CXX_COMPILER:FILEPATH=/usr/local/bin/mpicxx -DCMAKE_C_COMPILER:FILEPATH=/usr/local/bin/mpicc -DCMAKE_Fortran_COMPILER:FILEPATH=/usr/local/bin/mpif90 -DUSE_X11:BOOL=FALSE
[Fri Oct 18 22:49:02 DST 2019]
-- C compiler is /usr/local/bin/mpicc
-- Fortran compiler is /usr/local/bin/mpif90
statusUSE_PETSC = ON in esd-toughlib/CMakeLists.txt
-- Setting build type
-- Setting build type -- DEBUG
-- Download TPL files in /home/choy/TOUGH3L/tough3-build/esd-tough3/build/tpl-build/tpls/Downloads
-- Install TPLs in /home/choy/TOUGH3L/tough3-build/esd-tough3/tough3-install/tpls
CMake Error at tpls/CMakeLists.txt:44 (include):
include could not find load file:
/home/choy/TOUGH3L/tough3-build/esd-toughlib/tpls/TPLVersions.cmake
-- A library with BLAS API not found. Please specify library location.
-- A library with BLAS API not found. Please specify library location.
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
CMake Error: File /home/choy/TOUGH3L/tough3-build/esd-toughlib/tpls/templates/petsc-configure-step.sh.in does not exist.CMake Error at tpls/include/Build_PETSC.cmake:14 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
tpls/CMakeLists.txt:105 (include)
-- Configuring incomplete, errors occurred!
See also "/home/choy/TOUGH3L/tough3-build/esd-tough3/build/tpl-build/CMakeFiles/CMakeOutput.log".
See also "/home/choy/TOUGH3L/tough3-build/esd-tough3/build/tpl-build/CMakeFiles/CMakeError.log".
Script ERROR: Failed to configure TOUGH TPLS
----
Thank you for your help.
YK
10 replies
-
Hi Younki,
You said you changed from PETSC_VERSION_PATCH 6 to PETSC_VERSION_PATCH 4
Did you successfully compile TOUGH3 before you switch the version?
Can you attach the file CMakeError.log
Yingqi
-
Hi Jianjun,
Did you use cygwin? If you have win 10, please follow the instructions that Rick Jayne provided in one of the previous post. Cygwin does not work with windows 10.
You probably still encounter similar problems but I think Younki is going to post his solution once he gets a chance.
Yingqi
-
I fixed the problem following the post, https://tough.forumbee.com/t/36w3x7/compiling-tough3-on-linux-platform-ubuntu
First, I made changes on TPLVersions.cmake file located in esd-toughlib\tpls. The latest BLAS version does not work. Change the version to 3.5.0 and don't forget the "-" in the line 6 ( set(BLAS_ARCHIVE_FILE blas-${BLAS_VERSION}.tgz) ).
Second, I added lines to the petsc-configure-step.sh.in file located in esd-toughlib\tpls\templates. See the second picture.
Lastly, I made changes on CMakeCache.txt located in esd-tough3. The directories for tough3_BINARY_DIR, tough3_SOURCE_DIR, CMAKE_CACHEFILE_DIR , and CMAKE_HOME_DIRECTORY were different. Make them same. See the third picture.
Sometimes, I got permission denied. I do not know why... You can use this command to fix the problem.
sudo chmod -R 777 FOLDERNAME
I hope this helps you.
-
Jianjun Hu Sorry I did not notice you mentioned that you have a mac. Please follow instructions using readme_mac.pdf instead. Thank you.
Yingqi