# FreeFem++ PETSc configuration problem in Linux

**URL:** <https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542>\
**Category:** FreeFEM installation\
**Created:** [August 21, 2020, 10:17am UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542 "2020-08-21T10:17:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![vaalea](https://avatars.discourse-cdn.com/v4/letter/v/aca169/32.png) [@vaalea](https://community.freefem.org/u/vaalea)\
**Post date:** [August 22, 2020, 8:53am UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/3 "2020-08-22T08:53:44Z")

</div>

Dear prj,

Thanks a lot for your rapid response.  
I tried both of your solutions and only the second one worked.  
The first one using the develop branch, did not even succeed “make petsc-slepc”.  
Eventually, I also had the problem with libparmmgtypes.h as in ([Freefem installation error on ubuntu 18.04](https://community.freefem.org/t/freefem-installation-error-on-ubuntu-18-04/260/3))

In the end, I had to do,

./reconfigure MPIRUN=mpiexec --disable-parmmg

which worked for installation!

However, I faced other problem.  
When I run the code with PETSc, errors occur for buildMat.  
Other codes in examples/hpddm WITHOUT PETSc work fine as well as block-PETSc.edp, which does not call buildMat.

Is it related to the configuration --disable-parmmg ?

## The example errors for diffusion-2d-PETSc.edp using 4 tasks with 12GB memory are

## – Square mesh : nb vertices =1681 , nb triangles = 3200 , nb boundary edges 160 — global mesh of 3200 elements (prior to refinement) partitioned with metis --metisESCOA: 4-way Edge-Cut: 3, Balance: 1.01 Nodal=0/Dual 1 (in 4.019976e-03) srun: Job step aborted: Waiting up to 32 seconds for job step to finish. [2]PETSC ERROR: ------------------------------------------------------------------------ [2]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range [2]PETSC ERROR: Try option -start\_in\_debugger or -on\_error\_attach\_debugger [2]PETSC ERROR: or see https//www.mcs.anl.gov/petsc/documentation/faq.html#valgrind [2]PETSC ERROR: or try http//valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors [2]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run [2]PETSC ERROR: to get more information on the crash. [2]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- [2]PETSC ERROR: Signal received [2]PETSC ERROR: See https//www.mcs.anl.gov/petsc/documentation/faqhtml for trouble shooting. [2]PETSC ERROR: Petsc Release Version 3.13.0, Mar 29, 2020 [2]PETSC ERROR: /home/yim/FreeFem-sources/src/mpi/FreeFem+±mpi on a named f372 by yim Sat Aug 22 10:34:18 2020 [2]PETSC ERROR: Configure options MAKEFLAGS= --prefix=/home/yim/FreeFem-install/ff-petsc//r --with-debugging=0 COPTFLAGS="-O3 -mtune=native" CXXOPTFLAGS="-O3 -mtune=native" FOPTFLAGS="-O3 -mtune=native" --with-cxx-dialect=C++11 --with-ssl=0 --with-x=0 --with-fortran-bindings=0 --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --with-scalar-type=real --download-openblas --download-scalapack --download-metis --download-ptscotch --download-mumps --download-hypre --download-parmetis --download-superlu --download-suitesparse --download-tetgen --download-slepc --download-hpddm --download-hpddm-commit=e8639ff PETSC\_ARCH=fr [2]PETSC ERROR: #1 User provided function() line 0 in unknown file application called MPI\_Abort(MPI\_COMM\_WORLD, 50152059) - process 2 In: PMI\_Abort(50152059, application called MPI\_Abort(MPI\_COMM\_WORLD, 50152059) - process 2) slurmstepd: error: \*\*\* STEP 5023601.0 ON f366 CANCELLED AT 2020-08-22T10:34:18 \*\*\* srun: error: f372: task 2: Exited with exit code 123 srun: Terminating job step 5023601.0 srun: error: f366: tasks 0-1: Killed srun: error: f372: task 3: Killed

Thank you.  
Best,  
Eunok

---

_[View the full topic](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542)._
