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
I attached the cmakerror file for your reference. Can anyone help me out?
Thanks in advance,
Haiyan
49 replies
-
Have you try this one: https://tough.forumbee.com/t/g9h57pf/tough3-installation-issue?
-
Thanks, Kenny. I realized the error is caused by a 'utime' error of the server. The command 'umount' fixed the issue. Now I got a new error (screenshot and CmakeError file attached). The new error seems to be related with PETSC. I sure will check the instructions you shared.
Haiyan
-
kenny Haiyan Zhou Dear kenny and Haiyan
I meet the same problem when I install tough3 v1.0 by Linux,for example, failed to build TOUGH TPLS, We also have the source code license of TOUGH3 including all modules, the current version I am using is v1.0. If you can give me for the newer TOUGH3 V1.1, I will thank you very much,my email is 2312238375@qq.com
Thanks,
Yiming Luo
-
Hi,
I am trying to compile Tough3 V1.1 in ubuntu PC and I am having the following error: at [56%] Building Fortran object src/mpi_interface/CMakeFiles/toughlib_parallel.dir/parallel.f90. Does someone know how to fix it?. Thank you in advance.
Yessica
-
Please post the error message here.
-
-
HI Kenny, these are the files I found as error
-
Did you get any message (on monitor) when the error occoured at [56%] Building Fortran object src/mpi_interface/CMakeFiles/toughlib_parallel.dir/parallel.f90?
-
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
make[2]: *** [src/mpi_interface/CMakeFiles/toughlib_parallel.dir/build.make:66: src/mpi_interface/CMakeFiles/toughlib_parallel.dir/parallel.f90.o] Error 1
make[2]: Leaving directory '/home/yplinux/tough3-build/esd-tough3/build/tpl-build'
make[1]: *** [CMakeFiles/Makefile2:310: src/mpi_interface/CMakeFiles/toughlib_parallel.dir/all] Error 2
make[1]: Leaving directory '/home/yplinux/tough3-build/esd-tough3/build/tpl-build'
make: *** [Makefile:133: all] Error 2
Script ERROR: Failed to build TOUGH TPLS -
Yes, I got that message
-
This problem happens when you are using GFORTRAN Ver 10.0 or later version. An easy way to avoid this problem is to use an alternative Fortran Compiler, Intel Fortran or Gfortran V9.x. Or you can modify the CMake scripts in following two files by adding "-fallow-argument-mismatch" option:
- esd-tough3/CMakeLists.txt (which is the code snippet you showed me), and
- esd-toughlib/src/CMakeLists.txt.
if( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -fpp -r8 -i4 -debug all -check all -check noarg_temp_created -zero -qopenmp")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS} -fpp -r8 -i4 -O3 -free -CB -diag-disable 8291 -zero -qopenmp")
else ()
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEUBG} -cpp -fdefault-real-8 -fdefault-double-8 -fno-align-commons -Wuninitialized -ftrapv -fcheck=bounds -fcheck=do -fcheck=mem -fcheck=pointer -fcheck=recursion -fstack-check -fbacktrace -finit-local-zero -fopenmp")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS} -cpp -O2 -fdefault-real-8 -fdefault-double-8 -fno-align-commons -finit-local-zero -fopenmp")
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "10")
set(CMAKE_Fortran_FLAGS_DEBUG "-fallow-argument-mismatch")
set(CMAKE_Fortran_FLAGS_RELEASE "-fallow-argument-mismatch")
endif()
endif() -
Hi Keni, I will try it and let you know
-
Hi Keni, I added the code to the CMakeLists files. So, I am trying to compile with petsc and the following error comes up:
CMake Error at petsc-timestamps/petsc-download-RELEASE.cmake:16 (message):
Command failed: 1'/usr/local/bin/cmake' '-Dmake=' '-Dconfig=' '-P' '/home/yplinux/tough3-build/esd-tough3/build/tpl-build/tpls/petsc/petsc-timestamps/petsc-download-RELEASE-impl.cmake'
See also
/home/yplinux/tough3-build/esd-tough3/build/tpl-build/tpls/petsc/petsc-timestamps/petsc-download-*.log
make[2]: *** [tpls/CMakeFiles/petsc.dir/build.make:93: tpls/petsc/petsc-timestamps/petsc-download] Error 1
make[2]: Leaving directory '/home/yplinux/tough3-build/esd-tough3/build/tpl-build'
make[1]: *** [CMakeFiles/Makefile2:167: tpls/CMakeFiles/petsc.dir/all] Error 2
make[1]: Leaving directory '/home/yplinux/tough3-build/esd-tough3/build/tpl-build'
make: *** [Makefile:133: all] Error 2
Script ERROR: Failed to build TOUGH TPLS -
-
Have you deleted the "build" folder before the recompilation? Or did you provide the --PETSC_ARCH and --PETSC_DIR parameters at the configure command line?
-
I deleted the build file and the command I am using is ./configure.sh --build-type=RELEASE --eos=eco2n --no-x11 --petsc-dir=/home/yplinux/petsc-3.19.2 --petsc-arch=arch-t3
I am getting the same error: [ 56%] Building Fortran object src/mpi_interface/CMakeFiles/toughlib_parallel.dir/parallel.f90.o
-
when the checking process starts says the following about petsc:
-- The inputed petsc installation directory is: /home/yplinux/petsc-3.19.2
-- The inputed petsc installation arch is: arch-t3
-- petsc_lib_dir /home/yplinux/petsc-3.19.2/arch-t3/lib
-- Recognized PETSc install with single library for all packages
-- Performing Test MULTIPASS_TEST_1_petsc_works_minimal
-- Performing Test MULTIPASS_TEST_1_petsc_works_minimal - Failed
-- Performing Test MULTIPASS_TEST_2_petsc_works_allincludes
-- Performing Test MULTIPASS_TEST_2_petsc_works_allincludes - Failed
-- Performing Test MULTIPASS_TEST_3_petsc_works_alllibraries
-- Performing Test MULTIPASS_TEST_3_petsc_works_alllibraries - Failed
-- Performing Test MULTIPASS_TEST_4_petsc_works_all
-- Performing Test MULTIPASS_TEST_4_petsc_works_all - Failed
-- PETSc could not be used, maybe the install is broken.
-- PETSc could not be found. Be sure to set PETSC_DIR and PETSC_ARCH. (missing: PETSC_EXECUTABLE_RUNS) (found version "3.19.2") -
The output clearly indicates that the PETSC can not be found, either the provided PETSC_DIR and/or PETSC_ARCH are wrong or you did not sucessfully installed the petsc.
-
Delete the arch-t3 folder and recompile the petsc again
-
I used this command to install petsc: ./configure --with-debugging=0 --with-shared-libraries=0 --PETSC_ARCH=arch-t3 make
There is something else needed to install petsc?
-
I will do it
-
When I tested petsc the following error comes up:
lid velocity = 0.0016, prandtl # = 1., grashof # = 1.
Number of SNES iterations = 2
[DESKTOP-58PF7K0:19697] 1 more process has sent help message help-btl-vader.txt / cma-permission-denied
[DESKTOP-58PF7K0:19697] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process
Completed test examples
Error while running make check
gmake[1]: *** [makefile:123: check] Error 1
make: *** [GNUmakefile:17: check] Error 2
yplinux@DESKTOP-58PF7K0:~/petsc-3.19.2$ make PETSC_DIR=/home/yplinux/petsc-3.19.2 PETSC_ARCH=arch-t3 check
Running check examples to verify correct installation
Using PETSC_DIR=/home/yplinux/petsc-3.19.2 and PETSC_ARCH=arch-t3
C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
Possible error running C/C++ src/snes/tutorials/ex19 with 2 MPI processes
See https://petsc.org/release/faq/
--------------------------------------------------------------------------
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.