I think the problem is in your MPI installation. deal.II does not find your MPI 
(i.e., it does not find MPI, even if you specifiy -DEAL_II_WITH_MPI=ON).

You could set your cxx compiler to the mpi compiler that was used to build 
PETSc. This should be sufficient to make sure deal.II picks up mpi, and PETSc.

Best,
Luca.

> On 6 Oct 2020, at 10:36, einseg...@gmail.com <einsegelb...@gmail.com> wrote:
> 
> Dear developers of Deal ii,
>           I tried to run example-70(FSI example), but I found I have no PETSc 
> linked to DEAL ii. I failed since example-17. I have installed PETSc 3.13.2.0 
> following the instruction of https://ibamr.github.io/linux (IBAMR is an 
> immersed boundary method which also need PETSc, I also read the instruction 
> page of https://www.dealii.org/developer/external-libs/petsc.html which has 
> similar instructions(except the MPI ch part). And I successfully make test of 
> PETSc. But when I typed:
> (base) afan-XPS-8700:~/myProject/dealii/dealii-9.2.0$ cmake 
> -DDEAL_II_WITH_PETSC=ON -DEAL_II_WITH_MPI=ON .
> It always returns the error as follows:
> 
> ```
> PETSC_VERSION: 3.13.2.0
> --   PETSC_LIBRARIES: 
> /home/afan/sfw/petsc/3.13.2/linux-opt/lib/libpetsc.so;/home/afan/sfw/petsc/3.13.2/linux-opt/lib/libHYPRE.so;/usr/lib/x86_64-linux-gnu/liblapack.so;/usr/lib/x86_64-linux-gnu/libblas.so;m;dl;/home/afan/sfw/linux/openmpi/4.0.2/lib/libmpi_usempif08.so;/home/afan/sfw/linux/openmpi/4.0.2/lib/libmpi_usempi_ignore_tkr.so;/home/afan/sfw/linux/openmpi/4.0.2/lib/libmpi_mpifh.so;/home/afan/sfw/linux/openmpi/4.0.2/lib/libmpi.so;gfortran;m;gfortran;m;quadmath;pthread;quadmath;dl
> --   PETSC_INCLUDE_DIRS: 
> /home/afan/sfw/petsc/3.13.2/include;/home/afan/sfw/petsc/3.13.2/linux-opt/include;/home/afan/sfw/petsc/3.13.2/include;/home/afan/sfw/petsc/3.13.2/linux-opt/include
> --   PETSC_USER_INCLUDE_DIRS: 
> /home/afan/sfw/petsc/3.13.2/include;/home/afan/sfw/petsc/3.13.2/linux-opt/include;/home/afan/sfw/petsc/3.13.2/include;/home/afan/sfw/petsc/3.13.2/linux-opt/include
> -- Found PETSC
> -- Could not find a sufficient PETSc installation: PETSc has to be configured 
> with the same MPI configuration as deal.II.
> -- DEAL_II_WITH_PETSC has unmet external dependencies.
> CMake Error at cmake/configure/configure_3_petsc.cmake:141 (MESSAGE):
>   
> 
>   Could not find the petsc library!
> 
>   Could not find a sufficient PETSc installation:
> 
>   PETSc has to be configured with the same MPI configuration as deal.II, but
>   found:
> 
>     DEAL_II_WITH_MPI = OFF
>     PETSC_WITH_MPI   = (NOT FALSE)
> 
>   
> 
>   Please ensure that the petsc library version 3.3.0 or newer is installed on
>   your computer and is configured with the same mpi options as deal.II
> 
>   If the library is not at a default location, either provide some hints
> 
>   for the autodetection:
> 
>   PETSc installed with --prefix=<...> to a destination:
> 
>       $ PETSC_DIR="..." cmake <...>
>       $ cmake -DPETSC_DIR="..." <...>
> 
>   PETSc compiled in source tree:
> 
>       $ PETSC_DIR="..."  PETSC_ARCH="..." cmake <...>
>       $ cmake -DPETSC_DIR="..." -DPETSC_ARCH="..." <...>
> 
>   or set the relevant variables by hand in ccmake.
> 
>   
> 
> Call Stack (most recent call first):
>   CMakeFiles/CMakeTmp/evaluate_expression.tmp:1 (FEATURE_PETSC_ERROR_MESSAGE)
>   cmake/macros/macro_evaluate_expression.cmake:30 (INCLUDE)
>   cmake/macros/macro_configure_feature.cmake:267 (EVALUATE_EXPRESSION)
>   cmake/configure/configure_3_petsc.cmake:160 (CONFIGURE_FEATURE)
>   cmake/macros/macro_verbose_include.cmake:19 (INCLUDE)
>   CMakeLists.txt:124 (VERBOSE_INCLUDE)
> 
> 
> -- Configuring incomplete, errors occurred!
> See also 
> "/home/afan/myProject/dealii/dealii-9.2.0/CMakeFiles/CMakeOutput.log".
> See also "/home/afan/myProject/dealii/dealii-9.2.0/CMakeFiles/CMakeError.log".
> ```
> 
> I would like to ask: do I need to install a new version of PETSc or how can I 
> link PETSc with DEAL_II?
> Best wishes!
> 
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/9e3f2feb-bc47-4b8f-8e94-c3b75c8ef366n%40googlegroups.com.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/3FAFF67A-50DA-422C-B538-DDFE7B971688%40gmail.com.

Reply via email to