# 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:** 13\
**Page:** 2

<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 25, 2020, 12:36pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/21 "2020-08-25T12:36:15Z")

</div>

Ah maybe I have to do  
_make clean_ first then _make petsc-slepc_ for ff-petsc…  
I will come back with new configure.log…

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [August 25, 2020, 12:47pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/22 "2020-08-25T12:47:58Z")

</div>

Indeed, you need to nuke the `/home/yim/FreeFem-install-dev/ff-petsc` folder.

---

<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 25, 2020, 3:56pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/23 "2020-08-25T15:56:05Z")

</div>

Dear prj,

With the make clean in 3rd-party/ff-petsc, I manage to compile the program without ERRORs.

[config.log](https://community.freefem.org/uploads/short-url/onQg2cO1L9eyJh8AKAjjxRzOyPR.log) (438.3 KB)  
[cofigure2.log](https://community.freefem.org/uploads/short-url/vYLf82NF5esq4zz7aK5uUOwZ1uu.log) (1.0 MB)

Then, I was happy to retry the example file like diffusion-3d.edp,  
Now I have this output file…

* * *

## srun: error: PMK\_KVS\_Barrier duplicate request from task 0 srun: error: PMK\_KVS\_Barrier duplicate request from task 1 srun: error: PMK\_KVS\_Barrier duplicate request from task 2 srun: error: PMK\_KVS\_Barrier duplicate request from task 3

Just to inform you, when I run the code, I use shell script something like…

* * *

module add intel/18.0.5 intel-mpi/2018.4.274 intel-mkl/2018.5.274  
export LD\_LIBRARY\_PATH={LD\_LIBRARY\_PATH}:{INTEL\_ROOT}/compiler/lib/intel64

dirff=/home/yim/FreeFem-sources-develop/src/mpi/ff-mpirun

srun $dirff diffusion-3d.edp \> output.txt

* * *

What did I do wrong this time?  
Thank you and sorry…

Eunok

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [August 25, 2020, 3:58pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/24 "2020-08-25T15:58:43Z")

</div>

You have to run `srun -n 4 /home/yim/FreeFem-sources-develop/src/mpi/FreeFem++-mpi diffusion-3d.edp -v 0`, not `/home/yim/FreeFem-sources-develop/src/mpi/ff-mpirun`. Could you try that instead, please?

---

<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 25, 2020, 4:17pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/25 "2020-08-25T16:17:17Z")

</div>

Ah yes. I was using it previously… Sorry…  
diffusion-3d.edp works as before! And I made random tests for some examples: diffusion-3d-PETSc.edp works! and also laplace-adapt-3d-PETSc.edp!

## But not newton-vi-2d-PETSc.edp The error msg are

[1]PETSC ERROR: ------------------------------------------------------------------------  
[1]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range  
[1]PETSC ERROR: Try option -start\_in\_debugger or -on\_error\_attach\_debugger  
[1]PETSC ERROR: or see [https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind](https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind)  
[1]PETSC ERROR: or try [http://valgrind.org](http://valgrind.org) on GNU/linux and Apple Mac OS X to find memory corruption errors  
[1]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run  
[1]PETSC ERROR: to get more information on the crash.  
[1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------  
[1]PETSC ERROR: Signal received  
[1]PETSC ERROR: See [https://www.mcs.anl.gov/petsc/documentation/faq.html](https://www.mcs.anl.gov/petsc/documentation/faq.html) for trouble shooting.  
[1]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020  
[1]PETSC ERROR: /home/yim/FreeFem-sources-develop/src/mpi/FreeFem+±mpi on a named g130 by yim Tue Aug 25 18:11:38 2020  
[1]PETSC ERROR: Configure options --prefix=/home/yim/FreeFem-install-dev/ff-petsc/r MAKEFLAGS= --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-cudac=0 --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --with-scalar-type=real --with-blaslapack-include=/ssoft/spack/external/intel/2018.4/compilers\_and\_libraries\_2018.5.274/linux/mkl/include --with-blaslapack-lib="-Wl,-rpath,/ssoft/spack/external/intel/2018.4/compilers\_and\_libraries\_2018.5.274/linux/mkl/lib/intel64 -L/ssoft/spack/external/intel/2018.4/compilers\_and\_libraries\_2018.5.274/linux/mkl/lib/intel64 -lmkl\_rt -lmkl\_sequential -lmkl\_core -liomp5 -lpthread" --download-metis --download-ptscotch --download-hypre --download-parmetis --download-superlu --download-suitesparse --download-tetgen --download-slepc --download-hpddm --download-hpddm-commit=ce6ce80 --download-scalapack --download-mumps PETSC\_ARCH=fr  
[1]PETSC ERROR: #1 User provided function() line 0 in unknown file  
application called MPI\_Abort(MPI\_COMM\_WORLD, 50162059) - process 1  
In: PMI\_Abort(50162059, application called MPI\_Abort(MPI\_COMM\_WORLD, 50162059) - process 1)  
srun: Job step aborted: Waiting up to 32 seconds for job step to finish.  
slurmstepd: error: \*\*\* STEP 5080250.0 ON g130 CANCELLED AT 2020-08-25T18:11:38 \*\*\*  
slurmstepd: error: \*\*\* STEP 5080250.0 ON g130 CANCELLED AT 2020-08-25T18:11:38 \*\*\*  
srun: error: g130: task 0: Killed  
srun: Terminating job step 5080250.0  
srun: error: g130: task 1: Exited with exit code 15  
srun: error: g137: tasks 2-3: Killed

* * *

---

<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 25, 2020, 4:55pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/26 "2020-08-25T16:55:17Z")

</div>

Dear prj,  
I found something very strange…  
For instance, I told you that diffusion-3d-PETSc.edp works.  
But, diffusion-2d-PETSc.edp does not.  
When I compare the code, there are only few differences between these two codes: dimension 3 vs. 2 and cube vs. square… I have no idea why one works but not the other…  
I attach the output file if you like to have a look.

[slurm-5083554\_diffusion-2d-PETSc.log](https://community.freefem.org/uploads/short-url/mf0v2NtUTgbCTQl9jKY8cEgpe55.log) (2.5 KB) [diffusion-2d-PETSc.log](https://community.freefem.org/uploads/short-url/4YHCnFkJuYsAM6mtdzSZLX35oZ2.log) (174.8 KB) [diffusion-3d-PETSc.log](https://community.freefem.org/uploads/short-url/lD7ylfEeHPcjsnWSdFJsUsteZ6J.log) (186.9 KB)

Best,  
Eunok

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [August 25, 2020, 5:50pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/27 "2020-08-25T17:50:13Z")

</div>

It’s good news that some examples are working. I’m guessing there is something wrong in your software stack, all these examples are basically the same, it’s not normal that some work while others don’t. Consider updating your Intel modules and GNU compilers.

---

<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 26, 2020, 2:29pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/28 "2020-08-26T14:29:03Z")

</div>

Dear prj,  
Thanks a lot for your help.  
For updates of intel and GNU, I will contact the system manager.  
In the meantime, strangely the examples/hpddm, only all 3D examples are working but none of the 2D examples…  
I will keep you updated…  
Best,  
Eunok

---

<div class="post-metadata">

**Author:** ![LucasPa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/lucaspa/32/347_2.png) [@LucasPa](https://community.freefem.org/u/LucasPa)\
**Post date:** [January 28, 2021, 3:00pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/29 "2021-01-28T15:00:35Z")

</div>

Hi Eunok,

Depending on which computing architectures am I working on, I may experience the same error 50162059 for a script working fine on an other computing architecture:

> MPI\_ABORT was invoked on rank 3 in communicator MPI\_COMM\_WORLD  
> with errorcode 50162059.

Did you manage to find the reason for such an error ?

Best,

Lucas

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [January 28, 2021, 4:08pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/30 "2021-01-28T16:08:57Z")

</div>

Could you share a [MWE](https://en.wikipedia.org/wiki/Minimal_working_example) that reproduce the error, and say a little bit more about the faulty architecture?

---

<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:** [January 28, 2021, 5:08pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/31 "2021-01-28T17:08:53Z")

</div>

Unfortunately, I did not resolve this problem…

---

<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:** [January 28, 2021, 5:19pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/32 "2021-01-28T17:19:49Z")

</div>

Hi Prj,  
I did not have any special code. [slurm-6954404.log](https://community.freefem.org/uploads/short-url/yKzYBukkFz3m4a4dWnxqxpYNgMi.log) (4.7 KB) [stokes-2d-PETSc.log](https://community.freefem.org/uploads/short-url/ophh87F1lQhmWWT8TAYbUbdM1K7.log) (173.0 KB)  
I used the freefem example in hpddm.  
I attach the failed log files for 2D example ‘stokes-2d-PETSc.log’.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [January 28, 2021, 5:24pm UTC](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/33 "2021-01-28T17:24:02Z")

</div>

Did you update your compilers as advised 4 months ago? Also, you may want to update your FreeFEM installation.

[Previous page](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542.md?page=1)
