0

TOUGH3 Installation Fails Due to BLAS Package URL Change

I am writing to seek your assistance with an issue I encountered during the installation of TOUGH3. 

The installation process fails due to a recent change in the URL of the BLAS package, which prevents the package from being downloaded as specified in the current download-BLAS.cmake file located at /esd-tough3/build/tpl-build/tpls/blas/blas-timestamps.

Specifically, the download-BLAS.cmake file contains the following line:

foreach(url http://www.netlib.org/blas/blas-.tgz)

This URL is no longer valid, and as a result, the download step fails. I attempted to modify the URL myself but was not successful.

Could you please assist me in updating the download-BLAS.cmake file with the correct URL or provide guidance on how to resolve this issue?

Thank you for your time and assistance.

12 replies

null
    • kenny
    • 8 days ago
    • Reported - view

    Are you using the most updated version of TOUGH3 (V1.12)? The direct usage of BLAS has been removed from TOUGH3 (but it is still be used in PETSC and required during linking). The download of BLAS may not be necessary, but you may need installation of BLAS with Petsc.

      • Tsubasa_Sasaki
      • 8 days ago
      • Reported - view

      Hi Kenny,

      Thank you for your help. Yes, I'm using the latest version (V.1.12). The installation of BLAS with PETSc was successful, but the installation of TOUGH3 still failed due seemingly to BLAS.

      Below is the complete history of commands I used to install PETSc and TOUGH3.

      First, I downloaded and installed PETSc by running the commands below:

      git clone https://gitlab.com/petsc/petsc petsc
      cd petsc
      git checkout v3.17.0
      ./configure --with-debugging=0 --with-shared-libraries=0 --PETSC_ARCH=arch-t3 --download-mpich --download-fblaslapack=1
      make PETSC_DIR=/home1/sasaki01/tough3_v1.12/petsc PETSC_ARCH=arch-t3 all

      I then verified the PETSc installation by running the following command:

      make PETSC_DIR=/home1/sasaki01/tough3_v1.12/petsc PETSC_ARCH=arch-t3 check

      Here are the results:

      Running check examples to verify correct installation
      Using PETSC_DIR=/home1/sasaki01/tough3_v1.12/petsc 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 process
      Completed test examples

      Next, I proceeded to install TOUGH3 using the following commands:

      cd ../esd-tough3/
      ./configure.sh --build-type=RELEASE --eos=4 --no-x11 --petsc-dir=/home1/sasaki01/tough3_v1.12/petsc --petsc-arch=arch-t3

      However, when I executed the last command, I encountered the following error:

      CMake Error at blas-timestamps/BLAS-download-RELEASE.cmake:49 (message):
        Command failed: 1
      
        '/home1/sasaki01/cmake/bin/cmake' '-Dmake=' '-Dconfig=' '-P' '/home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/blas/blas-timestamps/BLAS-download-RELEASE-impl.cmake'
      
        See also
      
          /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/blas/blas-timestamps/BLAS-download-*.log
      make[2]: *** [tpls/CMakeFiles/BLAS.dir/build.make:101: tpls/blas/blas-timestamps/BLAS-download] error 1
      make[2]: Leaving directory '/home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build'
      make[1]: *** [CMakeFiles/Makefile2:214: tpls/CMakeFiles/BLAS.dir/all] error 2
      make[1]: Leaving directory '/home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build'
      make: *** [Makefile:139: all] error 2
      Script ERROR: Failed to build TOUGH TPLS

      The error message and the attached BLAS-download-err.log file indicate that the failure is related to BLAS. Or did I do anything wrong in the above installation process?

      • kenny
      • 7 days ago
      • Reported - view

       

      You may delete the two folders (./build and ./tough3-install) under the working folder and then run the 
      ./configure.sh --build-type=RELEASE --eos=4 --no-x11 --petsc-dir=/home1/sasaki01/tough3_v1.12/petsc --petsc-arch=arch-t3 again.

      If you still get the same error, you may install LAPACK separately. Once LAPACK was installed,  the cmake script for TOUGH3 installation should be able to find it and will not perform LAPACK/BLAS installation during TOUGH3 installation.  Delete the above two folders at each time you rerun the TOUGH3 configuration. 

    • kenny
    • 7 days ago
    • Reported - view

    As I mentioned in previous post that TOUGH3 does not use LAPACK/BLAS directly, you may not need to install them. If you want to make things simple, you can use the attached CMakeLists.txt to replace the one in the folder: 

    /tough3_v1.12/esd-toughlib/tpls

    And then run the tough3 configure again. Do not forget to delete the two folders before running the configuration.

    CMakeLists.txt

      • Tsubasa_Sasaki
      • 7 days ago
      • Reported - view

       

      Thank you for your guidance. I followed your instructions as outlined below:

      1. Deleted the ./build and ./tough3-install folders and ran the following command:

        ./configure.sh --build-type=RELEASE --eos=4 --no-x11 --petsc-dir=/home1/sasaki01/tough3_v1.12/petsc --petsc-arch=arch-t3
      2. Downloaded and installed LAPACK in the ./lapack-3.10.1 folder using these commands:

        wget http://www.netlib.org/lapack/lapack-3.10.1.tgz
        tar -xzvf lapack-3.10.1.tgz
        cp make.inc.example make.inc
        make

        Then, I added the following lines to my .bashrc file:

        export LD_LIBRARY_PATH=/home1/sasaki01/tough3_v1.12/lapack-3.10.1:$LD_LIBRARY_PATH
        export LIBRARY_PATH=/home1/sasaki01/tough3_v1.12/lapack-3.10.1:$LIBRARY_PATH

        After that, I repeated Step 1.

      3. Replaced the CMakeLists.txt file in the /tough3_v1.12/esd-toughlib/tpls folder with the one you provided and repeated Step 1.

      Results:

      • Steps 1 and 2 did not resolve the issue.

      • Step 3 produced different errors than previously encountered. The errors are as follows:

        CMake Error at tpls/CMakeLists.txt:75 (add_subdirectory):
          add_subdirectory given source "tpls" which is not an existing directory.
        
        CMake Warning at tpls/CMakeLists.txt:91 (find_package):
          By not providing "FindPETSc.cmake" in CMAKE_MODULE_PATH this project has
          asked CMake to find a package configuration file provided by "PETSc", but
          CMake did not find one.
        
          Could not find a package configuration file provided by "PETSc" with any of
          the following names:
        
            PETScConfig.cmake
            petsc-config.cmake
        
          Add the installation prefix of "PETSc" to CMAKE_PREFIX_PATH or set
          "PETSc_DIR" to a directory containing one of the above files. If "PETSc"
          provides a separate development package or SDK, be sure it has been
          installed.
        
        CMake Error at tpls/CMakeLists.txt:128 (add_subdirectory):
          add_subdirectory given source "src" which is not an existing directory.

      Would modifying some lines in the CMakeLists.txt file resolve these issues?

      • kenny
      • 7 days ago
      • Reported - view

       Sorry, I sent wrong CMakelists.txt. This is the correct one.

      • Tsubasa_Sasaki
      • 7 days ago
      • Reported - view

       

      Thank you for the provided file. The BLAS issue has been resolved, and TOUGH3 almost compiled successfully. However, I encountered another error:

      [100%] Linking Fortran executable tough3-eos4
      (Omitted long lines here by myself)
      
      /usr/bin/ld: cannot find -laztec
      collect2: error: ld returned 1 exit status
      make[2]: *** [src/CMakeFiles/tough3-eos4.dir/build.make:366: src/tough3-eos4] Error 1
      make[2]: Leaving directory '/home1/sasaki01/tough3_v1.12/esd-tough3/build/tough-build-4'
      make[1]: *** [CMakeFiles/Makefile2:101: src/CMakeFiles/tough3-eos4.dir/all] Error 2
      make[1]: Leaving directory '/home1/sasaki01/tough3_v1.12/esd-tough3/build/tough-build-4'
      make: *** [Makefile:149: all] Error 2
      Script ERROR: Failed to build TOUGH

      It appears there is an issue with finding the Aztec library. Could you please advise on how to resolve this?

      • kenny
      • 6 days ago
      • Reported - view

       

      During configuration of TOUGH3, you should be able to see the following output messages.

      These messages indicate the success of AZTEC installation. The compiled library (libaztec.a) can be found in:

      tough3_v1.12/esd-tough3/tough3-install/tpls/lib 

      If you get the library libaztec.a, you should not have problem for AZTEC linking.

      Please let me know what you see.

      • Tsubasa_Sasaki
      • 2 days ago
      • Reported - view

       

      Thanks for your reply. I couldn't respond earlier as I took a few days off.

      Here's what I see on my shell:

      [ 36%] No update step for 'AZTEC'
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls && /home1/sasaki01/cmake/bin/cmake -E echo_append
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls && /home1/sasaki01/cmake/bin/cmake -E touch /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-update
      [ 40%] No patch step for 'AZTEC'
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls && /home1/sasaki01/cmake/bin/cmake -E echo_append
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls && /home1/sasaki01/cmake/bin/cmake -E touch /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-patch
      [ 43%] Performing configure step for 'AZTEC'
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-2.1-source && /home1/sasaki01/cmake/bin/cmake -P /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-configure-RELEASE.cmake
      -- AZTEC configure command succeeded.  See also /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-configure-*.log
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-2.1-source && /home1/sasaki01/cmake/bin/cmake -E touch /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-configure
      [ 46%] Performing build step for 'AZTEC'
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-2.1-source && /home1/sasaki01/cmake/bin/cmake -P /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-build-RELEASE.cmake
      -- AZTEC build command succeeded.  See also /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-build-*.log
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-2.1-source && /home1/sasaki01/cmake/bin/cmake -E touch /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-build
      [ 50%] Performing install step for 'AZTEC'
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-2.1-source && /home1/sasaki01/cmake/bin/cmake -P /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-install-RELEASE.cmake
      -- AZTEC install command succeeded.  See also /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-install-*.log
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-2.1-source && /home1/sasaki01/cmake/bin/cmake -E touch /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-install
      [ 53%] Completed 'AZTEC'
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls && /home1/sasaki01/cmake/bin/cmake -E make_directory /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/CMakeFiles
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls && /home1/sasaki01/cmake/bin/cmake -E touch /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/CMakeFiles/AZTEC-complete
      cd /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls && /home1/sasaki01/cmake/bin/cmake -E touch /home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build/tpls/aztec/aztec-timestamps/AZTEC-done
      make[2]: ディレクトリ '/home1/sasaki01/tough3_v1.12/esd-tough3/build/tpl-build' から出ます

      It may seem everything went fine, but when I checked the attached error logs, it appears the compilation of AZTEC failed. Could you please review the error logs and provide some advice?

      • Tsubasa_Sasaki
      • 2 days ago
      • Reported - view

       

      Here is the English version of the log files:

      • kenny
      • yesterday
      • Reported - view

       The error message indicates that the MPI does not install properly in your computer system. You may check whether the MPI wrapped C and Fortran compilers work by running "mpif90" or/and "mpicc". If they work, you should use these compilers to configure TOUGH3, by specifing:  --with-c-compiler=mpicc, --with-fort-compiler=mpif90

      • Tsubasa_Sasaki
      • yesterday
      • Reported - view

       

      I wanted to thank you for your support. I successfully compiled TOUGH3 after installing MPI on my system. Interestingly, the options --with-c-compiler=mpicc and --with-fort-compiler=mpif90 were not necessary for the compilation—in fact, specifying these options caused errors.

      Nevertheless, TOUGH3 is now compiled, and the simulations are running smoothly, producing the expected results. Everything seems to be working perfectly now.

      Thanks again for your assistance!

Content aside

  • yesterdayLast active
  • 12Replies
  • 32Views
  • 3 Following