The Build directory is removed before compiling preCICE every time. PETSC_DIR and PETSC_ARCH are specified in ~/.bashrc beforehand. I am not sure if this is the reason why FindPETSC locates Pestc. Please find below the new CMakeError.log, which I just repeated the installation procedure with removing the Build directory.
CMakeError.log (15.1 KB)
Sorry that I don’t understand what you meant. Which MPI, Intel MPI or OpenMPI, should be used? How to fix the problem? I just tried OpenMPI. It does not work as well… See the configure commands for compiling Petsc with IntelMPI, which is the same as I showed before, and with OpenMPI. When I reinstalled Petsc, the old directory of Petsc was deleted firstly.
sudo ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich -download-fblaslapack --prefix=/scratch/hd/sw/petsc-3.6.4
sudo ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-openmpi -download-fblaslapack --prefix=/scratch/hd/sw/petsc-3.6.4
The error information for preCICE when OpenMPI is used for Petsc:
– Found MPI_CXX: /home/hd/local/bin/mpicxx (found version “3.0”) **
– Found MPI: TRUE (found version “3.0”) **
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
** PETSc could not be found. Be sure to set PETSC_DIR and PETSC_ARCH.
** (missing: PETSC_INCLUDES PETSC_LIBRARIES PETSC_EXECUTABLE_RUNS) (Required
** is at least version “3.6”)**
Call Stack (most recent call first):
** /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)**
** cmake/modules/FindPETSc.cmake:345 (find_package_handle_standard_args)**
** CMakeLists.txt:148 (find_package)**
– Configuring incomplete, errors occurred!
See also “/scratch/hd/sw/precice-develop/build/CMakeFiles/CMakeOutput.log”.