0

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

null
    • yqzhang
    • 4 yrs ago
    • Reported - view

    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

      • Jianjun_Hu
      • 4 yrs ago
      • Reported - view

      Yingqi Zhang 

      I believe Younki didn't successfully compile TOUGH3. As you see, the error is generated during the compiling process. In fact, I have the same question, although I am trying to compile it on Windows (VMware virtual machine on my Macbook).

      It would be very helpful if you can help us on that. I did the same attempts as Younki did: changing the PETSC_VERSION_PATH 6 to 4, deleted the /Executables/build and /Executables/tough3-install.

       

      Please see the attached files for your references. These files are in the folder /Executables/build/tpl-build/CMakeFiles.

      • Jianjun_Hu
      • 4 yrs ago
      • Reported - view

      Yingqi Zhang

      my previous compile command is `./compile_T3_cygwin.sh EOS_NUM` which would be wrong.

      However, i tried to change the command `./compile_T3_cygwin.sh 1` but still failed.

    • yqzhang
    • 4 yrs ago
    • Reported - view

    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

      • Jianjun_Hu
      • 4 yrs ago
      • Reported - view

      Yingqi Zhang 

      Hello Yingqi,

      I do have win 10 and tried to follow the instruction in the file "c:\cygwin64\home\fancy\esd-tough3\README_cygwin.pdf". This may be reason why it failed.

      However, would you mind to share with me Rick Jayne's post or any instructions regarding win10? I cannot find it.

      Thanks,

      Jianjun

    • ultramarine_ocean
    • 4 yrs ago
    • Reported - view

    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_DIRCMAKE_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
      • 4 yrs ago
      • Reported - view

      YK 

      Thanks for you updates. I have some questions here:

      • in file `TPLVersions.cmake`, the way of set the version number is like:

                 set(BLAS_VERSION "3.5.0")
                 set(BLAS_URL_STRING     "http://www.netlib.org/blas")
                 set(BLAS_ARCHIVE_FILE   blas-${BLAS_VERSION}.tgz)
                 set(BLAS_MD5_SUM        "")

      By searching in this forum, I see that sometimes the way to make the setting is like firstly specify major version "3", then subversion "5" and then "0".

      Is this because of the version difference of TOUGH3?

      • your last step, the file `CMakeCache.txt` does not locate in folder `esd-tough3`, but in folder `Executables\build\tpl-build\`, which is a folder generated in the compiling process. Also, I cannot find the line "tough3_BINARY_DIR:STATIC=....." shown in your figure, but the lines look like below:
      //Value Computed by CMake
      toughlib_BINARY_DIR:STATIC=/home/fancy/Executables/build/tpl-build
      
      //Value Computed by CMake
      toughlib_SOURCE_DIR:STATIC=/home/fancy/esd-toughlib
      •  Finally, the final solution "tough3_BINARY_DIR:STATIC=.../esd-tough3/CMakeCache.txt" -- shouldn't it be a directory, rather than a file?
    • yqzhang
    • 4 yrs ago
    • Reported - view

    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

      • Jianjun_Hu
      • 4 yrs ago
      • Reported - view

      Yingqi Zhang YK

       

      Thanks for your responses and help. Now I can compile the source (ordered and downloaded from TOUGH webpage) in my Ubuntu system. It seems to be some issues from the source package I have previously.

      Sorry for the back and forth.

      Jianjun

      • Jianjun_Hu
      • 4 yrs ago
      • Reported - view
      • In file ~/esd-tough3/Readme_Linux.pdf: installation instructions, step a -- Using package manager, should change the `libgfortran` to `libgfortran3`. So it will be like:
      $ sudo apt-get install -y autotools-dev gcc g++ gfortran libgfortran3 build-essential
      openmpi-bin openmpi-doc libopenmpi-dev cmake
      • In file ~/esd-tough3/compile_T3_Linux.sh, I would suggest to make the `example for linux` to be like:
      ./configure.sh       --no-x11       --build-type=RELEASE       --eos=$eos       --prefix=/opt/esd-tough/tough3-serial       --with-cxx-compiler=g++       --with-c-compiler=gcc       --with-fort-compiler=gfortran       --use-mpi=0

Content aside

  • 4 yrs agoLast active
  • 10Replies
  • 395Views
  • 4 Following