0

Eorror Compling TOUGH3 with PETSC in WSL

I have installed fortran compliers (gcc, gfortran, g++ (version9.5)) and configured petsc according to kenny's instruction (https://tough.forumbee.com/t/g9h57pf/tough3-installation-issue).

However, when I was compiling TOUGH3 ECO2N module in ubuntu subsystem, I ran into this problem. I could not figure out how to fix it. Much Thanks if anyone could give a hint.🙂

8 replies

null
    • kenny
    • 8 mths ago
    • Reported - view

    Seems something wrong with MPI. Do you install Tough3  V1.1?

      • feng_zhao
      • 8 mths ago
      • Reported - view

       I fixed this problem by degrading my gcc version and completed compiling.

      However, the linux excutable files did not work. When I submitted my input file in WSL, I kept running into this error (attached figure). It seems that something is wrong with utility.f90 ? I don't know how to solve this '"Fortran error" problem. Could you please help me see whether it is due to compling mistake or source code bug ?   (my TOUGH3 version is v1.0)

      Thanks in advance for your time!

    • kenny
    • 8 mths ago
    • Reported - view

    The executable is good. Something wrong with input files. Do you include the keyword INCON and GENER in the main input file or provide these two files in the working folder? 

    • Yessica_Peralta
    • 7 mths ago
    • Reported - view

    Hi, I am getting the attached error while compiling TOUGH3 ECO7C, I already compiled ECO2N and worked with it ok. Could you please help me with this error?. Thank you in advance. 

    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 -DIMPLICIT_BLASLAPACK:BOOL=TRUE
    ./configure.sh: line 768: [: ==: unary operator expected
    [Tue Sep 12 14:49:32 MDT 2023]
    -- C compiler is /usr/local/bin/mpicc
    -- Fortran compiler is /usr/local/bin/mpif90
    -- Setting build type
    -- Setting build type -- RELEASE
    -- Download TPL files in /home/yplinux/tough3-build/esd-tough3/build/tpl-build/tpls/Downloads
    -- Install TPLs in /home/yplinux/tough3-build/esd-tough3/tough3-install/tpls
    -- The inputed petsc installation directory is: petscDir
    -- The inputed petsc installation arch is: arch-t3
    CMake Error at petsc_cmake/FindPETSc.cmake:139 (message):
      The pair PETSC_DIR=petscDir PETSC_ARCH=arch-t3 do not specify a valid PETSc
      installation
    Call Stack (most recent call first):
      CMakeLists.txt:85 (find_package)

    -- Configuring incomplete, errors occurred!
    Script ERROR: Failed to configure TOUGH TPLS

    Yessica Peralta

    • kenny
    • 7 mths ago
    • Reported - view

    "The pair PETSC_DIR=petscDir PETSC_ARCH=arch-t3 do not specify a valid PETSc is not correct". You must provide directory where petsc installed by : PETSC_DIR=......, or the PETSC_ARCH=arch-t3, see the readme file

    • Yessica_Peralta
    • 7 mths ago
    • Reported - view

    Thank you Kenny, I fix it. On the other hand, do you know which part of the source code should I adapt to couple TOUGH3 with Flac3 or any other software such as comsol or Diana

    • kenny
    • 7 mths ago
    • Reported - view

    I got an email  from Dr. Toshifumi Akaki regarding the coupling with FLAC3D. Following are his descriptions:

     

    Calling positions for Sub.HMPROP

    Sub. CYCIT

    c.....JR-THM call FLAC for establishing inititla mechanical equilibrium at time 0.0

          CALL HMPROP(2,PER1,PER2,PCAP1,PCAP10,PCAP2,PACP20,

         &                          DPHI,iso,n1,n2,0,0) !Read initial condition of FLAC3D

    c.....end JR_THM

    c

       30 KCYC=KCYC+1

    C

    C-----COME HERE FOR NEW TIME STEP.

        3 CONTINUE

    C

    C-----COME HERE FOR NEXT ITERATION.

    C

    IF(NOW.EQ.0) GOTO33

    CALL OUT

    c.....JR-THM ADD OUTPUT OF HYDROMECHANICAL PARAMETERS AND SAVE FILE

          CALL HMPROP(6,PER1,PER2,PCAP1,PCAP10,PCAP2,PACP20,

         &                          DPHI,iso,n1,n2,0,NOW) !Output while TOUGH calling out

     

    GOTO(3,30),KON

     

    ++++++++++

    SUBROUTINE MULTI

    C     ASSIGN QUANTITIES WHICH DEPEND ONLY UPON ELEMENT INDEX N.

          PHIN=PHI(N)

          NMAT=MATX(N)

          CD=SH(NMAT)*DM(NMAT)*(1.-POR(NMAT))

    c.....JR_THM here we first calculate correction factors for ELEMEN with INDEX N

          CALL HMPROP(3,PER1,PER2,PCAP1,PCAP10,PCAP2,PACP20,

         &                          DPHI,iso,n,0,NMAT,NOW) !get stress from FLAC3D

    C

    Loop for Mass Cons. Equations

    Loop for Phases

    Loop for Components

    C-----COMPUTE CHANGE IN POROSITY.

          DPRES=0.

          IF(M.EQ.2) DPRES=DELX(NLOCP+1)

          PRES=X(NLOCP+1)+DX(NLOCP+1)+DPRES

          DPHI=PHIN*(COM(NMAT)*(PRES-P(N))+EXPAN(NMAT)*(PAR(NLM2+NSEC-1)

         &-T(N)))

          PHINN=PHIN+DPHI

    End loop

    End loop

    End loop

     

    Loop for conections (DO1 N=1,NCON)

    Loop for M=1,2,…,NEQ,NEQ+1,…,2NEQ+1 (DO 2 M=1,NFLUX)

    c.....JR-THM add next line to calculate current permeability PER1 PER2

          CALL HMPROP(4,PER1,PER2,PCAP1,PCAP10,PCAP2,PACP20,

         &                          DPHI,iso,n1,n2,NMAT1,NOW) !get stress dependent permeability

     

    c.....JR-THM to correct capillary pressure for stress

          CALL HMPROP(5,PER1,PER2,PCAP1,PCAP10,PCAP2,PACP20,

         &                          DPHI,iso,n1,n2,0,NOW) !get stress dependent capirally pressure

    End loop

    End loop

    • Yessica_Peralta
    • 7 mths ago
    • Reported - view

    Thank you for your reply. 

Content aside

  • 7 mths agoLast active
  • 8Replies
  • 67Views
  • 3 Following