0

Issues with TOUGH3 compilation

Hi there,

I am new to TOUGH, but want to install and use it now. I do have a copy of a recent version of the code (3.1.2), however, I have failed to install it so far, so I am hoping to find some help here!

I am trying to install on Linux Ubuntu 24.04 (running through WSL2, actually) and using a recent PETSC version (3.26). First, I did install PETSC following the instruction. In the end, there appears a prompt on the command line:

Now to check if the libraries are working do:
make PETSC_DIR=/home/rolft/petsc-3.26.0/ PETSC_ARCH=arch-t3 check

 

If I do that, I get the following output (which seems to suggest that the PETSC install went fine):

Running PETSc check examples to verify correct installation
Using PETSC_DIR=/home/rolft/petsc-3.26.0/ and PETSC_ARCH=arch-t3
C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI processCompleted PETSc check examples

 

After that, I changed into the TOUGH3 source directory and wanted to configure using:

./configure.sh --build-type=RELEASE --eos==eco2m --no-x11 --petsc-dir=/home/rolft/petsc-3.26.0 --petsc-arch=arch-t3

 

This fails, however, it seems due to compatibility issues with the CMake version. 

./configure.sh --build-type=RELEASE --eos==2 --no-x11 --petsc-dir=/home/rolft/petsc-3.26.0/ --petsc-arch=arch-t3
--eos==2
BUILD_TYPE = RELEASE
Build directories ready
Searching for a C compiler
Searching for mpicc
Build with C compiler: /usr/bin/mpicc
Searching for a C++ compiler
Searching for mpicxx
Build with C++ compiler: /usr/bin/mpicxx
Searching for a Fortran compiler
Searching for mpif90
Build with Fortran compiler: /usr/bin/mpif90
Searching for mpiexec
Searching for mpiexec
MPIEXEC used: /usr/bin/mpiexec
Compiler Check complete
Tool check complete
Running on a Debian system... -DMPI_EXEC=/usr/bin/mpiexec -DUSE_MPI:BOOL=TRUE -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/mpicxx -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/mpicc -DCMAKE_Fortran_COMPILER:FILEPATH=/usr/bin/mpif90 -DUSE_X11:BOOL=FALSE
./configure.sh: line 768: [: ==: unary operator expected

CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument value.
Or, use the ... syntax  to tell CMake that the project requires at least but has been updated  to work with policies introduced by or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

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

 

Well, I did try to just comment out the line 2 in the CMakeLists.txt, which states that the mimimum version should be 2.8.5. That did not help. Neither did it help to change that version number to 3.5. Same error. I also added that this line to my configure.sh, as suggested by the previous output:

CONFIG_FLAGS="${CONFIG_FLAGS} -DCMAKE_POLICY_VERSION_MINIMUM=3.5"

 

But apart from this extra flag being shown when re-rerunning configure.sh, it does not lead to any changes.

 

Has anyone encountered this problem before? Any ideas how to resolve it?

 

Thanks so much in advance!

Reply

null

Content aside

  • 5 hrs agoLast active
  • 2Views
  • 1 Following