0

error compiling TOUGH3 on Ubuntu : Failed to build TOUGH TPLS

Hi All,

I tried to compile TOUGH3 on a new server with Ubuntu 20.04 but not successful. (Please refer to the error.png for error screenshot).

I have all dependencies installed and their versions look like below:

cmake 3.16.3

gcc 9.4.0

mpirun 4.0.3

I tried solutions below in the user forum with the same error (change the PETSC_VERSION_PATCH to 4, and add the BLAS version 3.5.0) but they did not work for me.

https://tough.forumbee.com/t/36w3x7/compiling-tough3-on-linux-platform-ubuntu

https://tough.forumbee.com/t/h44nsl/compiling-tough3-on-linux-platform-ubuntu-failed-to-configure-tough-tpls

I attached the cmakerror file for your reference. Can anyone help me out?

Thanks in advance,

 

Haiyan

49 replies

null
    • kenny
    • 9 mths ago
    • Reported - view

    This is a petsc installation problem. This problem was also reported by another user.  Why do not you try reliable (a little older) version, such as Ver 3.18.x 

      • Yessica_Peralta
      • 9 mths ago
      • Reported - view

      kenny Hi Kenny, I could install Petsc, now I am having the following error:

      [ 52%] Building Fortran object src/CMakeFiles/tough3-eco2n.dir/zevsreale.f90.o
      cd /home/yplinux/tough3-build/esd-tough3/build/tough-build-eco2n/src && /usr/local/bin/mpif90 -DTF_ECO2N_V1 -DUSE_MPI -DUSE_PETSC -I/home/yplinux/tough3-build/esd-tough3/src -I/home/yplinux/tough3-build/esd-tough3/tough3-install/tpls/include  -fallow-argument-mismatch   -c /home/yplinux/tough3-build/esd-tough3/src/zevsreale.f90 -o CMakeFiles/tough3-eco2n.dir/zevsreale.f90.o
      /home/yplinux/tough3-build/esd-tough3/src/zevsreale.f90:1551:100:

       1551 |          DO 10 J=1,NumCom
            |                                                                                                    1
      Warning: Fortran 2018 deleted feature: Shared DO termination label 10 at (1)
      /home/yplinux/tough3-build/esd-tough3/src/zevsreale.f90:1392:31:

       1392 |       if(tempC.gt.100.d0) pref=func(p_coe(1),p_coe(2),p_coe(3),p_coe(4),p_coe(5),tempC)
            |                               1
      Error: Type mismatch in argument ‘a’ at (1); passed REAL(4) to REAL(8)
      /home/yplinux/tough3-build/esd-tough3/src/zevsreale.f90:1410:8:

       1410 |      &  func(coef(1,ns),coef(2,ns),coef(3,ns)         &
            |        1
      Error: Type mismatch in argument ‘a’ at (1); passed REAL(4) to REAL(8)
      /home/yplinux/tough3-build/esd-tough3/src/zevsreale.f90:1425:22:

       1425 |          alogK(nco2)= func(cco2L(1),cco2L(2),cco2L(3),cco2L(4),cco2L(5),tempC)
            |                      1
      Error: Type mismatch in argument ‘a’ at (1); passed REAL(4) to REAL(8)
      /home/yplinux/tough3-build/esd-tough3/src/zevsreale.f90:1429:21:

       1429 |          alogK(nco2)=func(cco2(1),cco2(2),cco2(3),cco2(4),cco2(5),tempC)
            |                     1
      Error: Type mismatch in argument ‘a’ at (1); passed REAL(4) to REAL(8)
      make[2]: *** [src/CMakeFiles/tough3-eco2n.dir/build.make:378: src/CMakeFiles/tough3-eco2n.dir/zevsreale.f90.o] Error 1
      make[2]: Leaving directory '/home/yplinux/tough3-build/esd-tough3/build/tough-build-eco2n'
      make[1]: *** [CMakeFiles/Makefile2:90: src/CMakeFiles/tough3-eco2n.dir/all] Error 2
      make[1]: Leaving directory '/home/yplinux/tough3-build/esd-tough3/build/tough-build-eco2n'
      make: *** [Makefile:144: all] Error 2
      Script ERROR: Failed to build TOUGH

      • Yessica_Peralta
      • 9 mths ago
      • Reported - view

      Yessica Peralta I copied and pasted the paragraph you suggested on the CMakefiles. It looks like worked for most of the things however at the end is having this error. Have you seen it before? 

      • Yessica_Peralta
      • 9 mths ago
      • Reported - view

      kenny I copied and pasted the paragraph you suggested on the CMakefiles. It looks like worked for most of the things however at the end is having this error. Have you seen it before? 

      • Yogendra_Narayanan_Sures
      • 1 mth ago
      • Reported - view

        , Can you please help me in overcoming the above error. I modified the CMake Lists in both the locations. I have attached the Cmake file for your reference. Thank you in advance.

      • Yessica_Peralta
      • 1 mth ago
      • Reported - view

       I think you need to recompile PETSC and test it. Please, read the previous steps in this post, that was what I did. 

      • Yogendra_Narayanan_Sures
      • 1 mth ago
      • Reported - view

       I have recompiled but same error is persisting...I have modified the Cmake files for gfortran also which I have attached earlier. 

      • Yessica_Peralta
      • 1 mth ago
      • Reported - view

      Did you test the PETSC installation?. To make sure that your PETSC is installed correctly. Here is the website of the LBNL https://marketplace.lbl.gov/tough/. I think Kenny referred it in his previous replied to update the TOUGH3 V1.1

      • Yogendra_Narayanan_Sures
      • 1 mth ago
      • Reported - view

       Thank you for sharing the link. Since, we already have version TOUGH3 1.0, it was mentioned that version TOUGH3 V1.1 will be free of cost to upgrade. Could you tell me the procedure to get it upgraded. Thanks in advance.

      • Yessica_Peralta
      • 1 mth ago
      • Reported - view

       I think you can email Yingqi YQZhang@lbl.gov or Kenny too. Yingqi gave me the updated version last time. 

      • Yogendra_Narayanan_Sures
      • 1 mth ago
      • Reported - view

       Thank you. I have got the version 1.1

    • Yessica_Peralta
    • 9 mths ago
    • Reported - view

    I will

    • kenny
    • 9 mths ago
    • Reported - view

    This is the still the same error (data type dismatch) . Are you sure you have correctly fixed the cmake scripts  by adding "-fallow-argument-mismatch" in 

    1. esd-tough3/CMakeLists.txt (which is the code snippet you showed me), and
    2. esd-toughlib/src/CMakeLists.txt.
    • Yessica_Peralta
    • 9 mths ago
    • Reported - view

    Here is the esd-toughlib/src/CMakeLists.txt with the "-fallow-argument-mismatch" in. Maybe the if and endif are well aligned?. what do you think?

    • Yessica_Peralta
    • 9 mths ago
    • Reported - view

    Here are the ones. esd-tough3/CMakeLists.txt and esd-toughlib/src/CMakeLists.txt. Please discard the one I sent before

    • kenny
    • 9 mths ago
    • Reported - view

    The attached one looks good. The problem appeared during zevsreale.f90 compilation, which is compiled with the CMakeLists.txt in esd-tough3/. Have you fixed it?

    • Yessica_Peralta
    • 9 mths ago
    • Reported - view

    I think so. This is the one in esd-tough3/src 

    • Yessica_Peralta
    • 9 mths ago
    • Reported - view

    so I fixed both the one that is inside the src in both esd-tough3 and the one that is in esd-tough3

    • Yessica_Peralta
    • 9 mths ago
    • Reported - view

    This is the error log

    • kenny
    • 9 mths ago
    • Reported - view

    Seems you did not do it correctly for fixing the cmake script. The "-fallow-argument-mismatch" must apply to "GNU" compiler, not "Intel".  I am attaching the correct one. Use this one to replace the one at esd-toughlib/src/CMakeLists.txt. You need delete 'Build' folder before every recompilation 

      • Yessica_Peralta
      • 9 mths ago
      • Reported - view

      kenny seems like is configure completed. Thank you so much

      • Yessica_Peralta
      • 9 mths ago
      • Reported - view

      kenny I am trying to run a parallel with 2 or 4 processors with the mpiexec -n 2 and the following message appears: 

      WARNING: Linux kernel CMA support was requested via the
      btl_vader_single_copy_mechanism MCA variable, but CMA support is
      not available due to restrictive ptrace settings.

      The vader shared memory BTL will fall back on another single-copy
      mechanism if one is available. This may result in lower performance

      • Yessica_Peralta
      • 9 mths ago
      • Reported - view

      Yessica Peralta I fix it with: 

      $ sudo vim /etc/sysctl.d/10-ptrace.conf

      Edit from 1 to 0

      kernel.yama.ptrace_scope = 0
    • Yessica_Peralta
    • 9 mths ago
    • Reported - view

    tells me and it is just running with 1 processor, have you seen this message before?

Content aside

  • 1 mth agoLast active
  • 49Replies
  • 441Views
  • 5 Following